protected override void SpawnObject() { if (TheCaster.gameObject.GetComponent <NPC>() != null || Target.GetComponent <NPC>() != null) { switch (HealingType) { case HealType.Projectile: { GameObject newProjectile = Instantiate(SkillObject, SourceLocation.position, npc.transform.rotation); newProjectile.GetComponent <Projectile>().target = Target; newProjectile.GetComponent <Projectile>().HParent = this; newProjectile.GetComponent <Projectile>().speed = speed; break; } case HealType.Strom: { SkillObject.GetComponent <ParticleCollisionInstance>().HParent = this; SkillObject.GetComponent <ParticleCollisionInstance>().Targeter = Target; break; } case HealType.LavaGround: { SkillObject.GetComponent <OffanceGroundDmg>().HskillStat = this; SkillObject.GetComponent <OffanceGroundDmg>().father = TheCaster; SkillObject.GetComponent <OffanceGroundDmg>().Duraion = Duraion; SkillObject.GetComponent <OffanceGroundDmg>().DMGTicks = DMGTick; break; } case HealType.PricingShot: { SkillObject.GetComponent <PricingProjectile>().speed = speed; SkillObject.GetComponent <PricingProjectile>().hit = EfectOnHit; SkillObject.GetComponent <PricingProjectile>().flash = SpawnParticles; SkillObject.GetComponent <PricingProjectile>().father = TheCaster; SkillObject.GetComponent <PricingProjectile>().healingStat = this; break; } case HealType.BouncingProjectile: { SkillObject.GetComponent <BouncingProjectile>().bounceTime = BouncingTimes; SkillObject.GetComponent <BouncingProjectile>().speed = speed; SkillObject.GetComponent <BouncingProjectile>().father = TheCaster; SkillObject.GetComponent <BouncingProjectile>().HealingStat = this; SkillObject.GetComponent <BouncingProjectile>().AreaOfEffect = BouncingSearchAOE; break; } case HealType.None: { SkillAbility(Target); break; } } } }
protected override void SpawnObject() { if (Target.GetComponent <Entity>() != null || npc != null) { switch (OffacneType) { case OffacneType.Projectile: { GameObject newProjectile = Instantiate(SkillObject, SourceLocation.position, TheCaster.transform.rotation); newProjectile.GetComponent <Projectile>().father = TheCaster; newProjectile.GetComponent <Projectile>().target = Target; newProjectile.GetComponent <Projectile>().Parent = this; newProjectile.GetComponent <Projectile>().speed = speed; break; } case OffacneType.Strom: { Debug.Log("this is the strom"); SkillObject.GetComponent <ParticleCollisionInstance>().Parent = this; SkillObject.GetComponent <ParticleCollisionInstance>().Targeter = Target; break; } case OffacneType.LavaGround: { SkillObject.GetComponent <OffanceGroundDmg>().DMGskillStat = this; SkillObject.GetComponent <OffanceGroundDmg>().father = TheCaster; SkillObject.GetComponent <OffanceGroundDmg>().Duraion = Duraion; SkillObject.GetComponent <OffanceGroundDmg>().DMGTicks = DMGTick; break; } case OffacneType.PricingShot: { SkillObject.GetComponent <PricingProjectile>().speed = speed; SkillObject.GetComponent <PricingProjectile>().hit = EfectOnHit; SkillObject.GetComponent <PricingProjectile>().flash = SpawnParticles; SkillObject.GetComponent <PricingProjectile>().father = TheCaster; SkillObject.GetComponent <PricingProjectile>().OffanceStat = this; break; } case OffacneType.BouncingProjectile: { SkillObject.GetComponent <BouncingProjectile>().bounceTime = BouncingTimes; SkillObject.GetComponent <BouncingProjectile>().speed = speed; SkillObject.GetComponent <BouncingProjectile>().father = TheCaster; SkillObject.GetComponent <BouncingProjectile>().offanceStat = this; SkillObject.GetComponent <BouncingProjectile>().target = Target; SkillObject.GetComponent <BouncingProjectile>().AreaOfEffect = BouncingSearchAOE; break; } case OffacneType.None: { SkillAbility(Target); break; } case OffacneType.Charge: { SkillObject.GetComponent <Charge>().father = TheCaster; SkillObject.GetComponent <Charge>().target = Target; SkillObject.GetComponent <Charge>().Parent = this; break; } } } else { Destroy(this.gameObject); } }