相机移动bug
This commit is contained in:
parent
965bc503d5
commit
e7d9b0dd5e
@ -18,6 +18,7 @@ public class DragTheScreen : MonoBehaviour, IDragHandler
|
||||
{
|
||||
if (isscanmove)
|
||||
{
|
||||
|
||||
Player.GetComponent<PlayerMovement_Jpystick>().HandleViewSwipe();
|
||||
}
|
||||
|
||||
|
@ -136,13 +136,13 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler
|
||||
}
|
||||
public void HandleViewSwipe()
|
||||
{
|
||||
if (Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) < 315 && Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) > 45)
|
||||
if (Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) < 270 && Mathf.Abs(mainCamera.transform.eulerAngles.x - transform.eulerAngles.x) > 90)
|
||||
{
|
||||
|
||||
cameraControl.ResetTargetOffsets();
|
||||
}
|
||||
if (Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) < 315 && Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) > 45)
|
||||
if (Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) < 300 && Mathf.Abs(mainCamera.transform.eulerAngles.y - transform.eulerAngles.y) > 60)
|
||||
{
|
||||
|
||||
cameraControl.ResetTargetOffsets();
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -18,7 +18,7 @@ public class UseSkill : MonoBehaviour
|
||||
// 玩家手中当前持有的物品
|
||||
//[HideInInspector]
|
||||
public GameObject currentItem = null;
|
||||
|
||||
|
||||
public Skill_Pick _skill_Pick;
|
||||
public Skill_Jump _skill_Jump;
|
||||
public Skill_watering _skill_Watering;
|
||||
@ -47,6 +47,7 @@ public class UseSkill : MonoBehaviour
|
||||
float dis= Vector3.Distance(GameObject.Find("player").transform.position, XFS.instance.transform.position);
|
||||
if (dis >= 30f)
|
||||
{
|
||||
|
||||
Drop();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user