Beispiel #1
0
    void ChangeState(LaserRockState newState, bool force = false)
    {
        if (this.state == LaserRockState.Away && !force)
        {
            return;
        }

        switch (newState)
        {
        case LaserRockState.Shooting:
            this.followPlayer = false;
            break;

        case LaserRockState.Following:
            this.pausedTimer  = false;
            this.followPlayer = true;
            break;
        }

        this.state = newState;
    }
Beispiel #2
0
 void ChangeState(LaserRockState newState)
 {
     ChangeState(newState, false);
 }