Example #1
0
    public override void castSpell()
    {
        GameObject temp;

        temp = Instantiate(spellObj, aimReticle.transform.position, Quaternion.identity);
        temp.SendMessage("SetDamage", damage);
        castRef.SendMessage("ResetCasting");
        StartCoroutine("returnCastable");
        activeCasting = false;
    }
Example #2
0
    public override void castSpell()
    {
        GameObject temp;

        direction = aimReticle.transform.position - transform.position;
        temp      = Instantiate(spellObj, aimReticle.transform.position, Quaternion.LookRotation(direction));
        temp.transform.rotation = Quaternion.LookRotation(Vector3.forward, direction);
        temp.SendMessage("SetVelocity", direction);
        temp.SendMessage("SetDamage", damage);
        castRef.SendMessage("ResetCasting");
        StartCoroutine("returnCastable");
    }
Example #3
0
    IEnumerator CircleSpawner()
    {
        GameObject temp;

        yield return(new WaitForSeconds(timerMax));

        Debug.Log(i);
        if (i == 4)
        {
            Destroy(circleArr[3]);
            castRef.SendMessage("ResetCasting");
            StartCoroutine("returnCastable");
            i = 0;
        }
        else
        {
            ++i;
            SpawnCircles(i);
        }
    }