Inheritance: GuiBase_Draggable
 //Removes the runes that the character has selected.
 public void OnClick()
 {
     if (UWCharacter.Instance != null)
     {
         //Debug.Log("Clearing Runes");
         UWCharacter.Instance.PlayerMagic.ActiveRunes[0] = -1;
         UWCharacter.Instance.PlayerMagic.ActiveRunes[1] = -1;
         UWCharacter.Instance.PlayerMagic.ActiveRunes[2] = -1;
         ActiveRuneSlot.UpdateRuneSlots();
     }
 }
Esempio n. 2
0
 //Removes the runes that the character has selected.
 public void OnClick()
 {
     //Debug.Log("Clearing Runes - find player");
     //UWCharacter playerUW= GameObject.Find ("Gronk").GetComponent<UWCharacter>();
     if (UWCharacter.Instance != null)
     {
         //Debug.Log("Clearing Runes");
         UWCharacter.Instance.PlayerMagic.ActiveRunes[0] = -1;
         UWCharacter.Instance.PlayerMagic.ActiveRunes[1] = -1;
         UWCharacter.Instance.PlayerMagic.ActiveRunes[2] = -1;
         ActiveRuneSlot.UpdateRuneSlots();
     }
 }
Esempio n. 3
0
 public void ClickEvent(int ptrID)
 {
     if (playerUW.PlayerMagic.PlayerRunes[SlotNumber] == false)
     {
         return;            //Slot is unfilled
     }
     else
     {
         if (ptrID == -1)
         {            //left click select the rune.
             //add the rune to the first available active slot.
             //If all the slots are in use then push the stack down.
             if (playerUW.PlayerMagic.ActiveRunes[0] == -1)
             {
                 playerUW.PlayerMagic.ActiveRunes[0] = SlotNumber;
             }
             else if (playerUW.PlayerMagic.ActiveRunes[1] == -1)
             {
                 playerUW.PlayerMagic.ActiveRunes[1] = SlotNumber;
             }
             else if (playerUW.PlayerMagic.ActiveRunes[2] == -1)
             {
                 playerUW.PlayerMagic.ActiveRunes[2] = SlotNumber;
             }
             else
             {                //No free slot. Push everything down.
                 playerUW.PlayerMagic.ActiveRunes[0] = playerUW.PlayerMagic.ActiveRunes[1];
                 playerUW.PlayerMagic.ActiveRunes[1] = playerUW.PlayerMagic.ActiveRunes[2];
                 playerUW.PlayerMagic.ActiveRunes[2] = SlotNumber;
             }
             ActiveRuneSlot.UpdateRuneSlots();
         }
         else
         {            //right click id the rune.
             UWHUD.instance.MessageScroll.Add("You see " + StringController.instance.GetSimpleObjectNameUW(232 + SlotNumber));
         }
     }
 }