Merge branch 'main' of http://shu.sheziwanglo.cn:3000/wulongxiao/_xiaofang
This commit is contained in:
commit
14e656915a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>();
|
||||
CharacterAin = transform.Find("newPlayer").GetComponent<CharacterAin>();
|
||||
characterCollider = GetComponent<Collider>();
|
||||
characterRigidbody = GetComponent<Rigidbody>();
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@ -64,6 +65,8 @@ public class Skill_Pick : MonoBehaviour
|
||||
item.transform.localPosition = relativePosition; // 假设玩家手中有一个默认的持物位置
|
||||
item.transform.localRotation = Quaternion.Euler(relativeRotation); // 重置旋转
|
||||
|
||||
|
||||
|
||||
Debug.Log("^^^^^^^^^^^^^^^^^^^^^^^^^");
|
||||
// 更新当前持有的物品
|
||||
return item;
|
||||
|
@ -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()
|
||||
|
@ -29,6 +29,7 @@ public class Fire : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
MieFire();
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user