Exemple #1
0
    // Use this for initialization
    void Start()
    {
        Player = GameObject.Find("Player").GetComponent <RPG.CharacterWieldingMagic>();

        playerSprite = GetComponent <SpriteRenderer>();
        theDM        = FindObjectOfType <DialogueManager>();
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     currentHP      = HPLevels[1];
     currentMP      = MPLevels[1];
     currentAttack  = attackLevels[1];
     currentDefense = defenseLevels[1];
     thePlayerHPMP  = FindObjectOfType <RPG.CharacterWieldingMagic>();
 }
 public void OnPointerClick(PointerEventData eventData)
 {
     RPG.CharacterWieldingMagic Player = GameObject.Find("Player").GetComponent <RPG.CharacterWieldingMagic>();
     if (Player.StudiedSpells.Contains(spell))
     {
         Player.Cast(spell, Player.Target);
     }
     else
     {
         Player.Learn(spell);
         List <RPG.Spell> list = GameObject.Find("Player").GetComponent <RPG.CharacterWieldingMagic>().StudiedSpells;
         for (int i = 0; i < inventory.transform.childCount; i++)
         {
             if (inventory.transform.GetChild(i).childCount == 0)
             {
                 transform.SetParent(inventory.transform.GetChild(i));
                 break;
             }
         }
     }
 }
 // Use this for initialization
 void Start()
 {
     player = GameObject.Find("Player").GetComponent <RPG.CharacterWieldingMagic>();
 }