private void executeStateTransition() { this.clearState(); this.CurrentState = next_state; this.CurrentState.onEnter(); this.next_state = null; }
private async void _die() { if (dead || Immune) { return; } GetNode <DeathParticles>("DeathParticles").Play(); GetNode <AudioStreamPlayer2D>("Audio/DiePlayer2D").Play(); this.next_state = null; this.clearState(); Sprite.Visible = false; Umbrella.Visible = false; Detector.Visible = false; this.dead = true; var timer = GetNode <Timer>("RespawnTimer"); timer.Start(); await ToSignal(timer, "timeout"); Game.respawnJuniWithWSOD(); }
public void transitionState(JuniState state) { this.next_state = state; }