private void Start() { statsComponent = GetComponent <Stats.StatsComponent>(); moveState = new ProxyNetworkWalkMoveState(); moveState.OnStateEnter(transform); }
private void Update() { if (moveState == null) { Debug.LogWarning("UpdateMoveState: No move state!"); return; } IMoveState nextState = null; nextState = moveState.StateUpdate(transform, proxyVelocity, null, ref proxyVelocity, ref proxyRotation); if (nextState != null) { moveState.OnStateExit(); moveState = nextState; moveState.OnStateEnter(transform); } }