added Enemy
This commit is contained in:
@@ -2,10 +2,24 @@ using UnityEngine;
|
||||
|
||||
public class Player : Character
|
||||
{
|
||||
|
||||
|
||||
private int _totalCoins = 0;
|
||||
private bool _hasKey = false;
|
||||
public static Player Instance { get; private set; }
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
if (Instance != null)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
Debug.Log("There's more than one player instance");
|
||||
return;
|
||||
}
|
||||
PlayerPrefs.SetString("lastExitName", string.Empty);
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
|
||||
public void AddCoin()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user