public ProjectileBase CopyProjectile(float DamageReduction = 1)
    {
        ProjectileBase newProj = TowerBase.GetNewProjectile();

        newProj.gameObject.SetActive(true);
        //
        newProj.setBaseTower(tower);
        newProj.SetProjectile(target, speed, damage, areaEffect, chainCount, chainDistanceMin, chainDistanceMax, forkCount, forkProjectiles, forkDamageLoss, true, false);
        newProj.SetParticleSystems(effect, explosion);
        newProj.SpawnParticles();
        return(newProj);
    }
Example #2
0
    void ShootProjectile()
    {
        ProjectileBase shootingProjectile = GetNewProjectile();

        shootingProjectile.gameObject.SetActive(true);
        Vector3 projPos = this.transform.position;

        projPos.y += projectileYOffSet;
        shootingProjectile.transform.position = projPos;
        shootingProjectile.SetProjectile(target, projectileSpeed, attackDamage, projectileAoE, projectileChain, projectileChainDistanceMin, projectileChainDistanceMax, projectileForkCount, projectileForkProjectiles, projectileForkLoss, projectileHoming, projectileInstant);
        shootingProjectile.setBaseTower(this);
        shootingProjectile.addMobEffect(statusEffect);
        shootingProjectile.SetParticleSystems((ProjectileParticles)projectileParticles, (ProjectileParticles)projectileParticleExplosion);
        shootingProjectile.SpawnParticles();
        if (towerType == TowerTypes.Basic || towerType == TowerTypes.Earth)
        {
            shootingProjectile.killParticles = true;
        }
    }