public void MoveNext() { if (moveStyle == CamMoveStyle.First) { NextCamPos = NextCamPos.NextPos; CMS.lookAt = NextCamPos.Robot; pos = MainCam.position; rot = MainCam.rotation; t = 0; playerState = PlayerState.move; } else if (moveStyle == CamMoveStyle.Second) { NextCamPos = NextCamPos.NextPos; CMS.lookAt = NextCamPos.Robot; pos = MainCam.position; rot = MainCam.rotation; t = 0; playerState = PlayerState.move; } else if (moveStyle == CamMoveStyle.Third) { Tangent2 = NextCamPos.Tangent2.position; NextCamPos = NextCamPos.NextPos; CMS.lookAt = NextCamPos.Robot; pos = MainCam.position; rot = MainCam.rotation; t = 0; x = 0; playerState = PlayerState.move; } }
// Update is called once per frame void Update() { if (Work) { if (Input.GetKeyDown(KeyCode.LeftArrow)) { //left NextPos = Left; PlayerPrefs.SetInt("Level", NextLevel); Debug.Log("Left"); CS.MoveNext(); } if (Input.GetKeyDown(KeyCode.RightArrow)) { //right NextPos = Right; PlayerPrefs.SetInt("Level", NextLevel); Debug.Log("Right"); CS.MoveNext(); } } }