private void CustomActivity() { bool shouldReactivate = mAllowReactivation && this.CurrentLogicState == LogicState.Defeated && ScreenManager.CurrentScreen.PauseAdjustedSecondsSince(lastTimeDestroyed) > RegenerationTime; if (shouldReactivate) { this.CurrentLogicState = LogicState.ActiveWaiting; } if (this.CurrentLogicState == LogicState.ReturningUnits && UnitsCreatedByThis.All(unit => this.DespawnCircleInstance.CollideAgainst(unit.CircleInstance))) { for (int i = UnitsCreatedByThis.Count - 1; i >= 0; i--) { UnitsCreatedByThis[i].Destroy(); } this.CurrentLogicState = LogicState.ActiveWaiting; } }