void OnDisable() { Fireworks.SetActive(false); Confetti.SetActive(false); Stars1.SetActive(false); Stars2.SetActive(false); SlotFull.SetActive(false); AssignedSlot.SetActive(false); if (Regeneration.instance != null) { Regeneration.instance.LifeLoseAnim(); } }
void GiveRewards() { AccountDetails.instance.Save(Gold: 50); int slotNo = SphereSlotManager.instance.AssignSphere(); if (slotNo == 0) { SlotFull.SetActive(true); AssignedSlot.SetActive(false); } else { SlotFull.SetActive(false); AssignedSlot.SetActive(true); switch (slotNo) { case 1: AssignedSlot.GetComponent <RawImage>().texture = slot1; SphereSlotManager.instance.slot1._sphereProperties.gameObject.SetActive(true); break; case 2: AssignedSlot.GetComponent <RawImage>().texture = slot2; SphereSlotManager.instance.slot2._sphereProperties.gameObject.SetActive(true); break; case 3: AssignedSlot.GetComponent <RawImage>().texture = slot3; SphereSlotManager.instance.slot3._sphereProperties.gameObject.SetActive(true); break; case 4: AssignedSlot.GetComponent <RawImage>().texture = slot4; SphereSlotManager.instance.slot4._sphereProperties.gameObject.SetActive(true); break; } } }