Example #1
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;
                }
            }
        }
Example #2
0
 public void AddInteractiveObjectActionToLockedQueue(AInteractiveObjectAction aInteractiveObjectAction)
 {
     this.LockedBufferInteractiveObjectActionsExecuted.Push(aInteractiveObjectAction);
 }
Example #3
0
 /// <summary>
 /// Called from <see cref="InteractiveObjectActionEndedCleanupSystem"/> when the <see cref="_aInteractiveObjectActionReference"/> is considered done.
 /// </summary>
 public void ClearInteractiveObjectAction()
 {
     this._aInteractiveObjectActionReference.Dispose();
     this._aInteractiveObjectActionReference = null;
 }
Example #4
0
 public InteractiveObjectActionState(AInteractiveObjectAction aInteractiveObjectActionReference, CooldownActionState cooldownActionState)
 {
     _aInteractiveObjectActionReference = aInteractiveObjectActionReference;
     CooldownActionState = cooldownActionState;
 }