コード例 #1
0
ファイル: GameManager.cs プロジェクト: andrewstarnes/wwtd
	public bool canBuildTower(TowerListRow aData) {
		if(usersCash>=aData._Cost) {
			usersCash -= aData._Cost;
			return true;
		} else {
			return false;
		}
	}
コード例 #2
0
ファイル: WWTD_Tower.cs プロジェクト: andrewstarnes/wwtd2
	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];
			}
		}
	}
コード例 #3
0
ファイル: MF_BasicWeapon.cs プロジェクト: andrewstarnes/wwtd
	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;
	}
コード例 #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;
		} 
	}
コード例 #5
0
ファイル: MF_BasicWeapon.cs プロジェクト: andrewstarnes/wwtd2
	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;
		}

	}
コード例 #6
0
	public void initWeapon(TowerListRow aRow) {
		this.damage = aRow._BulletDamage;
		this.splashDamage = aRow._BulletSplash;
		this.splashRange = aRow._BulletSplashRange;

	}
コード例 #7
0
ファイル: MF_FireWeapon.cs プロジェクト: andrewstarnes/wwtd
	public void initWeapon(TowerListRow aData) {
		ParticleCollision p = shot.GetComponent<ParticleCollision>();
		p.damageToInflict = aData._BulletDamage;
		p.infantryDamageMultiplier = aData._BulletInfantryModifier;
		p.tankInfantryMultiplier = aData._BulletArmorModifier;

	}
コード例 #8
0
ファイル: WWTD_Tower.cs プロジェクト: andrewstarnes/wwtd2
	public void upgradeTower(TowerListRow aNewTower) {
		Destroy(this.gameObject);
		GameManager.REF.upgradeTowerAt((GameObject) Resources.Load("WWTD/Towers/"+aNewTower._Prefab),this.transform.position);
	}
コード例 #9
0
ファイル: MF_FireWeapon.cs プロジェクト: andrewstarnes/wwtd2
	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;

	}