public CooldownActionState(CoreInteractiveObjectActionDefinition coreInteractiveObjectActionDefinition) { this.CooldownFeatureEnabled = coreInteractiveObjectActionDefinition.CooldownEnabled; this.TargetCooldownTime = 0f; if (this.CooldownFeatureEnabled) { TargetCooldownTime = coreInteractiveObjectActionDefinition.interactiveObjectActionCooldownDefinition.CoolDownTime; } CurrentTimeElapsed = 0f; }
/// <summary> /// /// /!\ <see cref="AInteractiveObjectAction"/> instances must not be created with it's constructor, it must be called from the <see cref="PlayerActionInherentData"/> workflow <see cref="PlayerActionInherentData.BuildPlayerAction"/> /// </summary> protected AInteractiveObjectAction(CoreInteractiveObjectActionDefinition coreInteractiveObjectActionDefinition) { this.CoreInteractiveObjectActionDefinition = coreInteractiveObjectActionDefinition; this.IsAborted = false; }