Fix StickSpawner bug

This commit is contained in:
Sofia 2020-04-23 14:30:09 +03:00
parent 59b42a5623
commit 6835ba513c

View File

@ -52,11 +52,11 @@ public class StickSpawner : MonoBehaviour {
LastSpawnedWasCasette = false;
}
CanSpawnNew = false;
var Stick = GameObject.Instantiate(SpawnedThing, transform.position + Vector3.up * 2, Random.rotation);
var Spawned = GameObject.Instantiate(SpawnedThing, transform.position + Vector3.up * 2, Random.rotation);
if (LastSpawnedWasCasette) {
SpawnedCasette = Spawned.GetComponent<CasettePickup>();
} else {
SpawnedStick = Stick.GetComponent<Item>();
SpawnedStick = Spawned.GetComponent<Item>();
}
}