1
0
mirror of synced 2025-01-18 15:24:04 +01:00
fix ipc touch not working bug;
fix player height text not updating bug
This commit is contained in:
xpeng 2022-10-07 17:12:42 +02:00
parent 92a1395c79
commit 390c807f6c
15 changed files with 267 additions and 36 deletions

View File

@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 07 - Default
m_Name: Default
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []

135
Assets/Material/Head.mat Normal file
View File

@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2938502657991910120
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 5
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Head
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON
- _RECEIVE_SHADOWS_OFF
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _Blend: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossinessSource: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 0
- _Shininess: 0
- _Smoothness: 0.5
- _SmoothnessSource: 0
- _SmoothnessTextureChannel: 0
- _SpecSource: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 1
- _WorkflowMode: 0
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0.63774544, g: 0.742691, b: 0.888, a: 0.9019608}
- _Color: {r: 0.63774544, g: 0.742691, b: 0.888, a: 0.9019608}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: ec53dcc57d04ff941b2974ead0217a06
folderAsset: yes
DefaultImporter:
guid: 7e16beeddf2a66649a08686cdd54c2ef
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -124,8 +124,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 0.40452066, b: 0.27599996, a: 0.8}
- _Color: {r: 1, g: 0.40452063, b: 0.27599993, a: 0.8}
- _BaseColor: {r: 1, g: 0.40452063, b: 0.27599993, a: 0.7490196}
- _Color: {r: 1, g: 0.4045206, b: 0.2759999, a: 0.7490196}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -140,10 +140,10 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0.29600006, g: 0.6600001, b: 1, a: 0.8}
- _BaseColor: {r: 0.29600003, g: 0.6600001, b: 1, a: 0.7490196}
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 0.29600003, g: 0.6600001, b: 1, a: 0.8}
- _Color: {r: 0.296, g: 0.6600001, b: 1, a: 0.7490196}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0.19999993, g: 0.19999993, b: 0.19999993, a: 1}

View File

@ -5342,6 +5342,103 @@ GameObject:
type: 3}
m_PrefabInstance: {fileID: 1774209490}
m_PrefabAsset: {fileID: 0}
--- !u!1 &946855116
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 946855117}
- component: {fileID: 946855120}
- component: {fileID: 946855119}
- component: {fileID: 946855118}
m_Layer: 3
m_Name: Head Cube Face
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &946855117
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946855116}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.141, z: 0.5993}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1514989168}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &946855118
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946855116}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &946855119
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946855116}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7e16beeddf2a66649a08686cdd54c2ef, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &946855120
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 946855116}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &948374057
BoxCollider:
m_ObjectHideFlags: 0
@ -8642,7 +8739,8 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.15, y: 0.075, z: 0.075}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 946855117}
m_Father: {fileID: 2095231903}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -8679,7 +8777,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
- {fileID: 2100000, guid: 7e16beeddf2a66649a08686cdd54c2ef, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -9840,8 +9938,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
target: {fileID: 0}
smoothSpeed: 0.125
PositionOffset: {x: 0, y: 0, z: 0}
smoothSpeed: 0.05
FPS: 60
--- !u!114 &1740661844
MonoBehaviour:

View File

@ -1,3 +0,0 @@
{
"name": "Camera"
}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 2dcfcfc00d4ac7749bb60698b85f1dc2
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -45,7 +45,7 @@ public class Config
FPS144 = 7
}
public float SpectatorFOV = 40;
public float SpectatorSmooth = 0.125f;
public float SpectatorSmooth = 0.05f;
public float[] TPCamPosition = new float[3] { -0.6f, 1.8f, -1.2f };
public float[] TPCamRotation = new float[3] { 23, 35, 0 };
public float HandSize = 8f;

View File

@ -61,7 +61,7 @@ public class ConfigManager : MonoBehaviour
{
isSavingConfig = true;
saverTimer = 0;
Debug.Log("Saving config file");
//Debug.Log("Saving config file");
}
public void saveFileWait()
{

View File

@ -8,7 +8,19 @@ using TMPro;
public class ValueManager : MonoBehaviour
{
TMP_Text tmp;
public float Value;
public float Value
{
get
{
return _value;
}
set
{
_value = value;
onValueChanged?.Invoke();
}
}
private float _value;
float tempValue;
public bool isPointerDown = false;
public UnityEvent onValueChanged = new UnityEvent();
@ -25,12 +37,11 @@ public class ValueManager : MonoBehaviour
ChangeValueContinue(tempValue);
}
}
public void ChangeValueContinue(float _value)
public void ChangeValueContinue(float __value)
{
tempValue = _value;
Value += Time.deltaTime * _value;
tempValue = __value;
Value += Time.deltaTime * __value;
isPointerDown = true;
onValueChanged?.Invoke();
}
public void PointerState(bool state)
{
@ -39,10 +50,9 @@ public class ValueManager : MonoBehaviour
public void ResetValue()
{
Value = 0;
onValueChanged?.Invoke();
}
public void UpdateText()
{
tmp.text = String.Format("{0:F2}", Value);
tmp.text = String.Format("{0:F2}", _value);
}
}

View File

@ -3,8 +3,7 @@ using UnityEngine;
public class CameraSmooth : MonoBehaviour {
public Transform target;
public float smoothSpeed = 0.125f;
public Vector3 PositionOffset;
public float smoothSpeed = 0.05f;
public int FPS = 60;
private void Start()
{
@ -14,7 +13,7 @@ public class CameraSmooth : MonoBehaviour {
void Update ()
{
if (target == null) return;
transform.position = Vector3.Lerp(transform.position, target.position + PositionOffset, smoothSpeed);
transform.position = Vector3.Lerp(transform.position, target.position, smoothSpeed);
transform.rotation = Quaternion.Lerp(transform.rotation, target.rotation, smoothSpeed);
}
}

View File

@ -102,8 +102,6 @@ public class TouchManager : MonoBehaviour
// Debug.Log("Sending Right");
SendTouch(ComR, TouchPackR);
}
if (ConfigManager.config.useIPCTouch)
IPCManager.SetTouchData(TouchPackAll); //send touch data to IPC
}
IEnumerator TouchTest(bool State) //this is a touch test code
@ -249,6 +247,8 @@ public class TouchManager : MonoBehaviour
Area += Area / 5 * 3 + 7;
ByteHelper.SetBit(TouchPackL, Area, State);
}
if (ConfigManager.config.useIPCTouch)
IPCManager.SetTouchData(TouchPackAll); //send touch data to IPC
}
}