改现场场景

This commit is contained in:
陈向学 2024-08-21 13:42:42 +08:00
parent a05111a86c
commit 8f07996c68
8 changed files with 2414 additions and 157 deletions

View File

@ -209,6 +209,9 @@ public class FirstPersonController : MonoBehaviour
private void Update()
{
float scrollValue=Input.GetAxis("Mouse ScrollWheel");
playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 20, 60);
#region Camera
// Control camera movement

View File

@ -854,6 +854,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c14d4048c65d4de42bed3852172e0883, type: 3}
m_Name:
m_EditorClassIdentifier:
triggerID: 0
triggerName:
_highlight: {fileID: 0}
toolType: 0
dangweiValue: 0
dangWei: {fileID: 4800734424466799504}

View File

@ -30,7 +30,7 @@ Transform:
m_GameObject: {fileID: 7175692158753146328}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.263, y: -0.8240001, z: -2.3841999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.6, y: 0.6, z: 0.6}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7829523123839521089}
@ -275,6 +275,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7109556262b96d04ab6087785619c639, type: 3}
m_Name:
m_EditorClassIdentifier:
triggerId: 0
toolType: 2
--- !u!1001 &7719931383897142954
PrefabInstance:

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,21 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Device_Base : MonoBehaviour
public class Device_Base : PermanentTriggerBase
{
public int triggerId;
/// <summary>
/// 设备类型
/// </summary>
public DeviceType deviceType;
protected override void OnMEnter()
{
base.OnMEnter();
_highlight.highlighted = true;
}
protected override void OnMExit()
{
base.OnMExit();
_highlight.highlighted = false;
}
}

View File

@ -5,11 +5,21 @@ using UnityEngine;
/// <summary>
/// 묏야꼼죕샘잚
/// </summary>
public class Tool_Base : MonoBehaviour
public class Tool_Base : PermanentTriggerBase
{
public int triggerId;
/// <summary>
/// 묏야잚謹
/// </summary>
public ToolType toolType;
protected override void OnMEnter()
{
base.OnMEnter();
_highlight.highlighted = true;
}
protected override void OnMExit()
{
base.OnMExit();
_highlight.highlighted = false;
}
}

View File

@ -32,14 +32,14 @@ public class Tool_WireStripper : Tool_Base
//´ò¿ª
while (renderer.GetBlendShapeWeight(0) < 100)
{
vlaue += (Time.deltaTime * 50);
vlaue += (Time.deltaTime * 100);
renderer.SetBlendShapeWeight(0, vlaue);
yield return null;
}
//¹Ø±Õ
while (renderer.GetBlendShapeWeight(0) > 0)
{
vlaue -= (Time.deltaTime * 50);
vlaue -= (Time.deltaTime * 100);
renderer.SetBlendShapeWeight(0, vlaue);
yield return null;
}

View File

@ -21,7 +21,10 @@ public class PermanentTriggerBase : MonoBehaviour
private void Start()
{
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
if (GameManager.EventMgr != null)
{
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
}
OnStart();
}
private void SwitchSubProcessStepTriggerID(int arg0)