コード例 #1
0
 public PlayerComponent(AnglerGame game, Player player)
     : base(game)
 {
     DrawOrder = player == World.MainPlayer ? (int)RenderOrder.OverlayLayer : (int)RenderOrder.NPCLayer;
     Player = player;
 }
コード例 #2
0
 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);
        }