Example #1
0
    public State(Ring ring)
    {
        dragged = new DragState();
        dropped = new DropState();
        idle    = new IdleState();

        _ring = ring;
        _move = idle;
        _move.EnterState(_ring);
    }
Example #2
0
 public void ChangeMoveState(MoveState next)
 {
     if (_move == null || _move == next)
     {
         return;
     }
     _move.ExitState(_ring);
     _move = next;
     _move.EnterState(_ring);
 }
Example #3
0
 private void OnEnable()
 {
     m_Target       = FindObjectOfType <PlayerBehavior>().transform; //This should be done the other way, with player registering itself
     m_CurrentState = m_MoveState.EnterState(npc: this);
     //m_hp = GetComponent<DamagableEntity>();
 }