Exemplo n.º 1
0
    protected override void Attack()
    {
        GameObject clone            = Instantiate(lightningBolt, SetPos(), transform.rotation, PlayerProjectiles).gameObject;
        LightningBoltProjectile LBP = clone.GetComponent <LightningBoltProjectile>();

        LBP.GenericSetup(damage, radius, delay);
    }
Exemplo n.º 2
0
    private IEnumerator attackMechanics()
    {
        for (int i = 0; i < burst_amount; i++)
        {
            Vector3 cast_pos = new Vector3(ETM.Return_Current_Target().position.x + Random.Range(-scatter_range, scatter_range), ETM.Return_Current_Target().position.y + y_adjust, ETM.Return_Current_Target().position.z + Random.Range(-scatter_range, scatter_range));

            GameObject clone            = Instantiate(lightningBolt, cast_pos, transform.rotation, EnemyProjectiles).gameObject;
            LightningBoltProjectile LBP = clone.GetComponent <LightningBoltProjectile>();
            LBP.EnemySetup(FL, ETM);
            LBP.GenericSetup(damage, radius, AttackDelay);
            yield return(new WaitForSeconds(.1f));
        }
    }