コード例 #1
0
    public void Update()
    {
        if (doctorIsFighting)
        {
            PositionHandler(doctorFightPosition);

            if (Input.GetKeyDown("space"))
            {
                toothSoundProcess.HitPunch();
                if (!handsHitCycle && !rightHandCycle)
                {
                    if (!punchedOnce)
                    {
                        punchedOnce = true;
                        OpenMouthWhenPunched();
                    }
                    StopAllCoroutines();
                    handsHitCycle  = true;
                    rightHandCycle = true;

                    leftHandCycle = false;
                    gameLogicController.RemoveOneTooth();
                    // Debug.Log("Right Hit");
                    rightHandCollider.SetActive(true);
                    StartCoroutine(RightHook(12));
                }
                else if (handsHitCycle && !leftHandCycle)
                {
                    StopAllCoroutines();
                    handsHitCycle = false;
                    leftHandCycle = true;

                    rightHandCycle = false;
                    gameLogicController.RemoveOneTooth();
                    //  Debug.Log("Left Hit");
                    leftHandCollider.SetActive(true);
                    StartCoroutine(LeftHook(12));
                }
            }
        }
        else
        {
            PositionHandler(doctorSurgeryPositon);
        }

        //HeadPositionHandler();
    }