internal void EndUnlocking(ControllerChest controller) { for (int i = 0; i < chestsList.Count; i++) { if (chestsList[i].GetInstanceID() == controller.GetInstanceID()) { chestsList[i].ReleaseSlot(); } } }
internal void StartUnlocking(ControllerChest controller) { foreach (ControllerChest chest in chestsList) { if (chest.GetInstanceID() != controller.GetInstanceID()) { chest.Hold(); } } }
private void LoadChest(int randomChest) { Chest Randomchest = new Chest(randomChest); Debug.Log("ChestType: " + Randomchest.Type + " Coins: " + Randomchest.coins + " Gems: " + Randomchest.gems); GameObject Loot = ServicePool.Instance.GetItem(); Loot.SetActive(true); ControllerChest controllerChest = Loot.GetComponent <ControllerChest>(); controllerChest.InitializeValues(Randomchest); chestsList.Add(controllerChest); }