Ejemplo n.º 1
0
    // ATB time without gauge
    IEnumerator WaitTimer()
    {
        isWaiting = true;

        yield return(new WaitForSeconds(finalATBSpeed));

        if (actionListener.inAction)
        {
            StartCoroutine(PauseTimer());
        }
        Attack.ATK(status.STR, GameObject.Find("PlayerCha1"));

        isWaiting = false;
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (cursor == null)
        {
            cursor = GameObject.FindGameObjectWithTag("Cursor");
        }
        cursorS = cursor.GetComponent <Cursor>();
        if (Input.GetButtonDown("Submit") && cursor.activeSelf)
        {
            audioSource.PlayOneShot(selectSFX);
            Debug.Log(TargetSelect().name);
            switch (actionType)
            {
            case "Attack":
                Attack.ATK(GameObject.Find("PlayerCha1").GetComponent <Status>().STR, TargetSelect());
                ATBBar.SetATBBarValue(0f);
                GameObject.Find("BasicActions").SetActive(false);
                cursor.SetActive(false);
                break;

            case "Skills":
                ATBBar.SetATBBarValue(0f);
                GameObject.Find("SkillMenu").SetActive(false);
                GameObject.Find("BasicActions").SetActive(false);
                cursor.SetActive(false);
                break;

            case "Magics":
                ATBBar.SetATBBarValue(0f);
                GameObject.Find("MagicMenu").SetActive(false);
                GameObject.Find("BasicActions").SetActive(false);
                cursor.SetActive(false);
                break;

            case "Items":
                ATBBar.SetATBBarValue(0f);
                GameObject.Find("ItemMenu").SetActive(false);
                GameObject.Find("BasicActions").SetActive(false);
                cursor.SetActive(false);
                break;
            }
        }
    }