private void OnEnable() { currentState = moveState; ballAttachPos = GameObject.Find("ballAttach"); tail = GameObject.Find("tail"); start = TailRotation(angle); end = TailRotation(-angle); }
public void ChangeState(IDogState newState) { if (_currentState != null) { _currentState.Exit(); } _currentState = newState; _currentState.Enter(this); }
private void Update() { currentState = currentState.DoState(this); }
// Use this for initialization void Start() { currentState = runningState; }
public Racetrack(IDogState dogState, IDogFactory dogFactory) { _dogState = dogState; _dogFactory = dogFactory; }