Auto stash before revert of "Merge remote-tracking branch 'origin/main' into main"

This commit is contained in:
Rizvee committed 2022-02-26 01:53:09 -06:00
1 parent e3bfa843e5
commit d49638100e
2 files changed
+12 -49

No files matched your search

+11 -1
View File
@@ -9,6 +9,9 @@ public class SpawnTrigger : Trigger
[SerializeField] Vector2 startPos;
private GameObject clone;
private bool spawned;
[SerializeField] bool respawns = false;
[SerializeField] float respawnTime = 3f;
private float elapsed = 0f;
@@ -21,10 +24,17 @@ public class SpawnTrigger : Trigger
this.gameObject.SetActive(false);
}
public override void Action() {
if(!spawned) {
if(!spawned && !respawns) {
Debug.Log("spawn");
StartCoroutine(SpawnDespawn());
}
else if(respawns) {
if(elapsed < respawnTime) {
elapsed = 0;
StartCoroutine(SpawnDespawn());
}
}
}
// Start is called before the first frame update