public void Repair() { float amount = actor.GetMaxHealth(); amount *= repFactor; actor.GiveHealth(amount); DeliverDamage(0); }
void Start() { // Difficulty & mutators modifiers float _dF = GameObject.Find("GameManager").GetComponent<GameManager>().GetDifficultyFactor(); actor.SetMaxHealth(actor.GetMaxHealth() * _dF); damage *= _dF; // Wave progress modifiers int _wave = GameObject.Find("GameManager").GetComponent<GameManager>().GetWaveCurrent(); if ( _wave > 19 ) { actor.SetMaxHealth(actor.GetMaxHealth() * 2.5f); damage *= 2.0f; } else if ( _wave > 14 ) { actor.SetMaxHealth(actor.GetMaxHealth() * 2.0f); damage *= 1.5f; } else if ( _wave > 9 ) { actor.SetMaxHealth(actor.GetMaxHealth() * 1.5f); damage *= 1.5f; } else if ( _wave > 4 ) { actor.SetMaxHealth(actor.GetMaxHealth() * 1.5f); } evade = transform.parent.GetComponent<EvadeUnit>(); seek = transform.parent.GetComponent<SeekUnit>(); source = transform.root.GetComponentInChildren<AudioSource>(); sounds = PlayerPrefs.GetInt("sounds", 1) == 1; for ( int i = 0; i < barrels; ++i ) { guns.Add(transform.GetChild(2 + i)); transform.GetChild(2 + i).localScale *= 0.0f; } if ( hasShield ) { shield = transform.GetChild(2).GetComponent<Renderer>(); flareGain = transform.root.Find("FlareGain").GetComponent<ParticleSystem>(); flareLose = transform.root.Find("FlareLose").GetComponent<ParticleSystem>(); } StartCoroutine(EvadeAllies()); StartCoroutine(AlternateSeek()); StartCoroutine(SeekEnemies()); if ( barrels > 0 ) { StartCoroutine(AttackEnemies()); } if ( hasShield ) { StartCoroutine(HealAllies()); } if ( isBoss ) { cgBoss.alpha = 1.0f; slBoss.value = 1.0f; } if ( isRegeneration ) { StartCoroutine(SelfHealing()); } }
public string GetBaseValues() { return(actor.GetMaxHealth().ToString("##0.#") + "\n" + damage.ToString("##0.#") + "\n" + fireRate.ToString("#0.0##")); }