예제 #1
0
    private void UpdateUI()
    {
        string t = "";

        if (PersistentVariable.Get("quests.cat.state", 0f) == 0f)
        {
            t = "Talk to Lady Pirate in the village.";
        }
        else if (PersistentVariable.Get("quests.cat.state", 0f) == 1f)
        {
            t = "Find Kitty and take her back to Lady Pirate.";
        }
        else if (PersistentVariable.Get("quests.dragon.state", 0f) == 0f)
        {
            t = "Talk to Lady Pirate.";
        }
        else if (PersistentVariable.Get("quests.dragon.state", 0f) == 1f)
        {
            t = "Kill the Queen Micro Dragon (large orange one).";
        }

        if (t == "")
        {
            _visible = false;
            questText.gameObject.SetActive(_visible);
            questButton.enabled = false;
        }
        else
        {
            questText.text = t;
        }
    }
예제 #2
0
    void Awake()
    {
        PersistentVariable.Clear();

        GameObject.Find("DragonCamp/MicroDragonBoss").GetComponent <DragonController>().OnDieDelegate += () => {
            Events.gInstance.RaiseEvent("dragon.dead");
            PersistentVariable.Set("dragon.dead", 1f);
        };

        // Cursor.lockState = CursorLockMode.Locked;
    }