Exemplo n.º 1
0
 //constructors
 public Player()
 {
     name      = GetPlayerName();
     balance   = 20;
     inventory = new Inventory();
     inventory.AddInitialInventory();
     recipe = new Recipe(inventory);
 }
Exemplo n.º 2
0
        public Player(int saveID)
        {
            Connection.Load(saveID);
            name    = Connection.playerName;
            balance = Connection.balance;

            inventory = new Inventory();
            inventory.AddInitialInventory();
            recipe = new Recipe(inventory);

            inventory.lemons.stock            = Connection.lemonStock;
            inventory.lemons.unitProportion   = Connection.lemonProp;
            inventory.sugar.stock             = Connection.sugarStock;
            inventory.sugar.unitProportion    = Connection.sugarProp;
            inventory.iceCubes.stock          = Connection.iceStock;
            inventory.iceCubes.unitProportion = Connection.iceProp;
            inventory.cups.stock = Connection.cupStock;
        }