Rozsvěcení a zhasínání světel, sprity pro místnosti, indikátory rozsvícených světel, po konci hry je hráč vrácen do hlavního menu
This commit is contained in:
parent
25a62af483
commit
55fd052072
27 changed files with 338 additions and 113 deletions
|
|
@ -16,7 +16,8 @@ public class CommandManager {
|
|||
("Toggle left door", Keys.A, ToggleDoorLeft),
|
||||
("Toggle centre door", Keys.W, ToggleDoorCentre),
|
||||
("Toggle right door", Keys.D, ToggleDoorRight),
|
||||
("Toggle back door", Keys.S, ToggleDoorBack)
|
||||
("Toggle back door", Keys.S, ToggleDoorBack),
|
||||
("Toggle light", Keys.F, ToggleLight)
|
||||
];
|
||||
|
||||
private static InputListenerHook allControlsHook{ get; } = new(true);
|
||||
|
|
@ -42,6 +43,8 @@ public class CommandManager {
|
|||
|
||||
private static Dictionary<Direction, TileConnectorProjection> currentDoorBinds = new();
|
||||
|
||||
private static void ToggleLight() => SendToggleLight(Client.Player.state.camera, !ClientMapManager.Get(Client.Player.state.camera).Lit);
|
||||
|
||||
private static void SendToggleDoor(Direction direction) {
|
||||
if (Screen.CurrentScreen.Label == UIManager.ScreenTypes.CAMERAS){
|
||||
SendToggleRemoteDoor(direction);
|
||||
|
|
@ -80,4 +83,11 @@ public class CommandManager {
|
|||
currentDoorBinds.Add(dir, c);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SendToggleLight(int id, bool state) {
|
||||
if(!Client.Player.state.monitorUp || ClientMapManager.Get(id).Owner != Client.Player) return;
|
||||
ClientMapManager.Get(id).Lit = state;
|
||||
UIManager.UpdateCameras([id]);
|
||||
Client.SendCommands([PlayerCommand.SET_LIGHT(id, state)]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue