Beispiel #1
0
    public static StateAlert getInstance()
    {
        if (instance == null)
        {
            instance = new StateAlert();
        }

        return(instance);
    }
Beispiel #2
0
    private StateAlert()
    {
        if (_instance != null)
        {
            return;
        }

        _instance = this;
    }
Beispiel #3
0
 private Enemy()
 {
     _stateMachine = new StateMachine <Enemy>(this);
     _stateMachine.CurrentState = StateAlert.getInstance();
 }