Merge branch 'main' of http://shu.sheziwanglo.cn:3000/wulongxiao/_xiaofang
This commit is contained in:
commit
975d8aac61
@ -1289,7 +1289,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 19
|
||||
m_RootOrder: 20
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &159663861
|
||||
PrefabInstance:
|
||||
@ -3892,7 +3892,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 25
|
||||
m_RootOrder: 26
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &479940076
|
||||
MonoBehaviour:
|
||||
@ -4059,7 +4059,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 14
|
||||
m_RootOrder: 15
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &542563896
|
||||
GameObject:
|
||||
@ -4554,7 +4554,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 18
|
||||
m_RootOrder: 19
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &583497863
|
||||
PrefabInstance:
|
||||
@ -4879,9 +4879,13 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3608877410834662313, guid: 03b72bf544470e747a3e2c1f172d9e5c, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4133915569911699731, guid: 03b72bf544470e747a3e2c1f172d9e5c, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 13
|
||||
value: 14
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4133915569911699731, guid: 03b72bf544470e747a3e2c1f172d9e5c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@ -5300,7 +5304,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 22
|
||||
m_RootOrder: 23
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &673038100
|
||||
PrefabInstance:
|
||||
@ -6495,7 +6499,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 24
|
||||
m_RootOrder: 25
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &810501282
|
||||
MonoBehaviour:
|
||||
@ -7531,7 +7535,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 16
|
||||
m_RootOrder: 17
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &996888830
|
||||
MonoBehaviour:
|
||||
@ -11781,7 +11785,7 @@ Transform:
|
||||
- {fileID: 1882199187}
|
||||
- {fileID: 119116319}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 26
|
||||
m_RootOrder: 27
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1455035651
|
||||
PrefabInstance:
|
||||
@ -11998,7 +12002,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 23
|
||||
m_RootOrder: 24
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1480398099
|
||||
PrefabInstance:
|
||||
@ -12099,7 +12103,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 21
|
||||
m_RootOrder: 22
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1481704192
|
||||
PrefabInstance:
|
||||
@ -12705,7 +12709,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 27
|
||||
m_RootOrder: 28
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1526740603
|
||||
MonoBehaviour:
|
||||
@ -12719,8 +12723,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 44720823678ca7c42a08f4409ab025ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
serverIP: ws://192.168.3.110
|
||||
serverPort: 8445
|
||||
serverIP: ws://124.221.149.22
|
||||
serverPort: 38445
|
||||
type:
|
||||
--- !u!1001 &1542437476
|
||||
PrefabInstance:
|
||||
@ -15722,7 +15726,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 20
|
||||
m_RootOrder: 21
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1912789160
|
||||
PrefabInstance:
|
||||
@ -16258,6 +16262,272 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 451052, guid: a76a24ac13d95fc45bd7fbcbc8b2caae, type: 3}
|
||||
m_PrefabInstance: {fileID: 1973606748}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1974768585
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 13
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: newPlayer
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5866666021909216657, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_Controller
|
||||
value:
|
||||
objectReference: {fileID: 9100000, guid: b6b0af1684cf4a3459f82fde7a3622e6, type: 2}
|
||||
- target: {fileID: 5866666021909216657, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
propertyPath: m_ApplyRootMotion
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
--- !u!1 &1974768586 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 6def8c21980f20945bbf5eeab570702a, type: 3}
|
||||
m_PrefabInstance: {fileID: 1974768585}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!136 &1974768587
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.3
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 1, z: 0}
|
||||
--- !u!54 &1974768588
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!65 &1974768590
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.5, y: 1.5, z: 0.5}
|
||||
m_Center: {x: 0, y: 1, z: 0}
|
||||
--- !u!114 &1974768591
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 340618fb82d9f7246a985879a59c7b4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 3
|
||||
mainCamera: {fileID: 1068997306}
|
||||
JumpAbility: 1
|
||||
JumpMoveSpeed: 100
|
||||
normalFOV: 60
|
||||
sprintFOV: 120
|
||||
fovChangeSpeed: 2
|
||||
walkTime: 1.8
|
||||
runTime: 1.5
|
||||
--- !u!114 &1974768592
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f5ee0c437a82c154fbb3f7f2d268c19b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
currentItem: {fileID: 0}
|
||||
--- !u!114 &1974768593
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 177156116ddbf5a4c811e0da050f8c9d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
detectionRadius: 10
|
||||
fireLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
--- !u!114 &1974768594
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 776645053b40a604db295f0167ee1a67, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
vaultDistance: 2
|
||||
vaultHeight: 2
|
||||
vaultLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
vaultForwardDistance: 0.5
|
||||
vaultUpwardHeight: 1
|
||||
--- !u!114 &1974768595
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b0e8bb916545c834b8981bdf116ec889, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
relativePosition: {x: 0, y: 0, z: 0}
|
||||
relativeRotation: {x: 0, y: 0, z: 0}
|
||||
pickUpRange: 2
|
||||
--- !u!114 &1974768596
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eccdd1a2db5ba4848bcb2eea6ed8ddb8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
cha: {fileID: 0}
|
||||
xfs: {fileID: 0}
|
||||
--- !u!114 &1974768597
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c377cd4742c7966498dda3a5e984db05, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
joystick: {fileID: 0}
|
||||
cameraTransform: {fileID: 1068997307}
|
||||
moveSpeed: 5
|
||||
characterControl: {fileID: 1974768591}
|
||||
mainCamera: {fileID: 1068997306}
|
||||
rb: {fileID: 0}
|
||||
normalFOV: 60
|
||||
sprintFOV: 120
|
||||
fovChangeSpeed: 2
|
||||
walkTime: 0
|
||||
runTime: 0
|
||||
cameraControl: {fileID: 1068997308}
|
||||
--- !u!114 &1974768598
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a03ec7aa563e32d4ea7ce35cdd3e6f2b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Mp: 0
|
||||
Def: 0
|
||||
--- !u!114 &1974768599
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1974768586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ea9eb82687dfa674e883273cd7c73386, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
characterState: 0
|
||||
--- !u!1001 &1975925687
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -16797,7 +17067,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 17
|
||||
m_RootOrder: 18
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &2120943303
|
||||
PrefabInstance:
|
||||
@ -17458,7 +17728,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2907630901887348954, guid: cb61a92f105ea18418e946bf54862340, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 15
|
||||
value: 16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2907630901887348954, guid: cb61a92f105ea18418e946bf54862340, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@ -19046,3 +19316,5 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ea3c4e24ebc42194181651236cdf30f1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nstate: 1
|
||||
target: {fileID: 1469954942}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffea8fd53eb15bc47af00704f2e61911
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -14,7 +14,7 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler
|
||||
|
||||
public Camera mainCamera;
|
||||
|
||||
private Rigidbody rb;
|
||||
public Rigidbody rb;
|
||||
// 定义相机 FOV 相关变量
|
||||
public float normalFOV = 60f; // 正常行走时的FOV
|
||||
public float sprintFOV = 120f; // 奔跑时的FOV
|
||||
@ -39,6 +39,7 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler
|
||||
characterControl = GetComponent<CharacterControl>();
|
||||
Characterain = GetComponent<CharacterAin>();
|
||||
rb = GetComponent<Rigidbody>();
|
||||
Debug.Log("------------------"+rb);
|
||||
}
|
||||
|
||||
public void OnDrag(PointerEventData eventData)
|
||||
@ -80,6 +81,8 @@ public class PlayerMovement_Jpystick : MonoBehaviour, IDragHandler
|
||||
// 5. 应用移动
|
||||
if (moveDirection.magnitude > 0.1f)
|
||||
{
|
||||
|
||||
|
||||
// 使用速度移动角色
|
||||
Vector3 newPosition = rb.position + moveDirection * moveSpeed * Time.deltaTime;
|
||||
rb.MovePosition(newPosition);
|
||||
|
@ -278,7 +278,7 @@ public class test : MonoBehaviour
|
||||
wEBScriptListener.OnCallback += callback;
|
||||
if (wEBScriptListener != null)
|
||||
{
|
||||
//lodingWebSocket();
|
||||
lodingWebSocket();
|
||||
//JoinRoom();
|
||||
//Heartbeat();
|
||||
//BroadcastMessage();
|
||||
@ -291,64 +291,64 @@ public class test : MonoBehaviour
|
||||
|
||||
}
|
||||
int index = 0;
|
||||
while (true)
|
||||
{
|
||||
index++;
|
||||
NpcData moveData = new NpcData();
|
||||
moveData.X = index;
|
||||
moveData.Y = 1;
|
||||
moveData.Z = 1;
|
||||
//while (true)
|
||||
//{
|
||||
// index++;
|
||||
// NpcData moveData = new NpcData();
|
||||
// moveData.X = index;
|
||||
// moveData.Y = 1;
|
||||
// moveData.Z = 1;
|
||||
|
||||
MoveResponse data = new MoveResponse();
|
||||
data.MoveData.Add(moveData);
|
||||
// MoveResponse data = new MoveResponse();
|
||||
// data.MoveData.Add(moveData);
|
||||
|
||||
|
||||
WSResponse ws = new WSResponse();
|
||||
ws.MessageType = "move.Location";
|
||||
ws.Data = ByteString.CopyFrom(data.ToByteArray());
|
||||
// WSResponse ws = new WSResponse();
|
||||
// ws.MessageType = "move.Location";
|
||||
// ws.Data = ByteString.CopyFrom(data.ToByteArray());
|
||||
|
||||
|
||||
callback(ProtoBufffer.Serialize(ws));
|
||||
// callback(ProtoBufffer.Serialize(ws));
|
||||
|
||||
|
||||
|
||||
//PlayerJoinResponse pj = new PlayerJoinResponse();
|
||||
//pj.UserName = "abc";
|
||||
//pj.RoomId = "2";
|
||||
//pj.Status = 0;
|
||||
//pj.RoleName = "ABC";
|
||||
//pj.IsLeadingNPC = 5;
|
||||
//pj.Online = true;
|
||||
//pj.RoleId = 7;
|
||||
//pj.GroupLeader = 0;
|
||||
//pj.ActionMode = 2;
|
||||
//pj.Group = -1;
|
||||
//pj.X = 11;
|
||||
//pj.Y = 12;
|
||||
//pj.Z = 13;
|
||||
//pj.OverseeCond = "14";
|
||||
//pj.SendFrameCount = 15;
|
||||
//pj.MoveSpeedFirst = 16;
|
||||
//pj.MoveSpeedSecond = 17;
|
||||
//pj.MoveSpeedThird = 18;
|
||||
//pj.BearLoad = 19;
|
||||
//pj.Protection = 20;
|
||||
//pj.Health = 21;
|
||||
//pj.RoleStatus = 22;
|
||||
//pj.UserId = 23;
|
||||
// //PlayerJoinResponse pj = new PlayerJoinResponse();
|
||||
// //pj.UserName = "abc";
|
||||
// //pj.RoomId = "2";
|
||||
// //pj.Status = 0;
|
||||
// //pj.RoleName = "ABC";
|
||||
// //pj.IsLeadingNPC = 5;
|
||||
// //pj.Online = true;
|
||||
// //pj.RoleId = 7;
|
||||
// //pj.GroupLeader = 0;
|
||||
// //pj.ActionMode = 2;
|
||||
// //pj.Group = -1;
|
||||
// //pj.X = 11;
|
||||
// //pj.Y = 12;
|
||||
// //pj.Z = 13;
|
||||
// //pj.OverseeCond = "14";
|
||||
// //pj.SendFrameCount = 15;
|
||||
// //pj.MoveSpeedFirst = 16;
|
||||
// //pj.MoveSpeedSecond = 17;
|
||||
// //pj.MoveSpeedThird = 18;
|
||||
// //pj.BearLoad = 19;
|
||||
// //pj.Protection = 20;
|
||||
// //pj.Health = 21;
|
||||
// //pj.RoleStatus = 22;
|
||||
// //pj.UserId = 23;
|
||||
|
||||
|
||||
//JoinRoomResponse data = new JoinRoomResponse();
|
||||
//data.Data = pj;
|
||||
// //JoinRoomResponse data = new JoinRoomResponse();
|
||||
// //data.Data = pj;
|
||||
|
||||
//WSResponse ws = new WSResponse();
|
||||
//ws.MessageType = "hall.JoinRoom";
|
||||
//ws.Data = ByteString.CopyFrom(data.ToByteArray());
|
||||
// //WSResponse ws = new WSResponse();
|
||||
// //ws.MessageType = "hall.JoinRoom";
|
||||
// //ws.Data = ByteString.CopyFrom(data.ToByteArray());
|
||||
|
||||
//callback(ProtoBufffer.Serialize(ws));
|
||||
// //callback(ProtoBufffer.Serialize(ws));
|
||||
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
// await Task.Delay(1000);
|
||||
//}
|
||||
}
|
||||
|
||||
void callback(byte[] data)
|
||||
@ -363,7 +363,7 @@ public class test : MonoBehaviour
|
||||
case "hall.Login":
|
||||
Debug.Log("-=====--");
|
||||
LoginResponse user = ProtoBufffer.DeSerialize<LoginResponse>(bytes);
|
||||
Debug.Log(user.Message);
|
||||
Debug.Log(user);
|
||||
break;
|
||||
|
||||
//¼ÓÈë·¿¼ä
|
||||
@ -414,18 +414,18 @@ public class test : MonoBehaviour
|
||||
Debug.Log(moveResponse.MoveData);
|
||||
NpcData npcData = new NpcData();
|
||||
npcData = moveResponse.MoveData[0];
|
||||
RecuseNpc rn = GetComponent<RecuseNpc>();
|
||||
RecuseNpc rn = GetComponent<RecuseNpc>();
|
||||
float x = npcData.X;
|
||||
float y = npcData.Y;
|
||||
float z = npcData.Z;
|
||||
rn.target.transform.position = new Vector3(x,y,z);
|
||||
//rn.target.transform.position = new Vector3(x,y,z);
|
||||
|
||||
break;
|
||||
|
||||
//case "prop.CreateNpc":
|
||||
// MoveResponse moveResponse = ProtoBufffer.DeSerialize<MoveResponse>(bytes);
|
||||
// Debug.Log("UserId:" + moveResponse.UserId + "£¬RoomId:" + moveResponse.RoomId + "£¬x:" + moveResponse.MoveData);
|
||||
// break;
|
||||
//case "prop.CreateNpc":
|
||||
// MoveResponse moveResponse = ProtoBufffer.DeSerialize<MoveResponse>(bytes);
|
||||
// Debug.Log("UserId:" + moveResponse.UserId + "£¬RoomId:" + moveResponse.RoomId + "£¬x:" + moveResponse.MoveData);
|
||||
// break;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user