Exemplo n.º 1
0
	public bool canBuildTower(TowerListRow aData) {
		if(usersCash>=aData._Cost) {
			usersCash -= aData._Cost;
			return true;
		} else {
			return false;
		}
	}
Exemplo n.º 2
0
	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];
			}
		}
	}
Exemplo n.º 3
0
	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;
	}
Exemplo n.º 4
0
	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;
		} 
	}
Exemplo n.º 5
0
	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;
		}

	}
Exemplo n.º 6
0
	public void initWeapon(TowerListRow aRow) {
		this.damage = aRow._BulletDamage;
		this.splashDamage = aRow._BulletSplash;
		this.splashRange = aRow._BulletSplashRange;

	}
Exemplo n.º 7
0
	public void initWeapon(TowerListRow aData) {
		ParticleCollision p = shot.GetComponent<ParticleCollision>();
		p.damageToInflict = aData._BulletDamage;
		p.infantryDamageMultiplier = aData._BulletInfantryModifier;
		p.tankInfantryMultiplier = aData._BulletArmorModifier;

	}
Exemplo n.º 8
0
	public void upgradeTower(TowerListRow aNewTower) {
		Destroy(this.gameObject);
		GameManager.REF.upgradeTowerAt((GameObject) Resources.Load("WWTD/Towers/"+aNewTower._Prefab),this.transform.position);
	}
Exemplo n.º 9
0
	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;

	}