public bool canBuildTower(TowerListRow aData) { if(usersCash>=aData._Cost) { usersCash -= aData._Cost; return true; } else { return false; } }
void getComponents() { scanner = this.GetComponent<MF_BasicScanner>(); for(int i= 0;i<TowerList.Instance.Rows.Count;i++) { if(TowerList.Instance.Rows[i]._ID==towerTypeID) { rowData = TowerList.Instance.Rows[i]; } } }
public void initTower(TowerListRow aData) { this.damage = aData._BulletDamage; this.splashRange = aData._BulletSplashRange; this.splashDamage = aData._BulletSplash; this.burstAmount = aData._BurstAmount; this.burstResetTime = aData._BurstResetTime; this.cycleTime = aData._CycleTime; this.maxRange = aData._MaxRange; this.reloadTime = aData._ReloadTime; this.shotSpeed = aData._ShotSpeed; this.shotsPerRound = aData._ShotsPerRound; }
public void initWeapon(TowerListRow aRow) { this.damage = aRow._BulletDamage; this.splashDamage = aRow._BulletSplash; this.splashRange = aRow._BulletSplashRange; this.damageInfantryMultiplier = aRow._BulletInfantryModifier; this.damageMechanicMultiplier = aRow._BulletArmorModifier; this.slowTime = aRow._BulletSlowTime; this.slowPercent = aRow._BulletSlowPercent; switch(aRow._SlowTarget) { default:this.slowType = ETargetType.None;break; case("Infantry"):this.slowType = ETargetType.Infantry;break; case("Mechanical"):this.slowType = ETargetType.Mechanical;break; case("FlyingMechanical"):this.slowType = ETargetType.FlyingMechanical;break; case("AnyMechanical"):this.slowType = ETargetType.AnyMechanical;break; } }
public void initTower(TowerListRow aTower) { shotSpeed = aTower._ShotSpeed; this.shotsPerRound = aTower._ShotsPerRound; this.burstAmount = aTower._BurstAmount; this.burstResetTime = aTower._BurstResetTime; this.cycleTime = aTower._CycleTime; this.maxRange = aTower._MaxRange; this.reloadTime = aTower._ReloadTime; this.slowPercent = aTower._BulletSlowPercent; this.slowTime = aTower._BulletSlowTime; switch(aTower._SlowTarget) { default:this.slowType = ETargetType.None;break; case("Infantry"):this.slowType = ETargetType.Infantry;break; case("Mechanical"):this.slowType = ETargetType.Mechanical;break; case("FlyingMechanical"):this.slowType = ETargetType.FlyingMechanical;break; case("AnyMechanical"):this.slowType = ETargetType.AnyMechanical;break; } }
public void initWeapon(TowerListRow aRow) { this.damage = aRow._BulletDamage; this.splashDamage = aRow._BulletSplash; this.splashRange = aRow._BulletSplashRange; }
public void initWeapon(TowerListRow aData) { ParticleCollision p = shot.GetComponent<ParticleCollision>(); p.damageToInflict = aData._BulletDamage; p.infantryDamageMultiplier = aData._BulletInfantryModifier; p.tankInfantryMultiplier = aData._BulletArmorModifier; }
public void upgradeTower(TowerListRow aNewTower) { Destroy(this.gameObject); GameManager.REF.upgradeTowerAt((GameObject) Resources.Load("WWTD/Towers/"+aNewTower._Prefab),this.transform.position); }
public void initWeapon(TowerListRow aData) { if(shot==null) { ParticleCollision pc = this.GetComponentInChildren<ParticleCollision>(); shot = pc.GetComponent<ParticleSystem>(); } ParticleCollision p = shot.GetComponent<ParticleCollision>(); p.damageToInflict = aData._BulletDamage; p.infantryDamageMultiplier = aData._BulletInfantryModifier; p.tankInfantryMultiplier = aData._BulletArmorModifier; switch(aData._SlowTarget) { default:this.slowType = ETargetType.None;break; case("Infantry"):this.slowType = ETargetType.Infantry;break; case("Mechanical"):this.slowType = ETargetType.Mechanical;break; case("FlyingMechanical"):this.slowType = ETargetType.FlyingMechanical;break; case("AnyMechanical"):this.slowType = ETargetType.AnyMechanical;break; } p.slowPercent = aData._BulletSlowPercent; p.slowTime = aData._BulletSlowTime; p.slowType = this.slowType; }