public virtual void RotateOffsetRotation(float offsetRotation) { if ((int)activator.GetHealthState() >= (int)HealthState.Fibrillating) { transform.Rotate(0, 0, offsetRotation); } }
public static bool Activate(IActivator activator, IActivatable activatable, Dictionary <object, object> argumentDictionary = null) { bool capable = (int)activator.GetHealthState() >= (int)HealthState.Capable; if (capable && activatable != null) { activatable.BecomeActivated(activator, argumentDictionary); } return(capable); }
/** * Checks whether the user is still functional and whether the cooldown period has ended. */ public virtual bool BecomeActivated(IActivator activator, Dictionary <object, object> argumentDictionary = null) { bool isCapable = (int)activator.GetHealthState() >= (int)HealthState.Capable; bool isReady = nextReadyTime <= Time.time; bool didActivate = false; if (isCapable && isReady) { Actuate(activator, argumentDictionary); nextReadyTime = Time.time + cooldownTimeout; didActivate = true; } return(didActivate); }
public HealthState GetHealthState() { return(activator.GetHealthState()); }