public State(Ring ring) { dragged = new DragState(); dropped = new DropState(); idle = new IdleState(); _ring = ring; _move = idle; _move.EnterState(_ring); }
public void ChangeMoveState(MoveState next) { if (_move == null || _move == next) { return; } _move.ExitState(_ring); _move = next; _move.EnterState(_ring); }
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>(); }