public override void CastMechanicsForce() { Vector3 mod_transform = new Vector3(transform.position.x, transform.position.y, transform.position.z); GameObject clone = Instantiate(lightningSphere, mod_transform, transform.rotation, EnemyProjectiles).gameObject; Rigidbody RB = clone.GetComponent <Rigidbody>(); LightningSphereProjectile LSP_Script = clone.GetComponentInChildren <LightningSphereProjectile>(); RB.velocity = transform.TransformDirection(Vector3.forward * speed); LSP_Script.EnemySetup(FL, ETM); LSP_Script.GenericSetup(MaintainSpeed, dps, max_targets, max_duration, radius); clone.transform.Find("Sphere").GetComponent <SphereCollider>().isTrigger = true; }
protected override void Attack() { Vector3 mod_transform = new Vector3(transform.position.x, transform.position.y + .5f, transform.position.z); GameObject clone = Instantiate(lightningSphere, mod_transform, transform.rotation, PlayerProjectiles).gameObject; Rigidbody RB = clone.GetComponent <Rigidbody>(); LightningSphereProjectile LSP_Script = clone.GetComponentInChildren <LightningSphereProjectile>(); RB.velocity = transform.TransformDirection(Vector3.forward * speed); float turret_mode = activePerks.LightningSphereCast(); if (turret_mode > -1) { LSP_Script.GenericSetup(0f, dps * AbilityEffectMult(), max_targets, turret_mode, 10f); RB.drag = speed / 15f; } else { LSP_Script.GenericSetup(0f, dps * AbilityEffectMult(), max_targets, 8f, 10f); } }