Exemplo n.º 1
0
 private void SetMapEnemy(MapEnemy mapEnemy)
 {
     _mapEnemy  = mapEnemy;
     _enemyData = EnemyData.GetEnemy(mapEnemy.GetEnemyID());
     SetSpriteID(_enemyData.SpriteID);
     SetRealPosition();
     SetYFrame((int)_mapEnemy.Direction);
 }
Exemplo n.º 2
0
        private void OnAddMapEnemy(MapEnemy mapEnemy, int index)
        {
            ServerCommand serverCommand = new ServerCommand(ServerCommand.CommandType.AddMapEnemy);

            serverCommand.SetParameter("EnemyID", mapEnemy.GetEnemyID());
            serverCommand.SetParameter("MapID", _mapID);
            serverCommand.SetParameter("MapX", mapEnemy.MapX);
            serverCommand.SetParameter("MapY", mapEnemy.MapY);
            serverCommand.SetParameter("OnBridge", mapEnemy.OnBridge);

            for (int i = 0; i < _clients.Count; i++)
            {
                _clients[i].AddServerCommand(serverCommand);
            }
        }