public PlayerComponent(AnglerGame game, Player player)
     : base(game)
 {
     DrawOrder = player == World.MainPlayer ? (int)RenderOrder.OverlayLayer : (int)RenderOrder.NPCLayer;
     Player = player;
 }
 public static PlayerComponent CreateAndAdd(AnglerGame game, Player player)
 {
     PlayerComponent newPlayer = new PlayerComponent(game, player);
     game.Components.Add(newPlayer);
     return newPlayer;
 }
示例#3
0
        // Init players
        private void InitializePlayers(string s)
        {
            // Parse in new players
            string[] playerParams = s.Split(',');
            Player newGuy = new Player(playerParams[0],
                int.Parse(playerParams[1]),
                int.Parse(playerParams[2]),
                int.Parse(playerParams[3]));

            GameData.players.Add(newGuy);
        }