Renderer/assets/Scripts/client/player/player.ts
austin cae96992c0
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
room tool work
2025-05-16 13:15:32 -04:00

47 lines
988 B
TypeScript

/**
* Overall state of the player's controls
*/
export class PlayerControlState {
/**
* State of the room tool
*/
roomTool: RoomToolState = new RoomToolState()
}
/**
* State for the room tool
*/
export class RoomToolState {
/**
* The currently selected functionality of the room tool
*/
currentState: 'SelectRoom' | 'ShowRoom' | 'SelectFurniture' | 'ShowFurniture' | 'DetectRoom' = 'SelectRoom'
/**
* Updates the state of the room tool
* @param value The new value
*/
updateState(value: 'SelectRoom' | 'ShowRoom' | 'SelectFurniture' | 'ShowFurniture' | 'DetectRoom'){
this.currentState = value
}
}
/**
* Overall state for the client player
*/
export interface ClientPlayer {
/**
* State of controls for the player
*/
controlState: PlayerControlState,
}
/**
* Actual player control state
*/
export const defaultPlayerState: ClientPlayer = {
controlState: new PlayerControlState()
}