public MovementComponent(Hub hub, StatsComponent stats) { this.hub = hub; movingTimer = new Timer(stats.MovementSpeed * 100) { AutoReset = false }; movingTimer.Elapsed += HandleTimerExpired; }
public AttackComponent(Hub simulationHub, StateComponent state, StatsComponent stats) { hub = simulationHub; this.state = state; this.stats = stats; attackingTimer = new Timer(stats.AttackSpeed * 100) { AutoReset = false }; attackingTimer.Elapsed += HandleTimerExpired; }