diff --git a/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Big.prefab b/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Big.prefab index beb9f0da..334a06ef 100644 --- a/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Big.prefab +++ b/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Big.prefab @@ -33918,7 +33918,7 @@ GameObject: - component: {fileID: 5825030608256766515} m_Layer: 0 m_Name: VFX_Fire_01_Big - m_TagString: Untagged + m_TagString: fire m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Small.prefab b/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Small.prefab index bad2b4b4..b3fa1105 100644 --- a/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Small.prefab +++ b/xiaofang/Assets/NatureManufacture Assets/Fire and Smoke Particles/Prefabs/Free Fire VFX/Particles/VFX_Fire_01_Small.prefab @@ -9656,7 +9656,7 @@ GameObject: - component: {fileID: 1871290703645314915} m_Layer: 0 m_Name: VFX_Fire_01_Small - m_TagString: Untagged + m_TagString: fire m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/xiaofang/Assets/Scenes/Tmap 1.unity b/xiaofang/Assets/Scenes/Tmap 1.unity index a1714b5c..04eac5fb 100644 --- a/xiaofang/Assets/Scenes/Tmap 1.unity +++ b/xiaofang/Assets/Scenes/Tmap 1.unity @@ -2789,7 +2789,6 @@ GameObject: - component: {fileID: 382802815} - component: {fileID: 382802816} - component: {fileID: 382802817} - - component: {fileID: 382802820} - component: {fileID: 382802819} - component: {fileID: 382802818} - component: {fileID: 382802821} @@ -2886,7 +2885,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 340618fb82d9f7246a985879a59c7b4d, type: 3} m_Name: m_EditorClassIdentifier: - moveSpeed: 1 + moveSpeed: 4 mainCamera: {fileID: 1068997306} JumpAbility: 1 JumpMoveSpeed: 1 @@ -2968,26 +2967,6 @@ MonoBehaviour: relativePosition: {x: 0, y: 0, z: 0} relativeRotation: {x: 0, y: 0, z: 0} pickUpRange: 2 ---- !u!114 &382802820 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 382802809} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 776645053b40a604db295f0167ee1a67, type: 3} - m_Name: - m_EditorClassIdentifier: - vaultDistance: 2 - vaultHeight: 2 - vaultLayerMask: - serializedVersion: 2 - m_Bits: 0 - vaultForwardDistance: 0.5 - vaultUpwardHeight: 1 - characterRigidbody: {fileID: 0} --- !u!114 &382802821 MonoBehaviour: m_ObjectHideFlags: 0 @@ -16301,7 +16280,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -4216859302048453862, guid: 062c3db07b863f644a93bc3f63e6644b, type: 3} propertyPath: m_LocalPosition.y - value: 0.07 + value: 0.54 objectReference: {fileID: 0} - target: {fileID: -4216859302048453862, guid: 062c3db07b863f644a93bc3f63e6644b, type: 3} propertyPath: m_LocalPosition.z diff --git a/xiaofang/Assets/Script/Character/Skills/Skill_Jump.cs b/xiaofang/Assets/Script/Character/Skills/Skill_Jump.cs index 0a86a202..400d965a 100644 --- a/xiaofang/Assets/Script/Character/Skills/Skill_Jump.cs +++ b/xiaofang/Assets/Script/Character/Skills/Skill_Jump.cs @@ -6,9 +6,9 @@ using UnityEngine; //这个是翻越,懒得改名字了 public class Skill_Jump : MonoBehaviour { - private CharacterAin CharacterAin; // 用于控制翻越动画 - public float vaultDistance = 2f; // 角色可以翻越的最大距离 - public float vaultHeight = 2f; // 角色可以翻越的最大高度 + public CharacterAin CharacterAin; // 用于控制翻越动画 + public float vaultDistance = 4f; // 角色可以翻越的最大距离 + public float vaultHeight = 4f; // 角色可以翻越的最大高度 public LayerMask vaultLayerMask; // 用于检测可翻越物体的 Layer public float vaultForwardDistance = 0.5f; // 可调整的翻越前进距离 public float vaultUpwardHeight = 1.0f; // 可调整的翻越高度 @@ -19,12 +19,13 @@ public class Skill_Jump : MonoBehaviour private void Start() { - CharacterAin = transform.GetComponent(); + CharacterAin = transform.Find("newPlayer").GetComponent(); characterCollider = GetComponent(); characterRigidbody = GetComponent(); } void Update() { + // if (Input.GetKeyDown(KeyCode.Space) && !isVaulting) { Debug.Log("按下翻越"); @@ -38,9 +39,17 @@ public class Skill_Jump : MonoBehaviour Debug.Log("正在检测"); RaycastHit hit; + Debug.DrawRay(transform.position, transform.forward * vaultDistance, Color.red, 2f); + + Vector3 rayStartPosition = transform.position + Vector3.up * 0.9f; + Debug.DrawRay(rayStartPosition, transform.forward * vaultDistance, Color.red, 2f); + Physics.Raycast(transform.position, transform.forward, out hit, vaultDistance, vaultLayerMask); + + Debug.Log(hit.transform.name); // 从角色前方向前发射一个射线,检测是否有障碍物 if (Physics.Raycast(transform.position, transform.forward, out hit, vaultDistance, vaultLayerMask)) { + Debug.Log("============================"+hit); // 如果检测到的障碍物高度适合翻越 if (hit.collider.bounds.size.y <= vaultHeight) { diff --git a/xiaofang/Assets/Script/Character/Skills/Skill_Pick.cs b/xiaofang/Assets/Script/Character/Skills/Skill_Pick.cs index 40ee0fd8..51bc2767 100644 --- a/xiaofang/Assets/Script/Character/Skills/Skill_Pick.cs +++ b/xiaofang/Assets/Script/Character/Skills/Skill_Pick.cs @@ -1,3 +1,4 @@ +using DG.Tweening; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -62,7 +63,9 @@ public class Skill_Pick : MonoBehaviour // 将物品设置为玩家手部的子对象,并调整其位置和旋转 item.transform.SetParent(rightHand, true); // false表示保持物品的世界旋转和位置 item.transform.localPosition = relativePosition; // 假设玩家手中有一个默认的持物位置 - item.transform.localRotation = Quaternion.Euler(relativeRotation); // 重置旋转 + item.transform.localRotation = Quaternion.Euler(relativeRotation); // 重置旋转 + + Debug.Log("^^^^^^^^^^^^^^^^^^^^^^^^^"); // 更新当前持有的物品 diff --git a/xiaofang/Assets/Script/Character/Skills/UseSkill.cs b/xiaofang/Assets/Script/Character/Skills/UseSkill.cs index 17c433e1..3d6edbf2 100644 --- a/xiaofang/Assets/Script/Character/Skills/UseSkill.cs +++ b/xiaofang/Assets/Script/Character/Skills/UseSkill.cs @@ -46,6 +46,10 @@ public class UseSkill : MonoBehaviour Debug.LogError("F"); //Debug.LogError(skill_Pick.Pick()); currentItem = _skill_Pick.Pick(); + if(currentItem.transform.name == "NoFire") + { + currentItem.transform.Rotate(180f, -80f, -30f); + } } if (Input.GetKeyDown(KeyCode.Q)) { @@ -53,11 +57,7 @@ public class UseSkill : MonoBehaviour } } - //翻越(跳) - void Jump() - { - - } + //洒水 void Skill_Watering() diff --git a/xiaofang/Assets/Script/Item/Fire.cs b/xiaofang/Assets/Script/Item/Fire.cs index a39cd634..1d166f40 100644 --- a/xiaofang/Assets/Script/Item/Fire.cs +++ b/xiaofang/Assets/Script/Item/Fire.cs @@ -29,7 +29,8 @@ public class Fire : MonoBehaviour void Update() { - MieFire(); + + MieFire(); } diff --git a/xiaofang/Assets/Script/hylScripts/CharacterAttribute.cs b/xiaofang/Assets/Script/hylScripts/CharacterAttribute.cs index 59cdaddb..9c5f6f14 100644 --- a/xiaofang/Assets/Script/hylScripts/CharacterAttribute.cs +++ b/xiaofang/Assets/Script/hylScripts/CharacterAttribute.cs @@ -21,17 +21,4 @@ public class CharacterAttribute : MonoBehaviour public string Stats1; public string Stats2; - - - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } }