示例#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;
                }
            }
        }
示例#2
0
 public void AddInteractiveObjectActionToLockedQueue(AInteractiveObjectAction aInteractiveObjectAction)
 {
     this.LockedBufferInteractiveObjectActionsExecuted.Push(aInteractiveObjectAction);
 }
示例#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;
 }
示例#4
0
 public InteractiveObjectActionState(AInteractiveObjectAction aInteractiveObjectActionReference, CooldownActionState cooldownActionState)
 {
     _aInteractiveObjectActionReference = aInteractiveObjectActionReference;
     CooldownActionState = cooldownActionState;
 }