public override void RollBack() { if (activatedGenPoints.Count > 0) { GenPoint acGenPoint = activatedGenPoints.Pop(); if (this == acGenPoint) { Activate(); } } base.RollBack(); }
protected void TurnOff() { if (deactiv != this) { GenPoint preDeactiv = deactiv; deactiv = this; if (preDeactiv != null) { preDeactiv.Activate(); } transform.Find("Sprite").GetComponent <SpriteRenderer>().color = Color.gray; } }
protected void TurnOn() { if (activatingGenPoint != this) { GenPoint preActivate = activatingGenPoint; activatingGenPoint = this; if (preActivate != null) { preActivate.Deactivate(); } transform.Find("Sprite").GetComponent <SpriteRenderer>().color = Color.white; } }