Ejemplo n.º 1
0
 public void EnableRune(bool enable)
 {
     if (enable == true)
     {
         if (currentRune < runes.Length)
         {
             Debug.Log("Spawning Rune" + currentRune);
             //if I get to it, do an animation here
             shaman.Talk(false);
             shaman.Summon(true);
             StartCoroutine("FadeInAlpha", currentRune);
             currentRune++;
             Debug.Log("After Spawn Rune" + currentRune);
             dw.DecreaseWordTracker();
         }
         else
         {
             Debug.Log("CurrentRune out of bounds");
             //maybe spawn portal here?
         }
     }
     else
     {
         if (currentRune > 0)
         {
             Debug.Log("Destroying Rune" + currentRune);
             //if I get to it, do an animation here
             shaman.Talk(false);
             shaman.Summon(true);
             currentRune--;
             StartCoroutine("FadeOutAlpha", currentRune);
             Debug.Log("After Destroy Rune" + currentRune);
         }
         else
         {
             Debug.Log("CurrentRune out of bounds");
         }
     }
 }