提交二十项修改
This commit is contained in:
parent
3ef7121059
commit
c888f38cdd
Binary file not shown.
After Width: | Height: | Size: 144 KiB |
|
@ -0,0 +1,135 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0128dc9a1e444534ea6027038c8425ec
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 1
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -5906,6 +5906,18 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8116758301364444328, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7104531441027181592, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -6135323959174509748, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5260060894338397145, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: -0.00006103506
|
||||
|
@ -5918,6 +5930,10 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0.00016784667
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3094519758374681016, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -3013769497943921491, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.5318197
|
||||
|
@ -5938,6 +5954,10 @@ PrefabInstance:
|
|||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1437794174185993398, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1934297243589407246, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1.2
|
||||
|
@ -5970,6 +5990,26 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2097911494752482903, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2337052985069988118, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3306945913174669214, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3587840515185738510, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4100218984641909529, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5213865969853075656, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_DirtyAABB
|
||||
value: 0
|
||||
|
@ -6002,6 +6042,14 @@ PrefabInstance:
|
|||
propertyPath: m_BlendShapeWeights.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6464544102738605386, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8526372940484349156, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8526372940484349156, guid: 13e6757fcb98e1e4bbc94e07f67e0dbb, type: 3}
|
||||
propertyPath: m_TagString
|
||||
value: YanDian
|
||||
|
|
|
@ -136,7 +136,7 @@ public class FirstPersonController : MonoBehaviour
|
|||
|
||||
#endregion
|
||||
|
||||
float fieldView;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
@ -369,10 +369,6 @@ public class FirstPersonController : MonoBehaviour
|
|||
#endregion
|
||||
|
||||
CheckGround();
|
||||
fieldView = playerCamera.fieldOfView;
|
||||
fieldView -= Input.GetAxis("Mouse ScrollWheel") * 10f;
|
||||
fieldView = Mathf.Clamp(fieldView, 20, 60);
|
||||
playerCamera.fieldOfView = fieldView;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ BoxCollider:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6219929193322986586}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_IsTrigger: 1
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 10.199997, y: 0.25000054, z: 8}
|
||||
|
|
|
@ -3277,7 +3277,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
stopValveImage: {fileID: 1948143378}
|
||||
timeCount: 0
|
||||
limitTime: 0.15
|
||||
limitTime: 0.1
|
||||
linearMeasure: 0
|
||||
index: 0
|
||||
currentPos: {x: 0, y: 0}
|
||||
|
@ -9081,18 +9081,18 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 273619910}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalRotation: {x: 0, y: 0, z: -1, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1850967338}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -180}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 628.0852, y: 416.18}
|
||||
m_SizeDelta: {x: 1257.478, y: 634.334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &273619912
|
||||
MonoBehaviour:
|
||||
|
@ -9114,7 +9114,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: c8fcf47c17936f7458d3aa720704205e, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 0128dc9a1e444534ea6027038c8425ec, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
@ -18637,7 +18637,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
stopValveImage: {fileID: 1752228207}
|
||||
timeCount: 0
|
||||
limitTime: 0.2
|
||||
limitTime: 0.1
|
||||
linearMeasure: 0
|
||||
index: 0
|
||||
currentPos: {x: 0, y: 0}
|
||||
|
@ -54462,8 +54462,8 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1425909734}
|
||||
m_LocalRotation: {x: 0.26166272, y: 0.68143034, z: -0.28754756, w: 0.62008214}
|
||||
m_LocalPosition: {x: 81.89592, y: 21.541733, z: 317.80313}
|
||||
m_LocalRotation: {x: 0.036638454, y: 0.94280463, z: -0.31224412, w: 0.110818714}
|
||||
m_LocalPosition: {x: 92.73303, y: 18.33218, z: 339.1505}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
@ -64382,6 +64382,20 @@ CapsuleCollider:
|
|||
m_Height: 1.8
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.9, z: 0}
|
||||
--- !u!114 &1679712374
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1679712372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d4a7a090670be304ebe50e87679d3257, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isWorkingPersonnel: 0
|
||||
game: {fileID: 8536413114597608434}
|
||||
--- !u!1 &1680200294
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -70464,7 +70478,7 @@ Canvas:
|
|||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_Camera: {fileID: 2401820166666229530}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
|
@ -93254,6 +93268,7 @@ GameObject:
|
|||
- component: {fileID: 2401820165377604996}
|
||||
- component: {fileID: 2067264123610548656}
|
||||
- component: {fileID: 2401820165377604997}
|
||||
- component: {fileID: 2401820165377605007}
|
||||
m_Layer: 0
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
|
@ -93261,6 +93276,19 @@ GameObject:
|
|||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2401820165377605007
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2401820165377605006}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 03962d1a310647749949f007b0d3edb7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerCamera: {fileID: 2401820166666229530}
|
||||
--- !u!4 &2401820166598484376
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -100719,7 +100747,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4250994750885528243}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 72.8, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 57.3, z: 0}
|
||||
m_LocalScale: {x: 2.2007926, y: -0.015401587, z: 2.2007926}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -21,7 +21,7 @@ public class AmpereMeter : MonoBehaviour
|
|||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
//1.参数ray 为射线碰撞检测的光线(返回一个从相机到屏幕鼠标位置的光线)
|
||||
Ray ray = cam.ScreenPointToRay(Input.mousePosition);
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hit;
|
||||
if (Physics.Raycast(ray, out hit, 50) && !EventSystem.current.IsPointerOverGameObject()) //如果碰撞检测到物体
|
||||
{
|
||||
|
|
|
@ -4,148 +4,33 @@ using UnityEngine;
|
|||
|
||||
public class CameraControl : MonoBehaviour
|
||||
{
|
||||
public static CameraControl Instance { private set; get; }
|
||||
public float minDis = 0.5f;
|
||||
public float maxDis = 1.5f;
|
||||
public float rSmoothTime = 0.3f, sSmoothTime = 0.3f, mSmoothTime = 0.3f;
|
||||
public float mouseRotSpeed = 8, mouseMoveSpeed = 1, mouseZoomSpeed = 15;
|
||||
public float minVerticalAngle = -30, maxVerticalAngle = 60;
|
||||
public float minHorizontalAngle = -60, maxHorizontalAngle = 60;
|
||||
[Header("初始化数据"), SerializeField] float orginDis = 0;
|
||||
Vector3 currentPosition, movVelocity, targetPosition;
|
||||
float targetDis, currentDis, disVelocity;
|
||||
Vector3 currentRotation, targetRotation, rotVelocity;
|
||||
[SerializeField] Transform target;
|
||||
Vector3 pos;
|
||||
bool isok = false;
|
||||
public bool ZhoLI = false;//是否是重力模式
|
||||
float speed = 20;
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
SetCameraTrans();
|
||||
//Debug.Log("CameraControl");
|
||||
}
|
||||
[ContextMenu("设置相机位置")]
|
||||
private void SetCameraTrans()
|
||||
{
|
||||
currentDis = targetDis = orginDis;
|
||||
currentPosition = targetPosition = transform.position;
|
||||
currentRotation = targetRotation = transform.localEulerAngles;
|
||||
}
|
||||
public void SetOrginDis(Vector3 orginPos, Vector3 orginRO)
|
||||
{
|
||||
target = null;
|
||||
targetPosition = orginPos;
|
||||
targetRotation = orginRO;
|
||||
targetDis = 0;
|
||||
}
|
||||
public void SetPos(Vector3 pos,Vector3 ro)
|
||||
{
|
||||
targetPosition = pos;
|
||||
targetRotation = ro;
|
||||
}
|
||||
float fieldView;
|
||||
public Camera playerCamera;
|
||||
private void Update()
|
||||
{
|
||||
if (Input.touchCount == 0 && Input.GetMouseButton(1))
|
||||
fieldView = playerCamera.fieldOfView;
|
||||
fieldView -= Input.GetAxis("Mouse ScrollWheel") * 10f;
|
||||
fieldView = Mathf.Clamp(fieldView, 30, 60);
|
||||
playerCamera.fieldOfView = fieldView;
|
||||
switch (fieldView/10)
|
||||
{
|
||||
targetRotation.y += Input.GetAxis("Mouse X") * mouseRotSpeed;
|
||||
targetRotation.x -= Input.GetAxis("Mouse Y") * mouseRotSpeed;
|
||||
}
|
||||
targetDis = targetDis - Input.GetAxis("Mouse ScrollWheel") * mouseZoomSpeed;
|
||||
targetRotation.x = Mathf.Clamp(targetRotation.x, minVerticalAngle, maxVerticalAngle);
|
||||
//targetRotation.y = Mathf.Clamp(targetRotation.y, minHorizontalAngle, maxHorizontalAngle);
|
||||
targetDis = Mathf.Clamp(targetDis, minDis, maxDis);
|
||||
currentDis = Mathf.SmoothDamp(currentDis, targetDis, ref disVelocity, rSmoothTime);
|
||||
currentRotation = Vector3.SmoothDamp(currentRotation, targetRotation, ref rotVelocity, rSmoothTime);
|
||||
var tmpRotation = Quaternion.Euler(currentRotation);
|
||||
var offset = tmpRotation * Vector3.forward * -currentDis;
|
||||
if (target != null)
|
||||
{
|
||||
targetPosition = target.position;
|
||||
}
|
||||
currentPosition = Vector3.SmoothDamp(currentPosition, targetPosition, ref movVelocity, mSmoothTime);
|
||||
var tmpPosition = currentPosition + offset;
|
||||
if (transform.rotation != tmpRotation)
|
||||
{
|
||||
transform.rotation=tmpRotation;
|
||||
}
|
||||
if (ZhoLI)
|
||||
{
|
||||
if (transform.position.y > 3f)
|
||||
{
|
||||
transform.position = new Vector3(transform.position.x, 2.1f, transform.position.z);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (transform.position.y > 20f)
|
||||
{
|
||||
transform.position = new Vector3(transform.position.x, 20f, transform.position.z);
|
||||
}
|
||||
}
|
||||
if (transform.position.y < 2f)
|
||||
{
|
||||
transform.position = new Vector3(transform.position.x, 2.1f, transform.position.z);
|
||||
}
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
speed = 25f;
|
||||
}
|
||||
else
|
||||
{
|
||||
speed = 12f;
|
||||
}
|
||||
case 3:
|
||||
|
||||
break;
|
||||
case 4:
|
||||
|
||||
float x= Mathf.Clamp(transform.position.x, -137f, 102f);
|
||||
//float y = Mathf.Clamp(transform.position.y, 2.1f, 20f);
|
||||
float z= Mathf.Clamp(transform.position.z, -125f, 119f);
|
||||
transform.position = new Vector3(x,transform.position.y,z);
|
||||
break;
|
||||
case 5:
|
||||
|
||||
break;
|
||||
case 6:
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void FixedUpdate()
|
||||
{
|
||||
float x = Input.GetAxis("Horizontal");
|
||||
float y = Input.GetAxis("Vertical");
|
||||
float z = Input.GetAxis("Updown");
|
||||
if (x != 0 || y != 0 || z != 0)
|
||||
{
|
||||
Debug.Log("Horizontal " + x + " Ver" + y);
|
||||
if (!ZhoLI)
|
||||
{
|
||||
z = (z * Time.deltaTime * speed);
|
||||
Debug.Log(z);
|
||||
}
|
||||
pos = new Vector3(x * Time.deltaTime * speed, z, y * Time.deltaTime * speed);
|
||||
isok = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
isok = false;
|
||||
}
|
||||
if (isok)
|
||||
{
|
||||
if (transform.position != pos || x != 0 || y != 0||z !=0)
|
||||
{
|
||||
transform.Translate(pos);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//public void Fly()
|
||||
//{
|
||||
// ZhoLI = false;
|
||||
// transform.GetComponent<Rigidbody>().useGravity = false;
|
||||
// transform.position = new Vector3(transform.position.x, 20f, transform.position.z);
|
||||
//}
|
||||
//public void NotFly()
|
||||
//{
|
||||
// ZhoLI = true;
|
||||
// transform.GetComponent<Rigidbody>().useGravity = true;
|
||||
// transform.position = new Vector3(transform.position.x,2.1f,transform.position.z);
|
||||
//}
|
||||
}
|
||||
////声明部分public float horizontalinput;
|
||||
/////水平参数public float Verticalinput;
|
||||
|
|
|
@ -91,29 +91,29 @@ public class GameManager : MonoBehaviour
|
|||
|
||||
private void Update()
|
||||
{
|
||||
switch (interactiveEnum)
|
||||
{
|
||||
case Interactive.none:
|
||||
for (int i = 0; i < interactive.Count; i++)
|
||||
{
|
||||
interactive[i].transform.GetComponent<door_control>().启用交互 = true;
|
||||
}
|
||||
break;
|
||||
case Interactive.YanDian:
|
||||
for (int i = 0; i < interactive.Count; i++)
|
||||
{
|
||||
interactive[i].transform.GetComponent<door_control>().启用交互 = false;
|
||||
}
|
||||
break;
|
||||
case Interactive.QianXing:
|
||||
for (int i = 0; i < interactive.Count; i++)
|
||||
{
|
||||
interactive[i].transform.GetComponent<door_control>().启用交互 = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//switch (interactiveEnum)
|
||||
//{
|
||||
// case Interactive.none:
|
||||
// for (int i = 0; i < interactive.Count; i++)
|
||||
// {
|
||||
// interactive[i].transform.GetComponent<door_control>().启用交互 = true;
|
||||
// }
|
||||
// break;
|
||||
// case Interactive.YanDian:
|
||||
// for (int i = 0; i < interactive.Count; i++)
|
||||
// {
|
||||
// interactive[i].transform.GetComponent<door_control>().启用交互 = false;
|
||||
// }
|
||||
// break;
|
||||
// case Interactive.QianXing:
|
||||
// for (int i = 0; i < interactive.Count; i++)
|
||||
// {
|
||||
// interactive[i].transform.GetComponent<door_control>().启用交互 = true;
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
//}
|
||||
if (Input.GetKeyDown(KeyCode.K))
|
||||
{
|
||||
ToolsShow(QianXing);
|
||||
|
|
|
@ -16,7 +16,7 @@ public class BoxDools : MonoBehaviour
|
|||
{
|
||||
for (int i = 0; i < GameManager.ins.interactive.Count; i++)
|
||||
{
|
||||
GameManager.ins.interactive[i].GetComponent<door_control>().enabled = true;
|
||||
GameManager.ins.interactive[i].GetComponent<door_control>().启用交互 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,8 +26,11 @@ public class BoxDools : MonoBehaviour
|
|||
{
|
||||
for (int i = 0; i < GameManager.ins.interactive.Count; i++)
|
||||
{
|
||||
GameManager.ins.interactive[i].GetComponent<door_control>().enabled = true;
|
||||
GameManager.ins.interactive[i].GetComponent<door_control>().animator.Play(GameManager.ins.interactive[i].GetComponent<door_control>().¹ØÃŶ¯»);
|
||||
GameManager.ins.interactive[i].GetComponent<door_control>().启用交互 = false;
|
||||
if (GameManager.ins.interactive[i].GetComponent<door_control>().是否开门)
|
||||
{
|
||||
GameManager.ins.interactive[i].GetComponent<door_control>().animator.Play(GameManager.ins.interactive[i].GetComponent<door_control>().关门动画);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ public class BoxPengZhuang : MonoBehaviour
|
|||
{
|
||||
fraction.CompletedorNot = true;
|
||||
}
|
||||
PlayerPrefs.SetString("isWorkingPersonnel", "1");
|
||||
GetComponent<Fraction>().CompletedorNot = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class StopValve : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDra
|
|||
|
||||
public void OnBeginDrag(PointerEventData eventData)
|
||||
{
|
||||
currentPos = eventData.position;
|
||||
currentPos = transform.position;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5ce293192264ba143b0b7754dc6a46a7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,40 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class WorkingPersonnel : MonoBehaviour
|
||||
{
|
||||
public static WorkingPersonnel instance;
|
||||
[SerializeField] string isWorkingPersonnel;
|
||||
[SerializeField] GameObject game;
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
if (string.IsNullOrEmpty(PlayerPrefs.GetString("isWorkingPersonnel")))
|
||||
{
|
||||
PlayerPrefs.GetString("isWorkingPersonnel", "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
isWorkingPersonnel = PlayerPrefs.GetString("isWorkingPersonnel");
|
||||
if (isWorkingPersonnel.Equals("1"))
|
||||
{
|
||||
game.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
PlayerPrefs.SetString("isWorkingPersonnel","0");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d4a7a090670be304ebe50e87679d3257
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -35,12 +35,12 @@
|
|||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.ide.visualstudio": "2.0.16",
|
||||
"com.unity.ide.rider": "3.0.15",
|
||||
"com.unity.ide.rider": "3.0.16",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.editorcoroutines": "1.0.0",
|
||||
"com.unity.performance.profile-analyzer": "1.1.1",
|
||||
"com.unity.test-framework": "1.1.31",
|
||||
"com.unity.testtools.codecoverage": "1.0.1"
|
||||
"com.unity.testtools.codecoverage": "1.2.2"
|
||||
}
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
|
@ -92,7 +92,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.services.core": {
|
||||
"version": "1.4.2",
|
||||
"version": "1.6.0",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -121,7 +121,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.testtools.codecoverage": {
|
||||
"version": "1.0.1",
|
||||
"version": "1.2.2",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
|
|
@ -18,7 +18,7 @@ PhysicsManager:
|
|||
m_ClothInterCollisionDistance: 0
|
||||
m_ClothInterCollisionStiffness: 0
|
||||
m_ContactsGeneration: 1
|
||||
m_LayerCollisionMatrix: 7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_LayerCollisionMatrix: 7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefeffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_AutoSimulation: 1
|
||||
m_AutoSyncTransforms: 0
|
||||
m_ReuseCollisionCallbacks: 1
|
||||
|
|
|
@ -24,7 +24,7 @@ TagManager:
|
|||
- UI
|
||||
- QianXing
|
||||
- Player
|
||||
-
|
||||
- Men
|
||||
-
|
||||
-
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue