Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        this.m_nowMove  = null;
        this.m_nextMove = null;

        this.m_isSetting = false;

        this.m_attackSpan = 0.0f;
        this.m_enemyLevel = m_enemyCreature.GetData().level;
        this.SetTarget();

        for (int i = 0; i < CreatureList_Script.Get.List.DataList.Length; i++)
        {
            m_drumonLv[i]   = CreatureList_Script.Get.List.DataList[i].level;
            m_drumonName[i] = CreatureList_Script.Get.List.DataList[i].drumonName;
        }
        m_battleResulteUI[0].GetComponent <LevelUPUI_Script>().startDrumonLv   = m_drumonLv;
        m_battleResulteUI[0].GetComponent <LevelUPUI_Script>().startDrumonName = m_drumonName;

        m_boxDrum = GameObject.FindGameObjectWithTag("BoxDrum").GetComponent <BoxDrum_Script>();
        m_boxDrum.gameObject.SetActive(false);

        m_playerObject = GameObject.Find("Player");
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (m_isSetting)
        {
            this.m_attackSpan -= Time.deltaTime;

            if (SceneManager.GetActiveScene().name != "TutorialCaptureScene")
            {
                if (m_drumonExecuteFlag == true)
                {
                    if (this.JudgeResult())
                    {
                        return;
                    }
                    this.m_playerCreature.Execute();
                }
                else
                {
                    this.m_playerCreature.Rate = 0;
                }
            }

            if (m_enemyExecuteFlag == true)
            {
                this.m_enemyCreature.Execute();
            }

            if (this.m_playerCreature.AtkFlag)
            {
                SetActive(this.m_playerCreature);
            }
            if (this.m_enemyCreature.AtkFlag)
            {
                SetActive(this.m_enemyCreature);
            }
            if (this.m_nowMove != null && this.m_attackSpan <= 0.0f)
            {
                this.Action();
            }
        }

        if (SceneManager.GetActiveScene().name == "TutorialBattleScene")
        {
            if (m_tutorialModeFlag == false)
            {
                // 文字を小さくする
                m_text.fontSize -= 10;
                foreach (Transform childTransform in m_text.transform)
                {
                    childTransform.gameObject.SetActive(false);
                }
            }

            // ボタンが押されたら
            if (OVRInput.GetDown(OVRInput.RawButton.A) && m_practiceModeFlag == false)
            {
                m_tutorialModeFlag = false;
            }

            // 文字が消えたら
            if (m_text.fontSize <= 0)
            {
                // 次のテキストの表示
                NextText();
            }

            if (m_curentNum == 3)
            {
                m_battleFrame1.gameObject.SetActive(false);
            }
            else if (m_curentNum == 4)
            {
                m_battleFrame2.gameObject.SetActive(true);
            }
            else if (m_curentNum == 6)
            {
                m_battleFrame2.gameObject.SetActive(false);
            }
            else if (m_curentNum == 7)
            {
                m_battleFrame3.gameObject.SetActive(true);
            }
            else if (m_curentNum == 8)
            {
                m_battleFrame3.gameObject.SetActive(false);
            }
            else if (m_curentNum == 9)
            {
                m_battleFrame1.gameObject.SetActive(true);
            }
            else if (m_curentNum == 10)
            {
                m_practiceModeFlag = true;
            }
            else if (m_curentNum == 11)
            {
                m_battleFrame1.gameObject.SetActive(false);
                m_battleFrame4.gameObject.SetActive(true);
            }
            else if (m_curentNum == 15)
            {
                m_battleFrame4.gameObject.SetActive(false);
                m_battleFrame5.gameObject.SetActive(true);
            }
            else if (m_curentNum == 16)
            {
                m_practiceModeFlag = true;

                foreach (Transform childTransform in m_hitPatternCanvas.transform)
                {
                    childTransform.gameObject.SetActive(true);
                }
            }
            else if (m_curentNum == 17 && m_text.gameObject.activeInHierarchy == true)
            {
                m_practiceModeFlag = true;

                m_frameCount++;

                m_battleFrame5.gameObject.SetActive(false);
                m_battleFrame1.gameObject.SetActive(true);

                if (m_frameCount >= 240.0f)
                {
                    m_text.gameObject.SetActive(false);
                    m_frameCount = 0.0f;

                    m_battleFrame1.gameObject.SetActive(false);
                }
            }
            else if (m_curentNum == 18)
            {
                m_practiceModeFlag = true;

                m_frameCount++;

                m_battleFrame1.gameObject.SetActive(true);

                if (m_frameCount >= 300.0f)
                {
                    m_tutorialModeFlag = false;
                    m_frameCount       = 0.0f;
                }
            }
            else if (m_curentNum == 19)
            {
                m_practiceModeFlag = true;

                m_frameCount++;

                if (m_frameCount >= 360.0f)
                {
                    m_tutorialModeFlag = false;
                    m_frameCount       = 0.0f;
                }
            }
            else if (m_curentNum == 20)
            {
                m_practiceModeFlag = true;
                StartCoroutine(SceneChengeStop());
            }

            // 叩けたらチェックを出す
            if (m_explainBattleSystemText2.activeInHierarchy == true)
            {
                if (m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.IsFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.IN_HIT) == true || Input.GetKeyDown(KeyCode.V))
                {
                    m_inHitCheckImage.SetActive(true);
                }
                if (m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.IsFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.OUT_HIT) == true || Input.GetKeyDown(KeyCode.B))
                {
                    m_outHitCheckImage.SetActive(true);
                }
                if (m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.IsFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.DOUBLE_IN_HIT) == true || Input.GetKeyDown(KeyCode.N))
                {
                    m_doubleInHitCheckImage.SetActive(true);
                }
                if (m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.IsFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.DOUBLE_OUT_HIT) == true || Input.GetKeyDown(KeyCode.M))
                {
                    m_doubleOutHitCheckImage.SetActive(true);
                }
                // 全てのチェックが出たら
                if (m_inHitCheckImage.activeInHierarchy == true && m_outHitCheckImage.activeInHierarchy == true && m_doubleInHitCheckImage.activeInHierarchy == true && m_doubleOutHitCheckImage.activeInHierarchy == true)
                {
                    m_tutorialModeFlag = false;
                }
            }
            else
            {
                m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.OffFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.IN_HIT);
                m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.OffFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.OUT_HIT);
                m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.OffFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.DOUBLE_IN_HIT);
                m_drumManager.AttackDrum.GetComponent <AttackDrum_Script>().TutorialFlag.OffFlag((uint)AttackDrum_Script.TUTORIAL_HIT_PATTERN.DOUBLE_OUT_HIT);
            }

            if (m_explainNotesResetText.activeInHierarchy == true)
            {
                // 攻撃できるようになる
                m_drumonExecuteFlag = true;

                // 敵が攻撃を受けたら
                if (m_enemyCreature.HP < m_enemyCreature.GetData().maxHp)
                {
                    // 次のテキストの表示
                    m_tutorialModeFlag = false;

                    // 敵が攻撃するようになる
                    m_enemyExecuteFlag = true;
                }
            }

            if (m_enemyCreature.HP <= 0 && m_curentNum == 17)
            {
                // 次のテキストの表示
                NextText();
            }

            // モデル変更
            ChengeModel();
        }
        else if (SceneManager.GetActiveScene().name == "TutorialCaptureScene")
        {
            if (m_tutorialModeFlag == false)
            {
                // 文字を小さくする
                m_text.fontSize -= 10;
                foreach (Transform childTransform in m_text.transform)
                {
                    childTransform.gameObject.SetActive(false);
                }
            }

            // ボタンが押されたら
            if (OVRInput.GetDown(OVRInput.RawButton.A) && m_practiceModeFlag == false)
            {
                m_tutorialModeFlag = false;
            }

            // 文字が消えたら
            if (m_text.fontSize <= 0)
            {
                // 次のテキストの表示
                NextText();
            }

            if (m_curentNum == 1)
            {
                m_rightHand.gameObject.SetActive(false);
            }
            else if (m_curentNum == 3)
            {
                m_captureFrame1.gameObject.SetActive(false);
            }
            else if (m_curentNum == 4)
            {
                m_captureFrame2.gameObject.SetActive(true);
            }
            else if (m_curentNum == 6)
            {
                m_practiceModeFlag = true;

                m_distanceGrabHandLeft.GetComponent <CapsuleCollider>().enabled  = true;
                m_distanceGrabHandRight.GetComponent <CapsuleCollider>().enabled = true;
                m_stickLeft.GetComponent <MeshFilter>().sharedMesh  = m_handMesh[0];
                m_stickRight.GetComponent <MeshFilter>().sharedMesh = m_handMesh[0];

                if (CreatureList_Script.Get.List.DataList[0].drumonName != "")
                {
                    // 次のテキストの表示
                    m_tutorialModeFlag = false;
                }
            }
            else if (m_curentNum == 7)
            {
                m_captureFrame1.gameObject.SetActive(true);
                m_captureFrame2.gameObject.SetActive(false);
                StartCoroutine(SceneChengeStop());
            }

            // モデル変更
            ChengeModel();
        }
    }