Пример #1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         Mp -= 5;
     }
     if (Input.GetKeyDown(KeyCode.S))
     {
         Hp -= 5;
     }
     if (MyState == State.Charging)
     {
         ChargingTime += Time.deltaTime;
     }
     if (ChargingTime > MaxChargingTime)
     {
         Debug.Log("챠징오버");
         //스킬 실패 기초안
         PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(0.5f, 1.0f, OVRInput.Controller.RTouch));
         PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(0.5f, 1.0f, OVRInput.Controller.LTouch));
         SetMyState(State.ChargingOver);
     }
     CheckHp();
     CheckMp();
 }
Пример #2
0
    private void Update()
    {
        if (InputManager_JHW.AButtonDown())
        {
            source.clip = clips[0];
            source.Play();
            if (!confirm)
            {
                SelectMenu = index;
                confirm    = true;
                player.StartCoroutine(Viberation.ViberationCoroutine(0.2f, 0.3f, OVRInput.Controller.RTouch));
                player.StartCoroutine(Viberation.ViberationCoroutine(0.2f, 0.3f, OVRInput.Controller.LTouch));
                ui_arr[SelectMenu].GetComponent <Image>().color = new Color(1, 0, 1);
                Menus[SelectMenu].transform.Translate(0, 0, -10);
                Menus[SelectMenu].transform.LookAt(Camera.main.transform);
                Menus[SelectMenu].transform.Rotate(0, 180, 0);
            }
        }
        if (InputManager_JHW.BButtonDown())
        {
            source.clip = clips[1];
            source.Play();
            if (confirm && SelectMenu >= 0)
            {
                Menus[SelectMenu].transform.rotation = Quaternion.identity;
                Menus[SelectMenu].transform.Translate(0, 0, 10);

                ui_arr[SelectMenu].GetComponent <Image>().color = new Color(1, 1, 1);
                SelectMenu = -1;
                confirm    = false;
                player.StartCoroutine(Viberation.ViberationCoroutine(0.1f, 0.1f, OVRInput.Controller.RTouch));
                player.StartCoroutine(Viberation.ViberationCoroutine(0.1f, 0.1f, OVRInput.Controller.LTouch));
            }
        }
        if (InputManager_JHW.RTriggerOn() && InputManager_JHW.LTriggerOn())
        {
            //준비 완료되었냐고 물어보는 거 확인후!!
            source.clip = clips[0];
            source.Play();
            confirm = true;
            GameStart.gameObject.SetActive(true);
            //
        }
    }
    public void SkillOn()
    {
        lineReset();
        if (SkillCheck(skill1))
        {
            currentSkill = 1;
            Debug.Log("마법1");
            playerSound.PlayerSound(PlayerSoundSetting.soundPack.DrawComplete);
            TimerOn = true;
            Complete.SetActive(true);
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.LTouch));
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.RTouch));
            return;
        }
        else if (SkillCheck(skill2))
        {
            currentSkill = 2;
            Debug.Log("마법2");
            playerSound.PlayerSound(PlayerSoundSetting.soundPack.DrawComplete);
            TimerOn = true;
            Complete.SetActive(true);
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.LTouch));
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.RTouch));
            return;
        }
        else if (SkillCheck(skill3))
        {
            currentSkill = 3;
            Debug.Log("마법3");
            playerSound.PlayerSound(PlayerSoundSetting.soundPack.DrawComplete);
            TimerOn = true;
            Complete.SetActive(true);
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.LTouch));
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.RTouch));
            return;
        }
        else if (SkillCheck(skill4))
        {
            currentSkill = 4;
            Debug.Log("마법4");
            playerSound.PlayerSound(PlayerSoundSetting.soundPack.DrawComplete);
            TimerOn = true;
            Complete.SetActive(true);
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.LTouch));
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.RTouch));
            return;
        }
        else if (SkillCheck(skill5))
        {
            currentSkill = 5;
            Debug.Log("마법5");
            playerSound.PlayerSound(PlayerSoundSetting.soundPack.DrawComplete);
            TimerOn = true;
            Complete.SetActive(true);
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.LTouch));
            PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(.3f, .3f, OVRInput.Controller.RTouch));
            return;
        }

        PointRestart();
        TimerOn = false;
        reset();
        gameObject.SetActive(false);
    }
Пример #4
0
 public void touchon()
 {
     PlayerViberation.StartCoroutine(Viberation.ViberationCoroutine(0.1f, 0.1f, OVRInput.Controller.RTouch));
     check = true;
     this.transform.GetComponent <MeshRenderer>().material.color = new Color(0, 0, 0);
 }