public void Propogate() { foreach (GameObject gameObjectNeighbour in HexGameObject.GetComponent <Hex>().GetNeighbours()) { if (gameObjectNeighbour.GetComponent <Hex>().ContainsEnvironmentalEffectType("Fire")) { Debug.Log("gasdf"); } else { if (Random.Range(0, 100) < GameObject.FindGameObjectWithTag("Map").GetComponent <Map>().TileType[gameObjectNeighbour.GetComponent <Hex>().ITileType].IBurnChance) { EnvironmentalEffectsManager.Instance .SpawnEnvironmentalEffect("Fire", gameObjectNeighbour); } } } }
public override void Kill() { HexGameObject.GetComponent <Hex>().BBurned = true; base.Kill(); }