移动
This commit is contained in:
parent
36f82953a5
commit
999159c80b
@ -7738,52 +7738,6 @@ MeshCollider:
|
|||||||
m_Convex: 0
|
m_Convex: 0
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: 7384328630774979640, guid: 00003e04dc9a2534eb207f108c7b0cd3, type: 3}
|
m_Mesh: {fileID: 7384328630774979640, guid: 00003e04dc9a2534eb207f108c7b0cd3, type: 3}
|
||||||
--- !u!1 &314694553
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 314694555}
|
|
||||||
- component: {fileID: 314694554}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: BurstCollisionWorld
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &314694554
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 314694553}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
cellSpans:
|
|
||||||
m_AlignBytes: 16
|
|
||||||
--- !u!4 &314694555
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 314694553}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 38
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1001 &326324319
|
--- !u!1001 &326324319
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -8797,7 +8751,7 @@ MonoBehaviour:
|
|||||||
joystick: {fileID: 1221713539}
|
joystick: {fileID: 1221713539}
|
||||||
cameraTransform: {fileID: 1068997307}
|
cameraTransform: {fileID: 1068997307}
|
||||||
moveSpeed: 5
|
moveSpeed: 5
|
||||||
characterControl: {fileID: 382802815}
|
DragTheScreen: {fileID: 1490008725}
|
||||||
mainCamera: {fileID: 1068997306}
|
mainCamera: {fileID: 1068997306}
|
||||||
rb: {fileID: 382802811}
|
rb: {fileID: 382802811}
|
||||||
normalFOV: 60
|
normalFOV: 60
|
||||||
@ -25711,6 +25665,52 @@ Transform:
|
|||||||
m_CorrespondingSourceObject: {fileID: 434342, guid: dae965d9ed8802048877e54ec2f0be78, type: 3}
|
m_CorrespondingSourceObject: {fileID: 434342, guid: dae965d9ed8802048877e54ec2f0be78, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1517804048}
|
m_PrefabInstance: {fileID: 1517804048}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &1518257098
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1518257100}
|
||||||
|
- component: {fileID: 1518257099}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: BurstCollisionWorld
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1518257099
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1518257098}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
cellSpans:
|
||||||
|
m_AlignBytes: 16
|
||||||
|
--- !u!4 &1518257100
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1518257098}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 38
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1521737075
|
--- !u!1 &1521737075
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -9,6 +9,7 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler
|
|||||||
public Transform cameraTransform; // 引用主摄像机的 Transform
|
public Transform cameraTransform; // 引用主摄像机的 Transform
|
||||||
public float moveSpeed = 5f;
|
public float moveSpeed = 5f;
|
||||||
|
|
||||||
|
public DragTheScreen DragTheScreen;
|
||||||
//public CharacterControl characterControl;
|
//public CharacterControl characterControl;
|
||||||
private CharacterAin Characterain;
|
private CharacterAin Characterain;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public class Skill_Jump : MonoBehaviour
|
|||||||
characterRigidbody.isKinematic = true;
|
characterRigidbody.isKinematic = true;
|
||||||
|
|
||||||
// 禁用角色的物理移动,防止翻越时移动受影响
|
// 禁用角色的物理移动,防止翻越时移动受影响
|
||||||
GetComponent<PlayerMovement_Jpystick>().enabled = false;
|
GetComponent<PlayerMovement_Jpystick>().DragTheScreen.enabled = false;
|
||||||
|
|
||||||
// 让角色移动到翻越后的位置
|
// 让角色移动到翻越后的位置
|
||||||
StartCoroutine(VaultMovement(hitPoint));
|
StartCoroutine(VaultMovement(hitPoint));
|
||||||
@ -104,7 +104,7 @@ public class Skill_Jump : MonoBehaviour
|
|||||||
// 立即恢复物理控制和碰撞体
|
// 立即恢复物理控制和碰撞体
|
||||||
characterRigidbody.isKinematic = false;
|
characterRigidbody.isKinematic = false;
|
||||||
characterCollider.enabled = true;
|
characterCollider.enabled = true;
|
||||||
GetComponent<PlayerMovement_Jpystick>().enabled = true;
|
GetComponent<PlayerMovement_Jpystick>().DragTheScreen.enabled = true;
|
||||||
|
|
||||||
// 确保刚体恢复正常的重力影响
|
// 确保刚体恢复正常的重力影响
|
||||||
characterRigidbody.velocity = Vector3.zero; // 清除任何残留的速度
|
characterRigidbody.velocity = Vector3.zero; // 清除任何残留的速度
|
||||||
|
@ -143,6 +143,7 @@ public class Fire : MonoBehaviour
|
|||||||
// 如果松开按键或者离开范围,重置计时
|
// 如果松开按键或者离开范围,重置计时
|
||||||
holdTime = 0f;
|
holdTime = 0f;
|
||||||
isExtinguishing = false;
|
isExtinguishing = false;
|
||||||
|
TimeText.gameObject.SetActive(false);
|
||||||
// 恢复玩家控制器
|
// 恢复玩家控制器
|
||||||
if (!Input.GetMouseButton(0)) EnablePlayerControl();
|
if (!Input.GetMouseButton(0)) EnablePlayerControl();
|
||||||
}
|
}
|
||||||
@ -162,7 +163,7 @@ public class Fire : MonoBehaviour
|
|||||||
// 停止火焰
|
// 停止火焰
|
||||||
public void StopFire()
|
public void StopFire()
|
||||||
{
|
{
|
||||||
this.characterControl.enabled=true;
|
this.characterControl.DragTheScreen.enabled=true;
|
||||||
this.gameObject.SetActive(false);
|
this.gameObject.SetActive(false);
|
||||||
Debug.Log("火焰已被熄灭");
|
Debug.Log("火焰已被熄灭");
|
||||||
UseSkill = null;
|
UseSkill = null;
|
||||||
@ -212,7 +213,8 @@ public class Fire : MonoBehaviour
|
|||||||
{
|
{
|
||||||
isPlayerInRange = false; // 玩家离开范围
|
isPlayerInRange = false; // 玩家离开范围
|
||||||
characterControl = null;
|
characterControl = null;
|
||||||
UseSkill= null;
|
characterControl.DragTheScreen.enabled = true;
|
||||||
|
UseSkill = null;
|
||||||
us.FireOUt();
|
us.FireOUt();
|
||||||
TimeText.gameObject.SetActive(false);
|
TimeText.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
@ -223,7 +225,7 @@ public class Fire : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (characterControl != null)
|
if (characterControl != null)
|
||||||
{
|
{
|
||||||
characterControl.enabled = false;
|
characterControl.DragTheScreen.enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +234,7 @@ public class Fire : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (characterControl != null)
|
if (characterControl != null)
|
||||||
{
|
{
|
||||||
characterControl.enabled = true;
|
characterControl.DragTheScreen.enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,17 +26,17 @@ public class XFS : MonoBehaviour
|
|||||||
ConnectGun.onClick.AddListener((() =>
|
ConnectGun.onClick.AddListener((() =>
|
||||||
{
|
{
|
||||||
PLayerLook();
|
PLayerLook();
|
||||||
CharacterControl.enabled = false; Invoke("connectGun",6f);}));
|
CharacterControl.DragTheScreen.enabled = false; Invoke("connectGun",6f);}));
|
||||||
ConnectFa.onClick.AddListener(() =>
|
ConnectFa.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
PLayerLook();
|
PLayerLook();
|
||||||
ShuiguanGameObject.SetActive(true);
|
ShuiguanGameObject.SetActive(true);
|
||||||
CharacterControl.enabled = false; Invoke("connectFa", 6f);
|
CharacterControl.DragTheScreen.enabled = false; Invoke("connectFa", 6f);
|
||||||
});
|
});
|
||||||
OpenFa.onClick.AddListener(() =>
|
OpenFa.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
PLayerLook();
|
PLayerLook();
|
||||||
CharacterControl.enabled = false; Invoke("openFa", 6f);
|
CharacterControl.DragTheScreen.enabled = false; Invoke("openFa", 6f);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ public class XFS : MonoBehaviour
|
|||||||
public void connectGun()
|
public void connectGun()
|
||||||
{
|
{
|
||||||
//UseSkill.Initgun(Gun);
|
//UseSkill.Initgun(Gun);
|
||||||
CharacterControl.enabled = true;
|
CharacterControl.DragTheScreen.enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public class XFS : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Solver solver = ShuiguanGameObject.GetComponent<Solver>();
|
Solver solver = ShuiguanGameObject.GetComponent<Solver>();
|
||||||
solver.INit(Gun.transform);
|
solver.INit(Gun.transform);
|
||||||
CharacterControl.enabled = true;
|
CharacterControl.DragTheScreen.enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ public class XFS : MonoBehaviour
|
|||||||
water.SetActive(false);
|
water.SetActive(false);
|
||||||
IShavewater = true;
|
IShavewater = true;
|
||||||
UseSkill.Initgun();
|
UseSkill.Initgun();
|
||||||
|
CharacterControl.DragTheScreen.enabled = true;
|
||||||
}
|
}
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user