Exemplo n.º 1
0
 public void SetState(CameraState newState)
 {
     if (state != null)
     {
         state.OnStateExit();
     }
     state = newState;
     if (state != null)
     {
         state.OnStateEnter();
     }
 }
Exemplo n.º 2
0
    public void SetState(CameraState state)
    {
        if (currentState != null)
        {
            currentState.OnStateExit();
        }

        currentState    = state;
        gameObject.name = "Camera - " + state.GetType().Name;

        if (currentState != null)
        {
            currentState.OnStateEnter();
        }
    }
Exemplo n.º 3
0
    public void SetState(CameraState state)
    {
        if (currentState != null)
        {
            currentState.OnStateExit();
        }

        currentState = state;

        if (currentState != null)
        {
            currentState.Init();
            currentState.OnStateEnter();
        }
    }