Zvuky, změny v pathfindingu, přidány ventilace
This commit is contained in:
parent
4fdff0a0cc
commit
c5adebb2db
36 changed files with 527 additions and 143 deletions
|
|
@ -49,6 +49,8 @@ public class UIManager {
|
|||
|
||||
private static InputListenerHook monitorSwitchHook;
|
||||
|
||||
private static bool fullBright = false; // Debug
|
||||
|
||||
public static void LoadAssets() {
|
||||
testAtlas = TextureAtlas.FromFile(Core.content, "images/testBlocks-definition.xml");
|
||||
OfficeAtlas = TextureAtlas.FromFile(Core.content, "images/office-definition.xml");
|
||||
|
|
@ -202,7 +204,7 @@ public class UIManager {
|
|||
int stateInt = state ? 1 : 0;
|
||||
|
||||
switch ((int)dir){
|
||||
case 0:
|
||||
case 0:
|
||||
officeScreen["office_left"].SetTexture(stateInt);
|
||||
monitorScreen["p1-office-door-left"].SetTexture(stateInt);
|
||||
break;
|
||||
|
|
@ -214,7 +216,7 @@ public class UIManager {
|
|||
officeScreen["office_right"].SetTexture(stateInt);
|
||||
monitorScreen["p1-office-door-right"].SetTexture(stateInt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ChangeDoorStateOpponent(Direction dir, bool state) { // TODO: overload to avoid excessive casting
|
||||
|
|
@ -239,6 +241,7 @@ public class UIManager {
|
|||
|
||||
public static void ChangeMonitorState(bool state) {
|
||||
Screen.SetScreen(state ? ScreenTypes.CAMERAS : ScreenTypes.OFFICE);
|
||||
UpdateCameras([Client.Player.state.camera]);
|
||||
}
|
||||
|
||||
public static void ChangeMonitorStateOpponent(bool state) {
|
||||
|
|
@ -259,7 +262,7 @@ public class UIManager {
|
|||
}
|
||||
|
||||
if (camIds.Contains(Client.Player.state.camera)){
|
||||
bool lit = ClientMapManager.Get(Client.Player.state.camera).Lit;
|
||||
bool lit = ClientMapManager.Get(Client.Player.state.camera).Lit || fullBright;
|
||||
cameraView.Visible = lit;
|
||||
enemyElements.Values.Where(e => e.Visible).ToList().ForEach(e => e.Visible = false);
|
||||
ClientEnemy[] enemies = ClientEnemyManager.GetByLocation(ClientMapManager.Get(Client.Player.state.camera));
|
||||
|
|
@ -270,6 +273,13 @@ public class UIManager {
|
|||
enemyElement.Visible = true;
|
||||
enemyElement.SetTexture(lit);
|
||||
}
|
||||
|
||||
if (!lit && Client.Player.state.monitorUp && enemies.Any(e => e.TypeId == (int)EnemyType.NEKO)){
|
||||
SoundManager.StartNekoPurr();
|
||||
}
|
||||
else{
|
||||
SoundManager.StopNekoPurr();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -293,6 +303,7 @@ public class UIManager {
|
|||
Screen.SetScreen(ScreenTypes.WIN);
|
||||
Screen.DisableOverlay();
|
||||
CommandManager.AllowGameControls(false);
|
||||
SoundManager.StopAmbience();
|
||||
InputManager.AddListener(Keys.Space, DisplayMainMenu, InputTiming.PRESS, new InputListenerHook(true, true));
|
||||
}
|
||||
|
||||
|
|
@ -300,6 +311,7 @@ public class UIManager {
|
|||
Screen.SetScreen(ScreenTypes.LOSE);
|
||||
Screen.DisableOverlay();
|
||||
CommandManager.AllowGameControls(false);
|
||||
SoundManager.StopAmbience();
|
||||
InputManager.AddListener(Keys.Space, DisplayMainMenu, InputTiming.PRESS, new InputListenerHook(true, true));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue