From 977086919ba3fae104153f79883e7a2347fac034 Mon Sep 17 00:00:00 2001 From: Neil Kollack Date: Sun, 24 Apr 2022 15:58:51 -0500 Subject: fix: better swing, Actor Force move, respawn sound --- Assets/Scripts/RespawnPoint.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Assets/Scripts/RespawnPoint.cs') diff --git a/Assets/Scripts/RespawnPoint.cs b/Assets/Scripts/RespawnPoint.cs index b45ece1..2a1e52e 100644 --- a/Assets/Scripts/RespawnPoint.cs +++ b/Assets/Scripts/RespawnPoint.cs @@ -8,6 +8,7 @@ public class RespawnPoint : MonoBehaviour [SerializeField] private Sprite activatedSprite; private AudioManager _audio; + private bool activated; private void Start() { @@ -16,8 +17,9 @@ public class RespawnPoint : MonoBehaviour private void OnTriggerEnter2D(Collider2D collision) { - if (collision.gameObject.tag == "Player") + if (collision.gameObject.tag == "Player" && !activated) { + activated = true; collision.gameObject.GetComponent().spawnPoint = transform.position; gameObject.GetComponent().sprite = activatedSprite; _audio.Play("Checkpoint"); -- cgit v1.2.3-70-g09d2