Code refactor, added coins chests, key chest and door

This commit is contained in:
2023-06-22 13:58:20 +03:00
parent 30a51d96f7
commit b2cf8fde92
18 changed files with 359 additions and 63 deletions
+14
View File
@@ -0,0 +1,14 @@
using UnityEngine;
public class KeyChest : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collider)
{
var player = collider.GetComponent<Player>();
if (player != null)
{
player.SetKey();
Destroy(gameObject);
}
}
}