Esempio n. 1
0
 private void LightDown()
 {
     if (!isChecked)
     {
         instructions.text    = "照明を暗くします";
         lightTimeCount       = maxTime;
         checkCurrentPosition = player.transform.position;
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.Stick, true);
         voices[5].Play();
         isChecked = true;
     }
     else if (lightTimeCount >= 0)
     {
         Vector3 aPos = checkCurrentPosition;
         Vector3 bPos = new Vector3(doorPositionChecker.transform.position.x, checkCurrentPosition.y, doorPositionChecker.transform.position.z);
         player.transform.position      = bPos + (aPos - bPos) * lightTimeCount / maxTime;
         RenderSettings.ambientSkyColor = minColor + (maxColor - minColor) * lightTimeCount / maxTime;
         lightTimeCount -= Time.deltaTime;
     }
     else
     {
         RenderSettings.ambientSkyColor = minColor;
         isChecked = false;
         state     = TutorialStatus.LightOn;
     }
 }
Esempio n. 2
0
    private void MatchVoiceCheckItem(string item, string content)
    {
        if (content == item)
        {
            VoiceController.CreateVoiceStar();
            LogManager.Log("讯飞获得:", content, ", 匹配单词:", item);
            m_Status = TutorialStatus.Nothing;
            XunFeiSRManager.Instance.StopListen();
            MicManager.Instance.StopRecord();
            AudioObject obj = null;
            if (LanguageManager.languageType == LanguageType.Chinese)
            {
                obj = AudioController.Play("Recording_3");
            }
            else
            {
                obj = AudioController.Play("en_Recording8");
            }
            AnalysisManager.Instance.OnEvent("100005", null, "新手", "完成新手");
            obj.completelyPlayedDelegate = Skip;

            return;
        }
        else
        {
            LogManager.Log("讯飞获得:", content, ", 匹配单词:", item);
            return;
        }
    }
Esempio n. 3
0
 private void LightOn()
 {
     instructions.text = "左人差し指を\nにぎってください";
     input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.IndexTrigger, false);
     Cooling();
     state = TutorialStatus.LightAtTarget;
 }
Esempio n. 4
0
        public async Task <TutorialStatus> SaveVideoStatus(TutorialStatus tutorialStatus)
        {
            string uri = $"{AppSettings.VideoApiUrl}/videos";

            var response = await _requestProvider.PostAsync <TutorialStatus>(uri, tutorialStatus);

            return(response);
        }
Esempio n. 5
0
 private void BeamOn()
 {
     input.SafetyLock(InputManager.Hands.Right, InputManager.ButtonLock.IndexTrigger, false);
     instructions.text = "右人差し指を\nにぎってください";
     voices[8].Play();
     Cooling();
     state = TutorialStatus.BeamAtTarget;
 }
Esempio n. 6
0
 public override void GameStart()
 {
     if (input.LC.IndexTrigger.Axis > 0.5f)
     {
         GM.Parameter.StartGameFlag = true;
         isChecked = false;
         state     = TutorialStatus.First;
     }
 }
Esempio n. 7
0
 private void ChangeStatusToStartSound(AudioObject obj)
 {
     RepetNum = 0;
     m_Status = TutorialStatus.StartSound;
     if (m_Tap != null)
     {
         m_Tap.Delete();
     }
 }
Esempio n. 8
0
    // Update is called once per frame
    void Update()
    {
        // if(GameManager.DialogueBox.Variables.ContainsKey("QuestStatus_ThorinIntroQuest"))
        // print(GameManager.DialogueBox.Variables["QuestStatus_ThorinIntroQuest"]);
        // Quest q = QuestManager.GetQuestByID("ThorinIntroQuest");
        // if(q.ID != null)
        // {
        //     Help.print("Thorin Quest Status", q.Status);
        // }
        innterventionTimer -= Time.deltaTime;
        if (currentSpell != null)
        {
            ThorinSpellBook[currentSpell].CoolDownTimer();
        }
        // print(status);
        switch (status)
        {
        case TutorialStatus.intialize:
            InitalizeSpells();
            moving = false;
            break;

        case TutorialStatus.playerBeingAttacked:
            if (PlayerNeedsHelp)
            {
                wolf   = GameObject.Find("Tutorial Wolf");
                status = TutorialStatus.attackingWolf;
            }
            break;

        case TutorialStatus.attackingWolf:
            if (WolfDead)
            {
                InitateConversation();
                status = TutorialStatus.teachingFirstSpell;
                //TODO: make sure status updates if quits during the tutorial
                // GameManager.player.GetComponent<PlayerStats>().FullHeal();
            }
            else
            {
                AttackingWolf();
            }
            break;

        case TutorialStatus.teachingFirstSpell:
            moving = false;
            CheckWolfRespawn();
            break;

        default:
            moving = false;
            CheckWolfRespawn();
            break;
        }
        UpdateAnimator();
    }
Esempio n. 9
0
        private void UpdateStatus(MediaPlayerStatus status)
        {
            var item = new TutorialStatus()
            {
                Id            = string.Empty,
                LastAction    = Enum.GetName(typeof(MediaPlayerStatus), status),
                TutorialName  = "big buck bunny",
                LastPayedTime = FixTimeSpan(CrossMediaManager.Current.VideoPlayer.Position).ToString(@"hh\:mm\:ss")
            };
            var service = Locator.Instance.Resolve <ITutorialsService>();

            service.SaveVideoStatus(item);
        }
Esempio n. 10
0
 private void LightAtTarget()
 {
     if (!isChecked)
     {
         instructions.text = "壁のシンボルに向かって\nライトを当ててください";
         isChecked         = true;
     }
     if (!voices[5].isPlaying && symbol.Parameter.IsBreaked)
     {
         isChecked = false;
         correctSE.Play();
         state = TutorialStatus.Move2;
     }
 }
Esempio n. 11
0
 private void First()
 {
     if (!isChecked)
     {
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.IndexTrigger, true);
         instructions.text = "操作確認を始めます";
         voices[0].Play();
         isChecked = true;
     }
     else if (!voices[0].isPlaying)
     {
         state     = TutorialStatus.LeftTurnCamera;
         isChecked = false;
     }
 }
Esempio n. 12
0
 private void TreadTrap()
 {
     if (!isChecked)
     {
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.Stick, true);
         instructions.text = "罠を踏んだことで\nダメージを受けました";
         voices[7].Play();
         isChecked = true;
     }
     if (!voices[7].isPlaying)
     {
         isChecked = false;
         state     = TutorialStatus.BeamOn;
     }
 }
Esempio n. 13
0
 private void BeamAtTarget()
 {
     if (!isChecked)
     {
         instructions.text = "罠に向かって\nビームを当ててください";
         slideDoor.SlideStart();
         isChecked = true;
     }
     if (!voices[8].isPlaying && breakBearTrap.IsBreaked)
     {
         correctSE.Play();
         isChecked = false;
         state     = TutorialStatus.TryGame;
     }
 }
Esempio n. 14
0
    // Start is called before the first frame update
    void Start()
    {
        status = TutorialStatus.intialize;
        Quest q = QuestManager.GetQuestByID("ThorinIntroQuest");

        if (q.ID != null)
        {
            if (q.Completed)
            {
                status = TutorialStatus.tutorialDone;
            }
        }
        anime = GetComponent <Animator>();
        // InitalizeSpells();
        // finishedTutorial = false;
    }
Esempio n. 15
0
 public void PointerWrong()
 {
     if (m_Status == TutorialStatus.ClickBatchKey && m_PlayStatus == Status.Click)
     {
         if (ClickPefect == false && RepetNum < 3)
         {
             m_PlayStatus = Status.Sound;
             m_TutotialScaler.Restart();
             m_Status = TutorialStatus.RetryPlayBatchKey;
         }
         else
         {
             m_PlayStatus = Status.Sound;
             EndClick();
         }
     }
 }
Esempio n. 16
0
 private void Start()
 {
     Instance = this;
     Pause    = false;
     BPM      = 60;
     //m_Status = TutorialStatus.StartPlayMusic;
     m_Status = TutorialStatus.ErJi;
     m_Beat   = 60000f / BPM;
     m_Skip.transform.GetComponent <Button>().onClick.AddListener(() =>
     {
         AnalysisManager.Instance.OnEvent("100005", null, "新手", "跳过新手");
         Skip(null);
     });
     m_Zhuyi.SetActive(false);
     RepetNum    = 0;
     ClickPefect = false;
 }
Esempio n. 17
0
    private void FlyWord(AudioObject audio = null)
    {
        m_Timer  = 0;
        m_Status = TutorialStatus.CheckSound;

        if (LanguageManager.languageType == LanguageType.Chinese)
        {
            VoiceController.instance.CreateWord("Hello", 5f);
        }
        else
        {
            VoiceController.instance.CreateWord("你好", 5f);
        }

        XunFeiSRManager.Instance.StartListen(GetSRCallback);
        MicManager.Instance.StartRecord(FlyStar, SoundWaveCh);
        VoiceController.Start_RecordingAnim();
    }
Esempio n. 18
0
 private void Move2()
 {
     if (!isChecked)
     {
         instructions.text = "";
         voices[6].Play();
         isChecked = true;
     }
     else if (!voices[6].isPlaying)
     {
         instructions.text = "では扉の向こう側へ\n進んでください";
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.Stick, false);
     }
     if (bearTrap.IsBreaked)
     {
         isChecked = false;
         state     = TutorialStatus.TreadTrap;
     }
 }
Esempio n. 19
0
    void InitalizeSpells()
    {
        List <GameObject> friends = new List <GameObject>();

        friends.Add(GameManager.player);
        JsonData thorinsSpells = JsonMapper.ToObject(File.ReadAllText(Application.dataPath + "/StreamingAssets/bin/ThorinsSpells.json"));

        for (int i = 0; i < thorinsSpells.Count; i++)
        {
            Spell temp = SpellManager.FindSpell(thorinsSpells[i]["Name"].ToString());

            temp.GetScript(gameObject.transform.Find("Root/Hips/Spine_01/Spine_02/Spine_03/Clavicle_R/Shoulder_R/Elbow_R/Hand_R/ThorinsMagicStaff/OtherCantisStone").gameObject);

            temp.SetCasterAndFriends(gameObject, friends);
            ThorinSpellBook.Add(temp.Name, temp);
        }
        status = TutorialStatus.playerBeingAttacked;
        // spell.GetScript(enemiesAttack.gameObject);
        // spell.SetCasterAndFriends(gameObject);
    }
Esempio n. 20
0
 private void Move()
 {
     if (!isChecked)
     {
         instructions.text = "";
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.HandTrigger, true);
         input.SafetyLock(InputManager.Hands.Right, InputManager.ButtonLock.HandTrigger, true);
         voices[4].Play();
         isChecked = true;
     }
     else if (!voices[4].isPlaying)
     {
         instructions.text = "左スティックを\n倒して進んでください";
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.Stick, false);
     }
     if (doorPositionChecker.Flag)
     {
         isChecked = false;
         state     = TutorialStatus.LightDown;
     }
 }
Esempio n. 21
0
 private void IsLookedDoor()
 {
     if (!isChecked)
     {
         instructions.text = "";
         voices[3].Play();
         isChecked = true;
     }
     else if (!voices[3].isPlaying)
     {
         instructions.text = "扉と向かい合ってください";
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.HandTrigger, false);
         input.SafetyLock(InputManager.Hands.Right, InputManager.ButtonLock.HandTrigger, false);
     }
     if (!voices[3].isPlaying && player.AngleVisionNumber == 4)
     {
         correctSE.Play();
         isChecked = false;
         state     = TutorialStatus.Move;
     }
 }
Esempio n. 22
0
 private void LeftTurnCamera()
 {
     if (!isChecked)
     {
         instructions.text = "";
         voices[1].Play();
         isChecked = true;
     }
     else if (!voices[1].isPlaying)
     {
         instructions.text = "左の中指を\nにぎってください";
         input.SafetyLock(InputManager.Hands.Left, InputManager.ButtonLock.HandTrigger, false);
     }
     if (input.LC.HandTrigger.Axis > 0.5f)
     {
         Cooling();
         correctSE.Play();
         isChecked = false;
         state     = TutorialStatus.RightTurnCamera;
     }
 }
Esempio n. 23
0
 private void RightTurnCamara()
 {
     if (!isChecked)
     {
         voices[2].Play();
         isChecked         = true;
         instructions.text = "";
     }
     else if (!voices[2].isPlaying)
     {
         instructions.text = "右の中指を\nにぎってください";
         input.SafetyLock(InputManager.Hands.Right, InputManager.ButtonLock.HandTrigger, false);
     }
     if (input.RC.HandTrigger.Axis > 0.5f)
     {
         Cooling();
         correctSE.Play();
         isChecked = false;
         state     = TutorialStatus.IsLookedDoor;
     }
 }
Esempio n. 24
0
 private void EndErji(AudioObject obj)
 {
     m_Erji.SetActive(false);
     m_Status = TutorialStatus.StartPlayMusic;
 }
Esempio n. 25
0
    private void Update()
    {
        if (Pause == false)
        {
            if (m_Status == TutorialStatus.ErJi)
            {
                m_Status = TutorialStatus.Nothing;
                m_Erji.SetActive(true);
                AudioObject audioObj = null;
                if (LanguageManager.languageType == LanguageType.Chinese)
                {
                    audioObj = AudioController.Play("Recording_erji");
                }
                else
                {
                    audioObj = AudioController.Play("en_Recording1");
                }
                audioObj.completelyPlayedDelegate = EndErji;
            }

            else if (m_Status == TutorialStatus.StartPlayMusic)
            {
                m_Status = TutorialStatus.Nothing;
                ClickObj co = null;
                if (LanguageManager.languageType == LanguageType.Chinese)
                {
                    co = new ClickObj("Hello", new Vector2(256, 192), "Hello");
                }
                else
                {
                    co = new ClickObj("你好", new Vector2(256, 192), "你好");
                }

                obj_hand.SetActive(false);
                m_Tap            = CorePlayManager.Instance.m_TapCreator.CreateWord(null, co);
                m_Tap.IsTutorial = true;
                m_Tap.TutNum(1);
                m_TapController = m_Tap.contrller;
                m_Zhuyi.SetActive(true);
                AudioObject audioObj = null;
                if (LanguageManager.languageType == LanguageType.Chinese)
                {
                    audioObj = AudioController.Play("Recording_1");
                }
                else
                {
                    audioObj = AudioController.Play("en_Recording2");
                }
                audioObj.completelyPlayedDelegate = ChangeStatusToPlayBatchKey;
            }
            else if (m_Status == TutorialStatus.PlayBatchKey)
            {
                BPM          = 60;
                m_Beat       = 60000f / BPM;
                m_Status     = TutorialStatus.ClickBatchKey;
                m_PlayStatus = Status.Sound;
                RhyTapHight();
            }
            else if (m_Status == TutorialStatus.RetryPlayBatchKey)
            {
                BPM          = 60;
                m_Beat       = 60000f / BPM;
                m_Status     = TutorialStatus.ClickBatchKey;
                m_PlayStatus = Status.Sound;
                m_Zhuyi.SetActive(true);

                AudioObject audioObj = null;
                if (LanguageManager.languageType == LanguageType.Chinese)
                {
                    audioObj = AudioController.Play("Recording_6");
                }
                else
                {
                    audioObj = AudioController.Play("en_Recording2");
                }
                audioObj.completelyPlayedDelegate = RepetClick;
            }
            else if (m_Status == TutorialStatus.StartSound)
            {
                m_Status = TutorialStatus.Nothing;
                AudioObject audioObj = null;
                if (LanguageManager.languageType == LanguageType.Chinese)
                {
                    audioObj = AudioController.Play("Recording_2");
                }
                else
                {
                    audioObj = AudioController.Play("en_Recording5");
                }
                audioObj.completelyPlayedDelegate = StartPlaySound;
            }
            else if (m_Status == TutorialStatus.PlaySound)
            {
                RepetNum += 1;
                m_Status  = TutorialStatus.Nothing;
                FlyWord();
            }
            else if (m_Status == TutorialStatus.RetryPlaySound)
            {
                RepetNum += 1;
                m_Status  = TutorialStatus.Nothing;
                List <string> wordList = new List <string>();

                if (LanguageManager.languageType == LanguageType.Chinese)
                {
                    wordList.Add("Recording_7");
                }
                else
                {
                    wordList.Add("en_Recording6");
                }

                var audioObj = AudioController.PlayList(wordList);
                audioObj.completelyPlayedDelegate = FlyWord;
            }
            else if (m_Status == TutorialStatus.CheckSound)
            {
                m_Timer += Time.deltaTime * 1000f;
                if (m_Timer >= 5000f)
                {
                    if (RepetNum < 2)
                    {
                        XunFeiSRManager.Instance.StopListen();
                        MicManager.Instance.StopRecord();
                        m_Status = TutorialStatus.RetryPlaySound;
                    }
                    else
                    {
                        m_Status = TutorialStatus.Nothing;
                        XunFeiSRManager.Instance.StopListen();
                        MicManager.Instance.StopRecord();
                        AudioObject audioObj = null;
                        if (LanguageManager.languageType == LanguageType.Chinese)
                        {
                            audioObj = AudioController.Play("Recording_5");
                        }
                        else
                        {
                            audioObj = AudioController.Play("en_Recording3");
                        }
                        AnalysisManager.Instance.OnEvent("100005", null, "新手", "完成新手");
                        audioObj.completelyPlayedDelegate = Skip;
                    }
                }
            }
        }
    }
Esempio n. 26
0
 private void StartPlaySound(AudioObject audioObj)
 {
     VoiceController.Show();
     m_Status = TutorialStatus.PlaySound;
 }
Esempio n. 27
0
 private void ChangeStatusToPlayBatchKey(AudioObject obj)
 {
     m_Status = TutorialStatus.PlayBatchKey;
 }