Прогрессия 2
This commit is contained in:
parent
b793b79d39
commit
f37e2b5c4f
10 changed files with 67 additions and 18 deletions
|
@ -4,7 +4,8 @@ using System;
|
|||
public partial class Day : Node2D
|
||||
{
|
||||
[Export] public string NextScene;
|
||||
|
||||
[Export] public bool IsEngineDisabled = true;
|
||||
[Export] public bool IsCaptainDisabled = false;
|
||||
private enum State
|
||||
{
|
||||
Default,
|
||||
|
@ -19,6 +20,8 @@ public partial class Day : Node2D
|
|||
private AudioStreamPlayer _music;
|
||||
private AudioStreamPlayer _nightmare;
|
||||
private Interactable _endDay;
|
||||
private NPC _engine;
|
||||
private Door _captainDoor;
|
||||
|
||||
private double _transitionTimeout = 0;
|
||||
|
||||
|
@ -30,12 +33,26 @@ public partial class Day : Node2D
|
|||
_music = (AudioStreamPlayer)FindChild("Music");
|
||||
_nightmare = (AudioStreamPlayer)FindChild("Nightmare");
|
||||
_endDay = (Interactable)FindChild("EndDay");
|
||||
_engine = (NPC)FindChild("Engine");
|
||||
_captainDoor = (Door)FindChild("Door_CAPTAIN");
|
||||
_colorRect.Color = new Color(0, 0, 0, 1f);
|
||||
_music.VolumeDb = -40;
|
||||
_player.CurrentState = Player.State.Wait;
|
||||
_endDay.Disable();
|
||||
if (IsEngineDisabled) _engine.Disable();
|
||||
if (IsCaptainDisabled) _captainDoor.Disable();
|
||||
}
|
||||
|
||||
public void EnableEngine()
|
||||
{
|
||||
_engine.Enable();
|
||||
}
|
||||
|
||||
public void EnableCaptain()
|
||||
{
|
||||
_captainDoor.Enable();
|
||||
}
|
||||
|
||||
public void AssignEndDay(Player player)
|
||||
{
|
||||
player.InteractableObjects.Add(_endDay);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue