Exemple #1
0
 private void executeStateTransition()
 {
     this.clearState();
     this.CurrentState = next_state;
     this.CurrentState.onEnter();
     this.next_state = null;
 }
Exemple #2
0
    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();
    }
Exemple #3
0
 public void transitionState(JuniState state)
 {
     this.next_state = state;
 }