Пример #1
0
        public bool DoesCurrentActionAllowsMovement()
        {
            foreach (var InteractiveObjectActionState in InteractiveObjectActionStates.Values)
            {
                var InteractiveObjectActionRef = InteractiveObjectActionState.GetInteractiveObjectActionReference();
                if (InteractiveObjectActionRef != null && !InteractiveObjectActionRef.MovementAllowed())
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #2
0
        public void Execute(AInteractiveObjectAction aInteractiveObjectAction)
        {
            if (this._interactiveObjectActionExecutionLockSystem.AreInteractiveObjectActionsLocked())
            {
                this._interactiveObjectActionExecutionLockSystem.AddInteractiveObjectActionToLockedQueue(aInteractiveObjectAction);
            }
            else
            {
                if (!this.InteractiveObjectActionStates.ContainsKey(aInteractiveObjectAction.InteractiveObjectActionUniqueID))
                {
                    this.InteractiveObjectActionStates[aInteractiveObjectAction.InteractiveObjectActionUniqueID] = new InteractiveObjectActionState();
                }

                var InteractiveObjectActionState = this.InteractiveObjectActionStates[aInteractiveObjectAction.InteractiveObjectActionUniqueID];

                if (!InteractiveObjectActionState.IsInteractiveObjectActionOnCooldown() && !InteractiveObjectActionState.IsInteractiveObjectActionCurrentlyRunning())
                {
                    InteractiveObjectActionState = new InteractiveObjectActionState(aInteractiveObjectAction, new CooldownActionState(aInteractiveObjectAction.CoreInteractiveObjectActionDefinition));
                    InteractiveObjectActionState.GetInteractiveObjectActionReference().FirstExecution();
                    this.InteractiveObjectActionStates[aInteractiveObjectAction.InteractiveObjectActionUniqueID] = InteractiveObjectActionState;
                }
            }
        }
Пример #3
0
 public AInteractiveObjectAction GetPlayingInteractiveObjectActionReference(string actionUniqueId)
 {
     this.InteractiveObjectActionStates.TryGetValue(actionUniqueId, out InteractiveObjectActionState InteractiveObjectActionState);
     return(InteractiveObjectActionState.GetInteractiveObjectActionReference());
 }
Пример #4
0
 private void InternalLateTick(float d, InteractiveObjectActionState interactiveObjectActionState)
 {
     interactiveObjectActionState.GetInteractiveObjectActionReference()?.LateTick(d);
 }
Пример #5
0
 private void InternalTickTimeFrozen(float d, InteractiveObjectActionState interactiveObjectActionState)
 {
     interactiveObjectActionState.GetInteractiveObjectActionReference()?.TickTimeFrozen(d);
 }
Пример #6
0
 private void InternalAfterTicks(float d, InteractiveObjectActionState interactiveObjectActionState)
 {
     interactiveObjectActionState.GetInteractiveObjectActionReference()?.AfterTicks(d);
 }