private void OnEnable()
    {
        currentState  = moveState;
        ballAttachPos = GameObject.Find("ballAttach");
        tail          = GameObject.Find("tail");

        start = TailRotation(angle);
        end   = TailRotation(-angle);
    }
Ejemplo n.º 2
0
    public void ChangeState(IDogState newState)
    {
        if (_currentState != null)
        {
            _currentState.Exit();
        }

        _currentState = newState;
        _currentState.Enter(this);
    }
 private void Update()
 {
     currentState = currentState.DoState(this);
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     currentState = runningState;
 }
Ejemplo n.º 5
0
 public Racetrack(IDogState dogState, IDogFactory dogFactory)
 {
     _dogState   = dogState;
     _dogFactory = dogFactory;
 }