Exemplo n.º 1
0
        public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            AirControl = AirControl ?? animator.GetComponentInChildren <AirControl>();
            if (AirControl == null)
            {
                return;
            }

            if (Acceleration != UnchangedValue)
            {
                AirControl.Acceleration = Acceleration;
            }
            if (Deceleration != UnchangedValue)
            {
                AirControl.Deceleration = Deceleration;
            }
            if (TopSpeed != UnchangedValue)
            {
                AirControl.TopSpeed = TopSpeed;
            }
        }
Exemplo n.º 2
0
 public override void OnManagerAdd()
 {
     AirControl = Manager.Get <AirControl>();
 }