void PatternClear()
 {
     level++;
     Spell.SendMessage("PatternFinish");
     Spell2.SendMessage("PatternFinish");
     gameObject.GetComponent <BoxCollider2D>().enabled = false;
     Invoke("PatternRelpace", 2.0f);
 }
Exemple #2
0
 void SpellRun(bool runFirst)
 {
     Debug.Log("Pattern Start");
     started = true;
     if (runFirst)
     {
         Spell.SendMessage("PatternStart", Launchers);
         Spell2.SendMessage("PatternStart", Launchers);
     }
     else
     {
         Spell3.SendMessage("PatternStart", Launchers);
         Spell4.SendMessage("PatternStart", Launchers);
     }
 }
    void SpellShot()
    {
        int[] rand = new int[2];
        gameObject.GetComponent <BoxCollider2D>().enabled = true;
        rand[0] = Random.Range(0, SpellLev.Length);
        rand[1] = Random.Range(0, SpellLev.Length);
        while (rand[0] == rand[1])
        {
            rand[1] = Random.Range(0, 7);
        }

        Spell  = SpellLev[rand[0]];
        Spell2 = SpellLev[rand[1]];
        Spell.SendMessage("PatternStart", Launchers);
        Spell2.SendMessage("PatternStart", Launchers);
    }
Exemple #4
0
    IEnumerator SpellClear()
    {
        if (!Level)
        {
            Spell.SendMessage("PatternFinish");
            Spell2.SendMessage("PatternFinish");
            Level = true;
        }
        else
        {
            Spell3.SendMessage("PatternFinish");
            Spell4.SendMessage("PatternFinish");
        }
        gameObject.GetComponent <BoxCollider2D>().enabled = false;
        yield return(new WaitForSeconds(2));

        gameObject.GetComponent <BoxCollider2D>().enabled = true;
        Debug.Log("Pattern Cleared");
        started = false;
    }