添加梯子逻辑

This commit is contained in:
YangHua 2024-06-07 19:01:21 +08:00
parent cf69abce66
commit c0802f0422
14 changed files with 3250 additions and 19 deletions

View File

@ -1788,6 +1788,149 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &161696234
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 161696235}
- component: {fileID: 161696239}
- component: {fileID: 161696238}
- component: {fileID: 161696237}
- component: {fileID: 161696236}
m_Layer: 5
m_Name: "\u4E0A\u4E0B\u68AF\u5B50"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &161696235
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161696234}
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:
- {fileID: 1359808511}
- {fileID: 1503299657}
m_Father: {fileID: 1935876358}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 80, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &161696236
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161696234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a796d3af1946c645be7cc621638b075, type: 3}
m_Name:
m_EditorClassIdentifier:
tips: {fileID: 0}
tipsContent: {fileID: 0}
selfToggle: {fileID: 0}
--- !u!114 &161696237
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161696234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 161696238}
toggleTransition: 1
graphic: {fileID: 0}
m_Group: {fileID: 0}
onValueChanged:
m_PersistentCalls:
m_Calls: []
m_IsOn: 0
--- !u!114 &161696238
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161696234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1f84fefcd9c94d34e83e7dfa3bec4d73, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &161696239
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161696234}
m_CullTransparentMesh: 1
--- !u!1 &166059215
GameObject:
m_ObjectHideFlags: 0
@ -15269,7 +15412,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &932668465
RectTransform:
m_ObjectHideFlags: 0
@ -15287,9 +15430,9 @@ RectTransform:
m_Father: {fileID: 1935876358}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 385, y: -40}
m_SizeDelta: {x: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &932668466
@ -16626,6 +16769,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1007045858}
m_CullTransparentMesh: 1
--- !u!1 &1021248374
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1021248375}
- component: {fileID: 1021248377}
- component: {fileID: 1021248376}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1021248375
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1021248374}
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: 1503299657}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 3.5779}
m_SizeDelta: {x: 0, y: -7.1557}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1021248376
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1021248374}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 18
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u4EFB\u52A1\u4E66"
--- !u!222 &1021248377
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1021248374}
m_CullTransparentMesh: 1
--- !u!1 &1021690652
GameObject:
m_ObjectHideFlags: 0
@ -17637,6 +17860,13 @@ MonoBehaviour:
stubtype:
electriccurrent:
voltage:
zerosequencecurrent:
aphasecurrent:
bphasecurrent:
cphasecurrent:
aphasevoltage:
bphasevoltage:
cphasevoltage:
--- !u!114 &1067605742
MonoBehaviour:
m_ObjectHideFlags: 0
@ -17740,6 +17970,10 @@ MonoBehaviour:
BirdEyeView: {fileID: 932668468}
firstPersonController: {fileID: 0}
cameraControl1: {fileID: 0}
updownLadder: {fileID: 161696237}
laddersSprites:
- {fileID: 21300000, guid: 7c38c1312bb6fd74494d473da7c8cafd, type: 3}
- {fileID: 21300000, guid: 6728aef0a6aae2c44bc91e0959051d20, type: 3}
--- !u!114 &1067605748
MonoBehaviour:
m_ObjectHideFlags: 0
@ -22456,6 +22690,82 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1357699320}
m_CullTransparentMesh: 1
--- !u!1 &1359808510
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1359808511}
- component: {fileID: 1359808513}
- component: {fileID: 1359808512}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1359808511
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359808510}
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: 161696235}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.0000038146973, y: 0}
m_SizeDelta: {x: -20.7807, y: -20.8035}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1359808512
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359808510}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 6728aef0a6aae2c44bc91e0959051d20, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1359808513
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359808510}
m_CullTransparentMesh: 1
--- !u!1 &1361738230
GameObject:
m_ObjectHideFlags: 0
@ -25440,6 +25750,83 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1499230399}
m_CullTransparentMesh: 1
--- !u!1 &1503299656
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1503299657}
- component: {fileID: 1503299659}
- component: {fileID: 1503299658}
m_Layer: 5
m_Name: Tips
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1503299657
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1503299656}
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:
- {fileID: 1021248375}
m_Father: {fileID: 161696235}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 48.5}
m_SizeDelta: {x: 94.966, y: 44.9504}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1503299658
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1503299656}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 812e8d836d14cd44485231fc8fa79ead, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1503299659
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1503299656}
m_CullTransparentMesh: 1
--- !u!1 &1503687989
GameObject:
m_ObjectHideFlags: 0
@ -33141,6 +33528,7 @@ RectTransform:
- {fileID: 932668465}
- {fileID: 1657133649}
- {fileID: 1612865501}
- {fileID: 161696235}
m_Father: {fileID: 1067605740}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@ -20,6 +21,10 @@ namespace Adam
public Toggle BirdEyeView;
public FirstPersonController firstPersonController;
public CameraControl1 cameraControl1;
public Toggle updownLadder;
public Sprite[] laddersSprites;
public Action<bool> ladderClick;
private Image ladderTips;
// Use this for initialization
private void Start()
{
@ -43,6 +48,18 @@ namespace Adam
}
SwitchPanel(false);
BirdEyeView.gameObject.SetActive(false);
ladderTips = updownLadder.transform.GetChild(0).GetComponent<Image>();
updownLadder.onValueChanged.AddListener((isOn) =>
{
ladderTips.sprite = laddersSprites[1];
if (isOn)
{
ladderTips.sprite = laddersSprites[0];
}
ladderClick?.Invoke(isOn);
});
updownLadder.gameObject.SetActive(false);
}
public void SwitchPanel(bool isActive)

View File

@ -0,0 +1,63 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//============================================================
//支持中文文件使用UTF-8编码
//@author Adam
//@create 20240607
//@company Adam
//
//@description:
//============================================================
namespace Components
{
public class LadderCtr : MonoBehaviour
{
private SkinnedMeshRenderer smr;
public List<GameObject> ladders = new List<GameObject>();
public float minValue = 0f;
public float maxValue = 100f;
public float t = 0.08f;
public float interpolatedValue;
public bool isPlay = false;
// Use this for initialization
public Transform playerPos;
public void SwitchLadder(string ladderName)
{
if (ladderName != "")
{
gameObject.SetActive(true);
isPlay = true;
GameObject ladder = null;
for (int i = 0; i < ladders.Count; i++)
{
int index = i;
ladders[index].SetActive(false);
if (ladders[index].name.Equals(ladderName))
{
ladders[index].SetActive(true);
ladder = ladders[index];
}
}
smr = ladder.GetComponentInChildren<SkinnedMeshRenderer>();
}
else
{
isPlay = false;
smr.SetBlendShapeWeight(0, 0);
gameObject.SetActive(false);
}
}
private void Update()
{
if (!isPlay) return;
interpolatedValue = Mathf.Lerp(interpolatedValue, maxValue, t);
smr.SetBlendShapeWeight(0, interpolatedValue);
if (interpolatedValue > (maxValue - 8f))
{
isPlay = false;
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4f3d17fd36697b44285f0f2c1e84b1ed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -59,6 +59,7 @@ public class ExitCheckController : MonoBehaviour
}
WaitUpScore();
UIManager.Instance.bottomCotroller.BirdEyeView.gameObject.SetActive(false);
UIManager.Instance.bottomCotroller.updownLadder.gameObject.SetActive(false);
End.SetActive(true);
ExitCheckPanel.SetActive(false);
break;

View File

@ -49,10 +49,10 @@ public class ToolsItemManager : MonoSingleton<ToolsItemManager>
/// 在工具间生成图标
/// </summary>
/// <param name="toolName"></param>
public void CreatToolItem(GameObject currentModel,Vector3 pos,Vector3 RotPos)
public void CreatToolItem(GameObject currentModel, Vector3 pos, Vector3 RotPos)
{
ToolItem tTemp = Instantiate(toolItemPrefab, toolsContent);
tTemp.SetValue(currentModel.name, currentModel.transform, pos,RotPos);
tTemp.SetValue(currentModel.name, currentModel.transform, pos, RotPos);
tTemp.SetState(true);
if (tTemp.toolName == "工作卡")
{
@ -74,6 +74,17 @@ public class ToolsItemManager : MonoSingleton<ToolsItemManager>
SetToggleState();
});
}
else if (tTemp.toolName == "梯子" || tTemp.toolName == "梯子_钢")
{
tTemp.selfButton.onClick.AddListener(() =>
{
if (GameManager.Instance.ladderCtr != null)
{
GameManager.Instance.ladderCtr.SwitchLadder(tTemp.toolName);
UIManager.Instance.bottomCotroller.updownLadder.gameObject.SetActive(true);
}
});
}
else
{
tTemp.selfButton.onClick.AddListener(() =>

View File

@ -78,6 +78,8 @@ public class UIManager : MonoSingleton<UIManager>
backToToolBtn.gameObject.SetActive(false);
bottomCotroller.BirdEyeView.isOn = false;
bottomCotroller.BirdEyeView.gameObject.SetActive(false);
bottomCotroller.updownLadder.isOn = false;
bottomCotroller.updownLadder.gameObject.SetActive(false);
//if (GlobalFlag.isRecord == "1")
//{
// uis.OnStopRecorad();

View File

@ -23,7 +23,7 @@ ModelImporter:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
@ -77,7 +77,12 @@ ModelImporter:
humanDescription:
serializedVersion: 3
human: []
skeleton: []
skeleton:
- name: "\u68AF\u5B50(Clone)"
parentName:
position: {x: 3.784895e-10, y: 0.0027149264, z: 2.013036}
rotation: {x: 0.71597385, y: 0, z: 0, w: 0.6981271}
scale: {x: -0.71136904, y: -0.71136904, z: -0.71136904}
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
@ -92,9 +97,9 @@ ModelImporter:
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
avatarSetup: 1
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
additionalBone: 0
userData:

View File

@ -1,3 +1,4 @@
using Components;
using DG.Tweening;
using System;
using System.Collections;
@ -50,7 +51,9 @@ public class GameManager : MonoBehaviour
public bool redok = false;
public string redData;
public DoolsPlayer DoolsPlayer;
public LadderCtr ladderCtr;
private Vector3 lastPlayerPos = new Vector3();
private Vector3 lastPlayereugle = new Vector3();
public void Awake()
{
if (Instance != null)
@ -67,7 +70,7 @@ public class GameManager : MonoBehaviour
}
}
// Start is called before the first frame update
private void Start()
private void Start()
{
UIManager.Instance.toolsItemManager.ItemClick.AddListener(ToolsShow);
UIManager.Instance.toolsItemManager.recoverEvent.AddListener(() =>
@ -80,7 +83,8 @@ public class GameManager : MonoBehaviour
});
//string sceneInfo = GlobalFlag.SceneInfo();
//var tempStr = sceneInfo.Split('_');
if (ladderCtr != null)
UIManager.Instance.bottomCotroller.ladderClick += SetPlayerUpDown;
int pvwCount = 0;
if (GlobalFlag.userType == "正常")
{
@ -118,6 +122,31 @@ public class GameManager : MonoBehaviour
// await FractionManager.Instance.overAsync(5, 10, "检查光伏");
//}
}
/// <summary>
/// ÉèÖÃÍæ¼ÒÐÅÏ¢
/// </summary>
public void SetPlayerUpDown(bool isUpDown)
{
if (isUpDown)
{
lastPlayerPos = FirstPersonController.transform.position;
lastPlayereugle = FirstPersonController.transform.eulerAngles;
Debug.Log("upLadder");
FirstPersonController.transform.position = ladderCtr.playerPos.position;
FirstPersonController.transform.eulerAngles = ladderCtr.playerPos.eulerAngles;
FirstPersonController.GetComponent<Rigidbody>().useGravity = false;
FirstPersonController.playerCanMove = false;
}
else
{
Debug.Log("downLadder");
FirstPersonController.transform.position = lastPlayerPos;
FirstPersonController.transform.eulerAngles = lastPlayereugle;
FirstPersonController.GetComponent<Rigidbody>().useGravity = true;
FirstPersonController.playerCanMove = true;
}
}
public void init()
{
//if (UIManager.Instance.Reconnection.HandGameObject)
@ -277,6 +306,15 @@ public class GameManager : MonoBehaviour
{
GameObj.transform.localPosition = new Vector3(Player.transform.position.x + 0.43f, Player.transform.position.y + 0.66f, Player.transform.position.z + 1.5f);
}
private void OnDestroy()
{
UIManager.Instance.bottomCotroller.ladderClick -= SetPlayerUpDown;
}
private void OnDisable()
{
UIManager.Instance.bottomCotroller.ladderClick -= SetPlayerUpDown;
}
}
/// <summary>
/// 后台读的数据

View File

@ -1132,7 +1132,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3a104cb69d531064393bd332a91432cd, type: 3}
m_Name:
m_EditorClassIdentifier:
attribute: 1
attribute: 2
rightAndWrong: 0
onEnter:
m_PersistentCalls:
@ -1149,7 +1149,6 @@ MonoBehaviour:
line: {fileID: 0}
Higth: {fileID: 0}
selfHighlighter: {fileID: 0}
tipPrefab: {fileID: 3004857750428858783, guid: 5cb5fabd80716b64b88f3517ee4bbbc3, type: 3}
--- !u!1 &8015092707789456212
GameObject:
m_ObjectHideFlags: 0

View File

@ -1049,7 +1049,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3a104cb69d531064393bd332a91432cd, type: 3}
m_Name:
m_EditorClassIdentifier:
attribute: 1
attribute: 2
rightAndWrong: 0
onEnter:
m_PersistentCalls:
@ -1066,7 +1066,6 @@ MonoBehaviour:
line: {fileID: 0}
Higth: {fileID: 0}
selfHighlighter: {fileID: 0}
tipPrefab: {fileID: 3004857750428858783, guid: 5cb5fabd80716b64b88f3517ee4bbbc3, type: 3}
--- !u!1 &6615531994783129433
GameObject:
m_ObjectHideFlags: 0
@ -1382,7 +1381,7 @@ PrefabInstance:
- target: {fileID: -3887185075125053422, guid: e407c1c5bf16b5a448604dae3dd46c0a, type: 3}
propertyPath: m_Materials.Array.data[1]
value:
objectReference: {fileID: 2100000, guid: 93b452f55154acf47ac03b89e9adcd13, type: 2}
objectReference: {fileID: 7528006172127554626, guid: e407c1c5bf16b5a448604dae3dd46c0a, type: 3}
- target: {fileID: -3887185075125053422, guid: e407c1c5bf16b5a448604dae3dd46c0a, type: 3}
propertyPath: m_BlendShapeWeights.Array.size
value: 1

View File

@ -7832,6 +7832,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 865266376}
m_Modifications:
- target: {fileID: 5498291668593762494, guid: 20be3215a193c0f4ea28dba46d5e7286, type: 3}
propertyPath: attribute
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5498291668593762494, guid: 20be3215a193c0f4ea28dba46d5e7286, type: 3}
propertyPath: rightAndWrong
value: 1
@ -7989,6 +7993,10 @@ PrefabInstance:
propertyPath: m_Name
value: "\u68AF\u5B50_\u94A2"
objectReference: {fileID: 0}
- target: {fileID: 5351074591547155455, guid: 061d6d00bef6ce24d9995b7112c4d36c, type: 3}
propertyPath: attribute
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5351074591547155455, guid: 061d6d00bef6ce24d9995b7112c4d36c, type: 3}
propertyPath: rightAndWrong
value: 2

View File

@ -1 +1 @@
Build from ADAM at 2024/6/7 13:50:13
Build from ADAM at 2024/6/7 19:00:56