public override void AddSender(ActivationSender sender) { if (this.senders is null) { this.senders = new List <ActivationSender>(); } this.senders.Add(sender); }
public override void Activate(bool isValid, ActivationSender sender) { if (solved) { return; } StartCoroutine(this.DelayedActivate(isValid, sender)); }
public override void Activate(bool isValid, ActivationSender sender) { if (this.lastRespawnPoint != null) { this.lastRespawnPoint.Restore(); } this.resetPosition = sender.transform.position; this.lastRespawnPoint = sender; }
IEnumerator DelayedActivate(bool isValid, ActivationSender sender) { yield return(new WaitForSeconds(0.4f)); if (isValid == false) { this.currentActivations = 0; this.solved = false; this.errorSound.Play(); } else { this.currentActivations++; if (this.currentActivations >= this.activationsNeeded) { this.solved = true; this.solvedSound.Play(); } } }
// Ignored public override void AddSender(ActivationSender sender) { }