Example #1
0
 void StartChunksFalling()
 {
     foreach (InsultChunk _child in _currentChunk.ChildInsults)
     {
         GameObject    _fallingGO = (GameObject)Instantiate(fallingPrefab);
         FallingInsult _falling   = _fallingGO.GetComponent <FallingInsult>();
         _child.AssignValues(_falling);
         AssignLocation(_falling);
     }
 }
Example #2
0
    void AssignLocation(FallingInsult _fallInsult)
    {
        int _rand = Random.Range(0, _availableSlots.Count);

        _insults [_availableSlots[_rand]] = _fallInsult;
        float _screenUnit = Screen.width / 8;

        _fallInsult.transform.SetParent(canvas.transform, false);
        _fallInsult.transform.position = new Vector3(_screenUnit * (_availableSlots[_rand] + 1), Screen.height, 0);
        _fallInsult.SetText(_letters [_availableSlots [_rand]]);
        _availableSlots.Remove(_availableSlots[_rand]);
    }
Example #3
0
 public void AssignValues(FallingInsult _falling)
 {
     _falling.SetValues(damageRange, onScreenTime, maxDamage, isMultiplier, delayMax, this);
 }