예제 #1
0
 private void AnimateContrabandShuttle(ShuttleAnim anim, float percent)
 {
     if (anim.Anim == null)
     {
         return;
     }
     if (percent < 1f)
     {
         ShuttleState state = anim.State;
         if (state != ShuttleState.Landing && state != ShuttleState.Idle)
         {
             anim.EnqueueState(ShuttleState.Landing);
             anim.EnqueueState(ShuttleState.Idle);
             return;
         }
     }
     else
     {
         ShuttleState state = anim.State;
         if (state == ShuttleState.Landing || state == ShuttleState.Idle)
         {
             anim.EnqueueState(ShuttleState.LiftOff);
             return;
         }
         this.RemoveStarportShuttle(anim.Starport);
     }
 }
예제 #2
0
 private void AnimateArmoryShuttle(ShuttleAnim anim)
 {
     if (anim.Anim == null || !ArmoryUtils.IsAnyEquipmentActive(Service.Get <CurrentPlayer>().ActiveArmory))
     {
         return;
     }
     anim.EnqueueState(ShuttleState.DropOff);
     anim.EnqueueState(ShuttleState.Idle);
 }
예제 #3
0
        private void AnimateShuttle(ShuttleAnim anim, float percent)
        {
            if (percent <= 0f)
            {
                this.RemoveStarportShuttle(anim.Starport);
                return;
            }
            if (anim.Anim == null)
            {
                return;
            }
            if (percent < 1f)
            {
                switch (anim.State)
                {
                case ShuttleState.None:
                    anim.EnqueueState(ShuttleState.Landing);
                    anim.EnqueueState(ShuttleState.Idle);
                    return;

                case ShuttleState.Landing:
                case ShuttleState.Idle:
                    break;

                default:
                    return;
                }
            }
            else
            {
                switch (anim.State)
                {
                case ShuttleState.None:
                    anim.EnqueueState(ShuttleState.Landing);
                    anim.EnqueueState(ShuttleState.Idle);
                    anim.EnqueueState(ShuttleState.LiftOff);
                    anim.EnqueueState(ShuttleState.Hover);
                    return;

                case ShuttleState.Landing:
                case ShuttleState.LiftOff:
                case ShuttleState.Hover:
                    break;

                case ShuttleState.Idle:
                    anim.EnqueueState(ShuttleState.LiftOff);
                    anim.EnqueueState(ShuttleState.Hover);
                    break;

                default:
                    return;
                }
            }
        }
예제 #4
0
        private void AnimateShuttle(ShuttleAnim anim, float percent)
        {
            if (percent <= 0f)
            {
                this.RemoveStarportShuttle(anim.Starport);
                return;
            }
            if (anim.Anim == null)
            {
                return;
            }
            if (percent < 1f)
            {
                ShuttleState state = anim.State;
                if (state != ShuttleState.Landing && state != ShuttleState.Idle)
                {
                    if (state == ShuttleState.None)
                    {
                        anim.EnqueueState(ShuttleState.Landing);
                        anim.EnqueueState(ShuttleState.Idle);
                    }
                }
            }
            else
            {
                switch (anim.State)
                {
                case ShuttleState.None:
                    anim.EnqueueState(ShuttleState.Landing);
                    anim.EnqueueState(ShuttleState.Idle);
                    anim.EnqueueState(ShuttleState.LiftOff);
                    anim.EnqueueState(ShuttleState.Hover);
                    break;

                case ShuttleState.Idle:
                    anim.EnqueueState(ShuttleState.LiftOff);
                    anim.EnqueueState(ShuttleState.Hover);
                    break;
                }
            }
        }