public static void Item(Packet _packet) { int id = _packet.ReadInt(); int itemNumber = _packet.ReadInt(); gameItem item = GameManager.instance.gameItems[id].GetComponentInChildren <gameItem>(); if (itemNumber < 6) { inventory.instance.Add(item.item); } else if (itemNumber == 6) { EquipmentInventory.instance.Add(item.item); ClientSend.AddEffects(4); } else if (itemNumber == 7) { EquipmentInventory.instance.Add(item.item); ClientSend.AddEffects(8); } else if (itemNumber == 8) { EquipmentInventory.instance.Add(item.item); ClientSend.AddEffects(12); } }
public void WaitSpeed() { ClientSend.AddEffects(3); tekst2.SetActive(true); inventory.instance.Remove(Item); TextCounterSpeed.instance.Start(); TextCounterSpeed.instance.Update(); Invoke("Speedy", seconds); }
public void WaitJump() { ClientSend.AddEffects(1); tekst.SetActive(true); inventory.instance.Remove(Item); TextCounterJump.instance.Start(); TextCounterJump.instance.Update(); Invoke("Jumpy", seconds); }
public void GetHealth() { if (HealthBar.instance.currentHealth >= 100) { WaitMaxHealth(); return; } else { ClientSend.AddEffects(5); if (HealthBar.instance.currentHealth >= 100) { HealthBar.instance.currentHealth = 100; } inventory.instance.Remove(Item); } }