IEnumerator DelayAction() { IsActionPending = true; yield return(new WaitForSeconds(delay)); IsActionPending = false; target.Act(); }
void Update() { if (Input.GetButtonUp(ButtonName)) { Action.Act(); } }
public void Trigger() { if (action) { action.Act(); } }
public override void Act() { if (Random.Range(0, 100) <= PercentageChance) { Action.Act(); } }
IEnumerator DelayThenTick() { yield return(new WaitForSeconds(TickDelay)); Action.Act(); StartCoroutine(DelayThenTick()); }
public override void Act() { if (!used) { used = true; Action.Act(); } }
public override void Act() { if (!InCooldown) { Action.Act(); InCooldown = true; StartCoroutine(ClearCooldown()); } }
IEnumerator DelayAction(int repeatsLeft) { yield return(new WaitForSeconds(DelayBetweenActions)); target.Act(); repeatsLeft--; if (repeatsLeft > 0) { StartCoroutine(DelayAction(repeatsLeft)); } }
public override void Act() { if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)) { ShiftAction.Act(); } else { StandardAction.Act(); } }
public override void Act() { toggle = !toggle; if (toggle) { enableAction.Act(); } else { disableAction.Act(); } }
public override void Act() { Toggled = !Toggled; if (Toggled) { EnabledAction.Act(); } else { DisabledAction.Act(); } }
IEnumerator DelayAction() { yield return(new WaitForSeconds(Delay)); Action.Act(); }
IEnumerator DelayAction() { yield return(new WaitForSeconds(delay)); target.Act(); }
private void Update() { Action.Act(); }
private void Start() { Action.Act(); }
private void OnTriggerEnter(Collider other) { Action.Act(); }