/// <summary> /// Fires the attack event. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void _attack_timer_Tick(object sender, object e) { var miliseconds = rand.Next(500 - AttackSpeed, 1000 - AttackSpeed); _timer.Interval = new TimeSpan(0, 0, 0, 0, miliseconds); UnitAttack?.Invoke(this, Attack, UnitType, Team); }