Beispiel #1
0
 void RenderBasicItemConsumedByPentagram(BasicItem item)
 {
     if (item.GetComponentInChildren <Light>())
     {
         item.GetComponentInChildren <Light>().color = activatedColor;
     }
     item.GetComponent <BoxCollider>().enabled          = false;
     item.GetComponent <IsometricObject>().TargetOffset = -290;
 }
 public void Drop(int slot)
 {
     GameObject.Find("slotText" + (slot)).GetComponent <Text>().text         = "Empty";
     GameObject.Find("slotBackground" + (slot)).GetComponent <Image>().color = currentSlotColor;
     mySlot = InventoryList[slot - 1];
     mySlot.GetComponent <Transform>().position         = new Vector3(playerObject.position.x, playerObject.position.y, 0f);
     mySlot.GetComponentInChildren <Renderer>().enabled = true;
     mySlot.GetComponent <BasicItem>().velocity         = playerObject.GetComponent <Player>().velocity;
     //InventoryList.Remove(mySlot);
     InventoryList[slot - 1] = null;
 }