feat():添加传送器开启时的特效
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -614,6 +614,74 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 85652dd0e36597644aa5b3bc9603797b, type: 3}
|
||||
--- !u!1001 &648675296
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 33.62
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.37
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 3.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6227019518059310355, guid: be07db3098b709a40a6965f50f8c9640,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Lever (2)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: be07db3098b709a40a6965f50f8c9640, type: 3}
|
||||
--- !u!1 &668609043
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2951,7 +3019,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8254182874643487870, guid: 5b168380fd354a64f83433e049b95706,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.18
|
||||
value: 0.36
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8254182874643487870, guid: 5b168380fd354a64f83433e049b95706,
|
||||
type: 3}
|
||||
@@ -3426,5 +3494,6 @@ SceneRoots:
|
||||
- {fileID: 668609047}
|
||||
- {fileID: 1067528595}
|
||||
- {fileID: 1079319502}
|
||||
- {fileID: 648675296}
|
||||
- {fileID: 1087152227488215159}
|
||||
- {fileID: 914217103}
|
||||
|
||||
@@ -15,10 +15,16 @@ namespace Script.Gameplay.Facility
|
||||
[SerializeField] private float detectHeight = 2.0f;
|
||||
[SerializeField] private LayerMask playerLayer;
|
||||
|
||||
[SerializeField] private GameObject particleEffect;
|
||||
private bool canTransport = false;
|
||||
private bool isTransporting = false;
|
||||
private Collider[] hits;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
particleEffect.SetActive(false);
|
||||
}
|
||||
|
||||
// 接收信号,决定是否允许传送
|
||||
public override void OnSignalReceived(bool active, GameObject sender)
|
||||
{
|
||||
@@ -37,6 +43,14 @@ namespace Script.Gameplay.Facility
|
||||
private void Update()
|
||||
{
|
||||
if (!isOpenInEditor || !canTransport || destinationPoint == null || hits == null) return;
|
||||
if (canTransport)
|
||||
{
|
||||
particleEffect.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
particleEffect.SetActive(false);
|
||||
}
|
||||
foreach (var hit in hits)
|
||||
{
|
||||
if (hit.CompareTag(playerTag) && !isTransporting)
|
||||
|
||||
Reference in New Issue
Block a user