コード例 #1
0
        /// <summary>
        /// Creates an entirely new player.
        /// </summary>
        public static void CreateNewPlayer()
        {
            Player = new PlayerTrader(null, new Balance());
            Inventory inventory = new Inventory(Player);

            Player.Inventory = inventory;

            //Give the player the default starting money:
            Player.Balance.Deposit(250);
        }
コード例 #2
0
ファイル: SaveFile.cs プロジェクト: MeisterOfPizza/Galaxies
        public void Load_Player()
        {
            Load_PlayerShipTemplates();

            PlayerTrader trader    = new PlayerTrader(null, new Balance(PlayerTrader.PlayerBalance));
            Inventory    inventory = new Inventory(trader);

            trader.Inventory = inventory;

            PlayerController.AssignNewTrader(trader);

            foreach (var item in PlayerTrader.PlayerInventory.Items)
            {
                inventory.AddItem(item.GetItem(inventory));
            }
        }
コード例 #3
0
 public static void AssignNewTrader(PlayerTrader trader)
 {
     Player = trader;
 }