Fix DestrictibleWall variable names

This commit is contained in:
Denis-Cosmin Nutiu 2019-08-31 11:45:22 +03:00
parent 641a8bc46d
commit 362435fc70

View file

@ -11,14 +11,14 @@ namespace src.Wall
private bool _spawnExit; private bool _spawnExit;
private bool _spawnUpgrade; private bool _spawnUpgrade;
private UpgradeManager _upgradeManager; private UpgradeManager _upgradeManager;
private GameObject explosionPrefab; private GameObject _explosionPrefab;
private GameObject exitDoorPrefab; private GameObject _exitDoorPrefab;
private void Start() private void Start()
{ {
_upgradeManager = GameManager.instance.GetUpgradeManager(); _upgradeManager = GameManager.instance.GetUpgradeManager();
explosionPrefab = PrefabAtlas.BombExplosion; _explosionPrefab = PrefabAtlas.BombExplosion;
exitDoorPrefab = PrefabAtlas.ExitDoor; _exitDoorPrefab = PrefabAtlas.ExitDoor;
} }
public void SpawnsExit() public void SpawnsExit()
@ -38,11 +38,11 @@ namespace src.Wall
{ {
var currentPosition = transform.position; var currentPosition = transform.position;
Destroy(GetComponent<SpriteRenderer>()); Destroy(GetComponent<SpriteRenderer>());
Instantiate(explosionPrefab, currentPosition, Quaternion.identity); Instantiate(_explosionPrefab, currentPosition, Quaternion.identity);
if (_spawnExit) if (_spawnExit)
{ {
DebugHelper.LogInfo($"Destructible spawned exit {transform.position}"); DebugHelper.LogInfo($"Destructible spawned exit {transform.position}");
Instantiate(exitDoorPrefab, currentPosition, Quaternion.identity); Instantiate(_exitDoorPrefab, currentPosition, Quaternion.identity);
} }
else if (_spawnUpgrade) else if (_spawnUpgrade)
{ {