Exemplo n.º 1
0
        public void Add(Player player)
        {
            players.Add(player);
            RefreshGrid();

            // 기존 유저들에게 새로 생성된 플레이어 정보를 알려주기
            var packet = packetFactory.Create(player);

            broadcaster.BroadcastLazy(player.Position, packet);
        }
Exemplo n.º 2
0
        void BroadcastFoodCreate(Food food)
        {
            var packet = packetFactory.Create(food);

            broadcaster.BroadcastLazy(food.Position, packet);
        }