Beispiel #1
0
        public void Add <T>(T actor) where T : IActor
        {
            var actorSpeed = new ActorEnergy {
                Actor = actor
                , AccumulatedEnergy = actor.Speed
            };

            actorPriorityQueue.Add(actorSpeed);
        }
Beispiel #2
0
        public void Register <T>(T actor) where T : IActor
        {
            var actorSpeed = new ActorEnergy {
                Actor = actor
                , AccumulatedEnergy = 0
            };

            actors.Add(actorSpeed);
            actorPriorityQueue.Add(actorSpeed);
        }
Beispiel #3
0
 internal void Add(ActorEnergy actor)
 {
     queue.Add(actor);
 }