// Use this for initialization void Start() { exp = 0; timeForEXP = 0.0f; expToNextLvl = 100; killEnemy = false; attribute = gameObject.GetComponent <playerAttributes>(); level = 1; maxLevel = 25; }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }