Пример #1
0
 private void LevelUp(RSLevel lvl)
 {
     // message the level up with particles, audio and chatbox message
     audioSource.PlayOneShot(levelingClip);
     levelingParticles.Play();
     Chatbox.Instance.UpdateChatbox("<color=yellow>You reached level " + lvl.lvl + " in " + lvl.lvlName + "</color>");
 }
Пример #2
0
        // display the xp raise up the screen
        public void ExperienceDrop(int amount, RSLevel lvl)
        {
            // restart the timer
            inactivityTimer = 0;

            // turn on the ring at top of screen
            lvlRing.SetActive(true);

            // out variables
            int needed    = 0;
            int remainder = 0;
            int lvlXP     = 0;

            // get the needed variables from the xp table
            xpTable.CalculateNextLvl(lvl.xp, out remainder, out lvlXP, out needed);
            // get the 0 to 1 of the current progress to the next lvl and set the fill amount of the image
            lvlProgressImage.fillAmount = Mathf.InverseLerp(needed - lvlXP, 0, remainder);
            // update the raising text
            xpText.text = "+" + amount + " xp";
            // start moving the text
            StartCoroutine(MoveText());

            // populate the hover box text
            levelText.text     = lvl.lvlName + ": " + lvl.lvl;
            currentXPText.text = "Current XP: " + lvl.xp;
            nextLevelText.text = "Next Level: " + needed;
            remainderText.text = "Remainder: " + remainder;
        }
Пример #3
0
 private void StrengthLvlGained(RSLevel lvl)
 {
     StrengthUIUpdate();
 }
Пример #4
0
 private void MiningLvlGained(RSLevel lvl)
 {
     MiningUIUpdate();
 }