public bool DoesCurrentActionAllowsMovement() { foreach (var InteractiveObjectActionState in InteractiveObjectActionStates.Values) { var InteractiveObjectActionRef = InteractiveObjectActionState.GetInteractiveObjectActionReference(); if (InteractiveObjectActionRef != null && !InteractiveObjectActionRef.MovementAllowed()) { return(false); } } return(true); }
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; } } }
public float GetCooldownPercentageOfInteractiveObjectAction(string actionUniqueId) { this.InteractiveObjectActionStates.TryGetValue(actionUniqueId, out InteractiveObjectActionState InteractiveObjectActionState); return(InteractiveObjectActionState.Get01CooldownCompletion()); }
public AInteractiveObjectAction GetPlayingInteractiveObjectActionReference(string actionUniqueId) { this.InteractiveObjectActionStates.TryGetValue(actionUniqueId, out InteractiveObjectActionState InteractiveObjectActionState); return(InteractiveObjectActionState.GetInteractiveObjectActionReference()); }
private void InternalLateTick(float d, InteractiveObjectActionState interactiveObjectActionState) { interactiveObjectActionState.GetInteractiveObjectActionReference()?.LateTick(d); }
private void InternalTickTimeFrozen(float d, InteractiveObjectActionState interactiveObjectActionState) { interactiveObjectActionState.GetInteractiveObjectActionReference()?.TickTimeFrozen(d); }
private void InternalAfterTicks(float d, InteractiveObjectActionState interactiveObjectActionState) { interactiveObjectActionState.GetInteractiveObjectActionReference()?.AfterTicks(d); }