void Start() { controller = GetComponent <PlayerController>(); proj = controller.GetComponent <ProjectileShooting>(); fireball.icon = fireballIcon; summonArrows.icon = summonArrowsIcon; lightning.icon = lightningIcon; poisonousFumes.icon = poisonousFumesIcon; warcry.icon = warcryIcon; metallicize.icon = metallicizeIcon; berserk.icon = berserkIcon; feelNoPain.icon = feelNoPainIcon; rushdown.icon = rushdownIcon; offering.icon = offeringIcon; healingWave.icon = healingWaveIcon; sprint.icon = sprintIcon; roll.icon = rollIcon; invisibility.icon = invisibilityIcon; crescendo.icon = crescendoIcon; riposte.icon = riposteIcon; lockedTalent.icon = lockedTalentIcon; cursedBlood.icon = cursedBloodIcon; }
// Shoots a projectile in a set direction void Shoot() { // Spawn projectile at position of the tower GameObject projectile = Instantiate(Bullets, firePoint.transform.position, firePoint.transform.rotation, bulletsParent); // Get Rigidbody from ProjectileShooting ProjectileShooting bullet = projectile.GetComponent <ProjectileShooting>(); // Shooting the bullet / projectile forward bullet.Fire(transform.forward); }