예제 #1
0
 public void save()
 {
     Bullet.PlayerMaster.Instance.Money        = myItems.Getmoney();
     Bullet.PlayerMaster.Instance.Inventory    = Inventory;
     Bullet.PlayerMaster.Instance.Workers      = worker;
     Bullet.PlayerMaster.Instance.FarmDataSave = FarmData;
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        myItems   = new PlayerItems(Bullet.PlayerMaster.Instance.Money);
        worker    = Bullet.PlayerMaster.Instance.Workers;
        Inventory = Bullet.PlayerMaster.Instance.Inventory;
        UIfunctions UIfunct = functionsUI.GetComponent <UIfunctions>();

        for (int ID = 0; ID < Inventory.Count; ID++)
        {
            functionsUI.GetComponent <UIfunctions>().SetUIElement(Inventory[ID].getamount(), ID, Inventory[ID].isactive());
        }
        //money is a fill bar

        UIfunct.AddWorker(worker);
        UIfunct.AddMoney(myItems.Getmoney());
    }