/** Weapon attributes from Tower-Attack * public float damage; * public float dot_rate; //rate as how many seconds between damage pulses * public float dot_length; //length as # of damage pulses * public float dot_damage; * public float slow; **/ private void Apply(GameObject source) { Tower_Attack tower = source.GetComponent <Tower_Attack>(); Damage(tower.damage); Slow(tower.slow); StartCoroutine(DamageOverTime(tower.dot_damage, tower.dot_rate, tower.dot_length)); }
/** Weapon attributes from Tower-Attack * public float damage; * public float dot_rate; //rate as how many seconds between damage pulses * public float dot_length; //length as # of damage pulses * public float dot_damage; * public float slow; **/ private void Apply(GameObject source) { GameObject.Find("Hitsound Audio Source").GetComponent <AudioSource>().PlayOneShot(hitSound, 1f); if (source.GetComponent <Tower_Attack>().isAccountant) { GetComponent <Cash_On_Death>().extra_payout = true; } Tower_Attack tower = source.GetComponent <Tower_Attack>(); Damage(tower.damage); Slow(tower.slow); StartCoroutine(DamageOverTime(tower.dot_damage, tower.dot_rate, tower.dot_length)); }
private void ApplySynergy(GameObject source) { GameObject.Find("Hitsound Audio Source").GetComponent <AudioSource>().PlayOneShot(synergySound, .7f); if (source.GetComponent <Tower_Attack>().isAccountant) { GetComponent <Cash_On_Death>().extra_payout = true; } Tower_Attack tower = source.GetComponent <Tower_Attack>(); if (tower.GetComponent <Tower_Economy>().Upgrade < 3) { Damage(tower.damage * 2); Slow(tower.slow * 2); StartCoroutine(DamageOverTime(tower.dot_damage * 1.5f, tower.dot_rate * 1.5f, tower.dot_length * 1.5f)); } else { Damage(tower.damage * 3); Slow(tower.slow * 3); StartCoroutine(DamageOverTime(tower.dot_damage * 2.25f, tower.dot_rate * 2.25f, tower.dot_length * 2.25f)); } Instantiate(Synergy_Particle, Particle_Loc); }