Beispiel #1
0
    IEnumerator CastNova()
    {
        GameObject          caster = Instantiate(Resources.Load("caste"), transform.position + transform.up * 0.4f, transform.rotation) as GameObject;
        CastAnimScriptEnemy anms   = caster.GetComponent(typeof(CastAnimScriptEnemy)) as CastAnimScriptEnemy;

        anms.howtime = 1f;
        anms.player  = gameObject;
        yield return(new WaitForSeconds(.75f));

        isParryable = true;
        yield return(new WaitForSeconds(.25f));

        isParryable = false;
        GameObject spell = Instantiate(Resources.Load("EnemySpells/VOD_Caster_Nova")) as GameObject;
        Spell      ps    = spell.GetComponent(typeof(Spell)) as Spell;

        ps.caster = gameObject;
        yield return(new WaitForSeconds(0.1f));

        StartCoroutine(FloatInDirection("Back"));
        yield return(new WaitForSeconds(0.1f));

        StartCoroutine(FloatInDirection("Back"));
        yield return(new WaitForSeconds(0.5f));

        CAST = true;
    }
Beispiel #2
0
    IEnumerator CastSpell2()
    {
        GameObject          caster = Instantiate(Resources.Load("caste"), transform.position + transform.up * 0.4f, transform.rotation) as GameObject;
        CastAnimScriptEnemy anms   = caster.GetComponent(typeof(CastAnimScriptEnemy)) as CastAnimScriptEnemy;

        anms.howtime = 0.5f;
        anms.player  = gameObject;
        yield return(new WaitForSeconds(0.5f));

        CastSpell(2);
    }
Beispiel #3
0
    IEnumerator CastHeal()
    {
        //hitcollider.enabled = false;
        // cast spear
        GameObject          caster = Instantiate(Resources.Load("caste"), transform.position + transform.up * 0.4f, transform.rotation) as GameObject;
        CastAnimScriptEnemy anms   = caster.GetComponent(typeof(CastAnimScriptEnemy)) as CastAnimScriptEnemy;

        anms.howtime = 1f;
        anms.player  = gameObject;
        yield return(new WaitForSeconds(1f));

        GameObject spell = Instantiate(Resources.Load("Spells/46")) as GameObject;
        S46        ps    = spell.GetComponent(typeof(S46)) as S46;

        ps.caster = gameObject;
        yield return(new WaitForSeconds(1f));

        CAST = true;
    }
Beispiel #4
0
    IEnumerator CastLightning()
    {
        hitcollider.enabled = false;
        // cast lightning
        GameObject          caster = Instantiate(Resources.Load("caste"), transform.position + transform.up * 0.4f, transform.rotation) as GameObject;
        CastAnimScriptEnemy anms   = caster.GetComponent(typeof(CastAnimScriptEnemy)) as CastAnimScriptEnemy;

        anms.howtime = 1f;
        anms.player  = gameObject;
        yield return(new WaitForSeconds(.75f));

        isParryable = true;
        yield return(new WaitForSeconds(0.25f));

        isParryable = false;
        GameObject spell = Instantiate(Resources.Load("EnemySpells/GiantLightning")) as GameObject;
        Spell      ps    = spell.GetComponent(typeof(Spell)) as Spell;

        ps.caster = gameObject;
        yield return(new WaitForSeconds(2f));

        CAST = true;
    }