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

        DontDestroyOnLoad(gameObject);
    }