Esempio n. 1
0
 // Spawn a buff button.
 void SpawnBuff(Vector3 pos)
 {
     if (cooldownBuffCurrent <= 0 && Random.Range(0, 100) < buffChance)
     {
         cooldownBuffCurrent = cooldownBuff;
         GameObject go = Instantiate(
             gameSetup.GameBuffs[Random.Range(0, gameSetup.GameBuffs.Length)],
             pos - (Vector3.forward * 0.35f), // Buff Layer
             gameSetup.GameBuffs[0].transform.rotation) as GameObject;
         GameBuffButton gbb = go.GetComponent <GameBuffButton>();
         gameBuffButtons.Add(gbb);
     }
 }
Esempio n. 2
0
 public void RemoveBuffButton(GameBuffButton gbb)
 {
     gameBuffButtons.Remove(gbb);
 }