示例#1
0
        public MovementComponent(Hub hub, StatsComponent stats)
        {
            this.hub = hub;

            movingTimer = new Timer(stats.MovementSpeed * 100)
            {
                AutoReset = false
            };
            movingTimer.Elapsed += HandleTimerExpired;
        }
示例#2
0
        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;
        }