bugs fix
fix ipc touch not working bug; fix player height text not updating bug
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec53dcc57d04ff941b2974ead0217a06
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"name": "Camera"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2dcfcfc00d4ac7749bb60698b85f1dc2
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user