Ejemplo n.º 1
0
 void Start()
 {
     RestParent = this.GetComponentInParent <Transform>().parent;
     MyWeapon   = GetComponent <BaseShoot>();
     ManagedBy.Funnels.Add(this);
     ManagedBy.RestingFunnels.Add(this);
 }
Ejemplo n.º 2
0
    public bool isTowerFriendly()
    {
        if (currentTower == null)
        {
            return(false);
        }

        BaseShoot shootComponent = currentTower.GetComponent <BaseShoot>();

        if (shootComponent == null)
        {
            return(false);
        }

        return(shootComponent.shooterType == ShooterTypeEnum.FRIENDLY);
    }
Ejemplo n.º 3
0
    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();
    }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 protected void Start()
 {
     MyWeapon = GetComponent <BaseShoot>();
     base.Start();
 }