PingWheel beta
Class of @v12-engine/client
export declare class PingWheelThe ping wheel's controller (client.pingWheel): opened at a spot, aimed, sent or put away. Its state is a signal the drawings follow; it works with no pointer too (aimAt an angle: the keys)
Members
constructor
constructor(pings: PlayerPings, look?: PingWheelLook);Constructs a new instance of the PingWheel class
aim
aim(pointer: {
x: number;
y: number;
}): void;The pointer at a spot of the view: the item it is toward picked, none within the dead zone
aimAt
aimAt(angle: number): void;An item picked by an angle (radians, as PingWheelItem.angle), as the keys do: the nearest
cancel
cancel(): void;Puts it away, nothing sent
look
look: PingWheelLook;How it looks and works (GameView.pings.wheel), changed in place while the game runs
open
get open(): boolean;Whether it is open
release
release(): string | undefined;Lets go: the picked kind sent at the spot (or the first one, for a release in the middle, as the look says), and the wheel closed. The kind sent, or nothing
show
show(at: {
x: number;
y: number;
}, ground: Vec2): boolean;Opens it at a spot of the view, over a spot of the map. Not where there is nothing to ping with
state
readonly state: Accessor<PingWheelState | null>;The wheel as it is now, or null while it is closed. A signal
turn
turn(step: 1 | -1): void;The next item round (or back, step -1) from the one picked: the keys' way round the wheel