mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 03:58:22 +00:00
refactor: move selection rendering to dedicated UILayer
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { EventBus, GameEvent } from "../core/EventBus";
|
||||
import { UserSettings } from "../core/game/UserSettings";
|
||||
import { Game } from "../core/game/Game";
|
||||
import { UnitView } from "../core/game/GameView";
|
||||
|
||||
export class MouseUpEvent implements GameEvent {
|
||||
constructor(
|
||||
@@ -8,6 +10,16 @@ export class MouseUpEvent implements GameEvent {
|
||||
) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event emitted when a unit is selected or deselected
|
||||
*/
|
||||
export class UnitSelectionEvent implements GameEvent {
|
||||
constructor(
|
||||
public readonly unit: UnitView | null,
|
||||
public readonly isSelected: boolean,
|
||||
) {}
|
||||
}
|
||||
|
||||
export class MouseDownEvent implements GameEvent {
|
||||
constructor(
|
||||
public readonly x: number,
|
||||
|
||||
Reference in New Issue
Block a user