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

            return(true);
        }
Exemple #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;
                }
            }
        }
Exemple #3
0
 public float GetCooldownPercentageOfInteractiveObjectAction(string actionUniqueId)
 {
     this.InteractiveObjectActionStates.TryGetValue(actionUniqueId, out InteractiveObjectActionState InteractiveObjectActionState);
     return(InteractiveObjectActionState.Get01CooldownCompletion());
 }
Exemple #4
0
 public AInteractiveObjectAction GetPlayingInteractiveObjectActionReference(string actionUniqueId)
 {
     this.InteractiveObjectActionStates.TryGetValue(actionUniqueId, out InteractiveObjectActionState InteractiveObjectActionState);
     return(InteractiveObjectActionState.GetInteractiveObjectActionReference());
 }
Exemple #5
0
 private void InternalLateTick(float d, InteractiveObjectActionState interactiveObjectActionState)
 {
     interactiveObjectActionState.GetInteractiveObjectActionReference()?.LateTick(d);
 }
Exemple #6
0
 private void InternalTickTimeFrozen(float d, InteractiveObjectActionState interactiveObjectActionState)
 {
     interactiveObjectActionState.GetInteractiveObjectActionReference()?.TickTimeFrozen(d);
 }
Exemple #7
0
 private void InternalAfterTicks(float d, InteractiveObjectActionState interactiveObjectActionState)
 {
     interactiveObjectActionState.GetInteractiveObjectActionReference()?.AfterTicks(d);
 }