protected override void OnUpdate(TimeSpan time) { base.OnUpdate(time); _probingInterval.Update(time); if (!_probingInterval.Passed) { return; } _probingInterval.Reset(); if (IsActive) { //detect var robotsNearMe = GetNoticedUnits(); //do something OnUnitsFound(robotsNearMe); } if (_despawnHelper == null) { var m = GetPropertyModifier(AggregateField.despawn_time); var timespan = TimeSpan.FromMilliseconds((int)m.Value); SetDespawnTime(timespan); } _despawnHelper.Update(time, this); }
protected override void OnUpdate(TimeSpan time) { base.OnUpdate(time); _despawnHelper.Update(time, this); _interval.Update(time); if (!_interval.Passed) { return; } _interval.Reset(); Task.Run(() => HealWallsInRadius()).LogExceptions(); }
protected override void OnUpdate(TimeSpan time) { _despawnHelper?.Update(time, this); base.OnUpdate(time); }