public void RemodelingClick(int Buttonindex) { Store CurFurniture = CurStoreList.Find(x => x.Furnitureindex == Buttonindex); CurFurniture.RemodelingMagnifiaction = CurFurniture.RemodelingMagnifiaction + 1; Save(); print(CurFurniture.RemodelingMagnifiaction); }
public void LevelUpButton(int Buttonindex) { Store CurFurniture = CurStoreList.Find(x => x.Furnitureindex == Buttonindex); if (SingletonMng.instance.Money >= CurFurniture.UpgradeCost) { SingletonMng.instance.Money = SingletonMng.instance.Money - CurFurniture.UpgradeCost; CurFurniture.Level = CurFurniture.Level + 1; print(CurFurniture.Level); Save(); } // }
void Show_FurnitureLevelUpButton_UI() { for (int i = 0; i < CurStoreList.Count; i++) { Store CurFurniture = CurStoreList.Find(x => x.Furnitureindex == i); if (SingletonMng.instance.Money >= CurFurniture.UpgradeCost) { FurnitureLevelUpButton[i].sprite = FurnitureLevelUpButton_Active; } else if (SingletonMng.instance.Money < CurFurniture.UpgradeCost) { FurnitureLevelUpButton[i].sprite = FurnitureLevelUpButton_UnActive; } } }