// Use this for initialization void Start() { _insult = GetComponent <InsultChunk> (); if (_insult == null) { _insult = gameObject.AddComponent <InsultChunk>(); } }
public void SetValues(Gradient _theGrad, float _time, float _damage, bool _multiplying, float _theDelay, InsultChunk _theChunk) { _damageRange = _theGrad; _timeOnScreen = _time; _maxDamage = _damage; _isMultiplier = _multiplying; _randStart = Random.Range(0f, _theDelay); _chunk = _theChunk; SpawnControlAnimationHItbox(); }
public void NextInsult(InsultChunk _chunk) { _insultMode = true; damageText.text = "Damage: "; if (fullInsult != null) { fullInsult.text = ""; } _germDamage = 0; NextInsultChunk(_chunk); StartChunksFalling(); }
void GatherChildInsults() { foreach (Transform _child in transform) { InsultChunk _childInsult = _child.GetComponent <InsultChunk>(); if (_childInsult != null) { _childInsults.Add(_childInsult); } else { Debug.Log("YOu have a child of an insult that is not also an insult"); } } }
public void ChosenInsult(InsultChunk _chunk, float _damageToDo) { Debug.Log(_damageToDo); if (_damageToDo != 0) { if (!_chunk.isMultiplier) { _germDamage += _damageToDo; damageText.text += " + " + ((int)_damageToDo).ToString(); } else { _germDamage *= _damageToDo; damageText.text += " x " + ((int)_damageToDo).ToString(); _currentGerm.completed = true; SelectGerm(null); EndOfInsultChain(); } } else { FailedGerm(); } }
public void NextInsultChunk(InsultChunk _chunk) { ClearChunks(); _currentChunk = _chunk; }