void Start() { RestParent = this.GetComponentInParent <Transform>().parent; MyWeapon = GetComponent <BaseShoot>(); ManagedBy.Funnels.Add(this); ManagedBy.RestingFunnels.Add(this); }
public bool isTowerFriendly() { if (currentTower == null) { return(false); } BaseShoot shootComponent = currentTower.GetComponent <BaseShoot>(); if (shootComponent == null) { return(false); } return(shootComponent.shooterType == ShooterTypeEnum.FRIENDLY); }
public void handleUpgrade(GameObject tower) { BaseTowerHealth towerHealthComponent = tower.GetComponent <BaseTowerHealth>(); BaseShoot towerShootComponent = tower.GetComponent <BaseShoot>(); if (towerHealthComponent != null) { towerHealthComponent.multiplyHealth(2); } if (towerShootComponent != null) { towerShootComponent.damage *= 2; } setUIElements(); }
// Start is called before the first frame update protected void Start() { MyWeapon = GetComponent <BaseShoot>(); base.Start(); }