Example #1
0
 // 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();
 }
Example #3
0
 public void NextInsult(InsultChunk _chunk)
 {
     _insultMode     = true;
     damageText.text = "Damage: ";
     if (fullInsult != null)
     {
         fullInsult.text = "";
     }
     _germDamage = 0;
     NextInsultChunk(_chunk);
     StartChunksFalling();
 }
Example #4
0
 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");
         }
     }
 }
Example #5
0
 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();
     }
 }
Example #6
0
 public void NextInsultChunk(InsultChunk _chunk)
 {
     ClearChunks();
     _currentChunk = _chunk;
 }