Esempio n. 1
0
        public static void Broadcast(AActorMessage message, Unit[] units)
        {
            ActorProxyComponent actorProxyComponent = Game.Scene.GetComponent <ActorProxyComponent>();

            foreach (Unit unit in units)
            {
                long gateSessionId = unit.GetComponent <UnitGateComponent>().GateSessionId;
                actorProxyComponent.Get(gateSessionId).Send(message);
            }
        }
Esempio n. 2
0
 public static void Broadcast(AActorMessage message)
 {
     Unit[] units = Game.Scene.GetComponent <UnitComponent>().GetAll();
     Broadcast(message, units);
 }