public void Spawn() { GameObject spawnPosition = (GameObject)spawnPositions.Roll <GameObject>(); GameObject spawnMonster = (GameObject)spawnableMinions.Roll <GameObject>(); Instantiate(spawnMonster, spawnPosition.transform.position, spawnPosition.transform.rotation); }
/// <summary> /// Zap a random zappable in the list, damage it unless it has its own tablecoil. /// </summary> /// <param name="damage"></param> public void ZapSomething(float damage = 0) { if (_zappables.Count < 1) { return; } Health healthInstance = _zappables.Roll <Health>(null, NotRecentlyZapped); ZapLineEffect(new List <Health>() { healthInstance }); if (Math.Abs(damage) < .01f) { damage = _defaultDamage; } healthInstance.Damage(damage); }