Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (mc == null)
        {
            mc = FindObjectOfType <musicController>();
        }
        if (xpm == null)
        {
            xpm = FindObjectOfType <experienceManager>();
        }

        if (questIndex == 2)
        {
            if (wolfcount == 8)
            {
                StartCoroutine("restoretownstate");
            }
        }

        if (questIndex == 3)
        {
            if (recruitCount == 3)
            {
                questCompleted();
            }
        }
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        if (xpm == null)
        {
            xpm = FindObjectOfType <experienceManager>();
        }
        if (questIndex == 1)
        {
            zct.zone1State(false);
            sct.SetActive(true);
        }
        else if (questIndex == 2)
        {
            zct.zone1State(true);
            sct.SetActive(false);
        }

        else
        {
            zct.zone1State(true);
        }

        if (kapDefeated == true)
        {
            questCompleted();
            kapDefeated = false;
        }
    }
Beispiel #3
0
 // Update is called once per frame
 void Update()
 {
     if (xpm == null)
     {
         xpm = FindObjectOfType <experienceManager>();
     }
 }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     dMan           = FindObjectOfType <DialogueManager>();
     xpm            = FindObjectOfType <experienceManager>();
     questProg      = new string[questTitle.Length];
     isCompleted    = new bool[questTitle.Length];
     qm.mainqactive = true;
 }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     dMan           = FindObjectOfType <DialogueManager>();
     xpm            = FindObjectOfType <experienceManager>();
     questProg      = new string[questTitle.Length];
     isCompleted    = new bool[questTitle.Length];
     qm.mainqactive = true;
     qm.questActivated();
     qm.buttonMain.gameObject.SetActive(true);
     questActive = true;
 }
    // Use this for initialization
    void Start()
    {
        expm = FindObjectOfType <experienceManager>();
        enemyCurrentHealth = enemyMaxHealth;

        foreach (Transform child in transform)
        {
            if (child.CompareTag("attackCollider"))
            {
                attackCollider[x] = child.gameObject;
                x++;
            }
        }
    }
Beispiel #7
0
 // Update is called once per frame
 void Update()
 {
     if (xpm == null)
     {
         xpm = FindObjectOfType <experienceManager>();
     }
     if (questIndex == 1)
     {
         if (wolfcount == 8)
         {
             questCompleted();
         }
     }
 }
Beispiel #8
0
    // Update is called once per frame
    void Update()
    {
        if (player == null)
        {
            player = GameObject.FindWithTag("Player");
        }
        if (playerHealth == null && experience == null)
        {
            if (FindObjectOfType <PlayerHealthManager>() != null)
            {
                playerHealth = FindObjectOfType <PlayerHealthManager>();
            }
            if (FindObjectOfType <experienceManager>() != null)
            {
                experience = FindObjectOfType <experienceManager>();
            }
        }

        if (playerHealth != null)
        {
            healthBar.maxValue = playerHealth.playerMaxHealth;
            healthBar.value    = playerHealth.playerCurrentHealth;
            hpText.text        = playerHealth.playerCurrentHealth + " / " + playerHealth.playerMaxHealth;
        }

        if (experience != null)
        {
            experienceBar.maxValue = experience.maxExperience;
            experienceBar.value    = experience.currentExperience;
            experienceText.text    = "Lv." + experience.currentLevel + " (" + experience.currentExperience + "/" + experience.maxExperience + ")";
        }


        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (Time.timeScale == 1)
            {
                Time.timeScale = 0;
                showPaused();
            }
            else if (Time.timeScale == 0)
            {
                Debug.Log("high");
                Time.timeScale = 1;
                hidePaused();
            }
        }
    }
Beispiel #9
0
 // Update is called once per frame
 void Update()
 {
     if (xpm == null)
     {
         xpm = FindObjectOfType <experienceManager>();
     }
     if (phm == null)
     {
         phm = FindObjectOfType <PlayerHealthManager>();
     }
     if (questIndex == 0)
     {
         if (mangoCount == 5)
         {
             questCompleted();
         }
     }
 }
Beispiel #10
0
    // Update is called once per frame
    void Update()
    {
        if (mc == null)
        {
            mc = FindObjectOfType <musicController>();
        }

        if (xpm == null)
        {
            xpm = FindObjectOfType <experienceManager>();
        }
        if (questIndex == 2)
        {
            if (bananaCount == 5)
            {
                questCompleted();
            }
        }

        if (questIndex == 5)
        {
            if (wolfcount == 3)
            {
                npcController npCont = GameObject.FindObjectOfType <npcController>().GetComponent <npcController>();
                npCont.set1State(false);
                npCont.set2State(true);

                zCont.zone1State(true);
                wolfcount = 0;
                questCompleted();
            }
        }
        if (questIndex == 7)
        {
            if (wolfcount == piratemax)
            {
                Debug.Log("in");
                for (int x = 0; x < piratesc.Length; x++)
                {
                    piratesc[x].canMove = false;
                }
                dMan.textLines = lines;
                dMan.textimage = img;
                dMan.textName  = charac;
                dMan.img       = img;
                dMan.images    = images;

                if (!dMan.dialogActive && !istriggered)
                {
                    dMan.showDialogue();
                    dMan.currentLine = 0;
                    istriggered      = true;
                    wolfcount        = 0;
                }
            }
            if (!dMan.dialogActive && istriggered)
            {
                StartCoroutine("restoretownstate");
            }
        }
    }