public void ActivateBomb(float damage, int row, int column) { iconBomb = prefabPools.PopIconBomb(); if (iconBomb != null) { iconBomb.PopOffStack(damage, transform, iconRow, iconColumn); } }
void GenerateIconBombPool(int quantity) { for (int currentObject = 0; currentObject < quantity; currentObject++) { GameObject instantiatedObject = gameManager.InstantiateObject(iconBombPrefab, transform, 0.0f, 30.0f, 0.0f, 1.0f, 1.0f, 1.0f); IconBomb iconBomb = instantiatedObject.GetComponent <IconBomb>(); iconBomb.prefabPools = this; iconBomb.ship = gameManager.ship; iconBomb.board = gameManager.board; iconBomb.enabled = false; stackIconBomb.Push(iconBomb); } }
public void DeactivateBomb() { iconBomb.PushOnStack(); iconBomb = null; }