networking

master
Jordan Orelli 5 years ago
parent 5c6da34d98
commit 0ddb5ac5a0

@ -12,9 +12,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fb331b678c613734fa2ba6013e9cd499, type: 3} m_Script: {fileID: 11500000, guid: fb331b678c613734fa2ba6013e9cd499, type: 3}
m_Name: LoginInfo m_Name: LoginInfo
m_EditorClassIdentifier: m_EditorClassIdentifier:
playerName: test playerName: jordan
password: password: fartsock
startPosition: {x: 0, y: 10, z: 0} startPosition: {x: 0, y: 10, z: 0}
sentLogin: 1 sentLogin: 0
isLoggedIn: 1 isLoggedIn: 1
loginError: loginError: no such user

@ -347,105 +347,6 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 006057916c23f8d489785fd6e0d2323a, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 006057916c23f8d489785fd6e0d2323a, type: 3}
--- !u!1 &144462702
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 144462703}
- component: {fileID: 144462706}
- component: {fileID: 144462705}
- component: {fileID: 144462704}
m_Layer: 0
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &144462703
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 144462702}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1432105117}
m_Father: {fileID: 957446909}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.5}
m_SizeDelta: {x: 1, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &144462704
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 144462702}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &144462705
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 144462702}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1400
--- !u!223 &144462706
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 144462702}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!1001 &160182869 --- !u!1001 &160182869
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1232,105 +1133,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1307384807} m_PrefabInstance: {fileID: 1307384807}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &407893044
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 407893045}
- component: {fileID: 407893048}
- component: {fileID: 407893047}
- component: {fileID: 407893046}
m_Layer: 0
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &407893045
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 407893044}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1933675703}
m_Father: {fileID: 1308603236}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.5}
m_SizeDelta: {x: 1, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &407893046
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 407893044}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &407893047
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 407893044}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1400
--- !u!223 &407893048
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 407893044}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!1 &415836528 --- !u!1 &415836528
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1465,9 +1267,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children: []
- {fileID: 1308603236}
- {fileID: 957446909}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 7 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -3162,85 +2962,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 908385253} m_PrefabInstance: {fileID: 908385253}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &957446908
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 957446909}
- component: {fileID: 957446912}
- component: {fileID: 957446911}
- component: {fileID: 957446910}
m_Layer: 0
m_Name: sampson
m_TagString: Soul
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &957446909
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 957446908}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 151.8731, y: 11.396096, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1459364027}
- {fileID: 144462703}
m_Father: {fileID: 427536310}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &957446910
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 957446908}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!135 &957446911
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 957446908}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.25
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &957446912
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 957446908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c066410fbc09d284b901f00f1842586d, type: 3}
m_Name:
m_EditorClassIdentifier:
playerName: sampson
nameText: {fileID: 1432105118}
cam: {fileID: 0}
--- !u!1001 &959230690 --- !u!1001 &959230690
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3539,83 +3260,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 984423137} m_PrefabInstance: {fileID: 984423137}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1007323458
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1007323459}
- component: {fileID: 1007323461}
- component: {fileID: 1007323460}
m_Layer: 0
m_Name: soul
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1007323459
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1007323458}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1308603236}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1007323460
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1007323458}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: fb1d6c599d0f2844cbc55585e6bfd7e3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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
--- !u!33 &1007323461
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1007323458}
m_Mesh: {fileID: 4300000, guid: 3c1f772e57a552c43a0fbd4a3ad2aa8e, type: 3}
--- !u!1001 &1022345512 --- !u!1001 &1022345512
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5005,85 +4649,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1216542065} m_PrefabInstance: {fileID: 1216542065}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1308603235
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1308603236}
- component: {fileID: 1308603239}
- component: {fileID: 1308603238}
- component: {fileID: 1308603237}
m_Layer: 0
m_Name: poo
m_TagString: Soul
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1308603236
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1308603235}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 166.55592, y: 9.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1007323459}
- {fileID: 407893045}
m_Father: {fileID: 427536310}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &1308603237
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1308603235}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!135 &1308603238
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1308603235}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.25
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1308603239
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1308603235}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c066410fbc09d284b901f00f1842586d, type: 3}
m_Name:
m_EditorClassIdentifier:
playerName: poo
nameText: {fileID: 1933675704}
cam: {fileID: 0}
--- !u!1001 &1349509238 --- !u!1001 &1349509238
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5527,83 +5092,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 239592753} m_PrefabInstance: {fileID: 239592753}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1432105116
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1432105117}
- component: {fileID: 1432105119}
- component: {fileID: 1432105118}
m_Layer: 0
m_Name: Name Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1432105117
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1432105116}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 144462703}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 4, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1432105118
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1432105116}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 8
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: '@jordanorelli'
--- !u!222 &1432105119
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1432105116}
m_CullTransparentMesh: 0
--- !u!1001 &1435405351 --- !u!1001 &1435405351
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5679,83 +5167,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1435405351} m_PrefabInstance: {fileID: 1435405351}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1459364026
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1459364027}
- component: {fileID: 1459364029}
- component: {fileID: 1459364028}
m_Layer: 0
m_Name: soul
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1459364027
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1459364026}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 957446909}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1459364028
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1459364026}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: fb1d6c599d0f2844cbc55585e6bfd7e3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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
--- !u!33 &1459364029
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1459364026}
m_Mesh: {fileID: 4300000, guid: 3c1f772e57a552c43a0fbd4a3ad2aa8e, type: 3}
--- !u!1 &1475001690 --- !u!1 &1475001690
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7026,83 +6437,6 @@ Transform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1923656884} m_PrefabInstance: {fileID: 1923656884}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1933675702
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1933675703}
- component: {fileID: 1933675705}
- component: {fileID: 1933675704}
m_Layer: 0
m_Name: Name Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1933675703
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933675702}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 407893045}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 4, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1933675704
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933675702}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 8
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: '@jordanorelli'
--- !u!222 &1933675705
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933675702}
m_CullTransparentMesh: 0
--- !u!1001 &1939534912 --- !u!1001 &1939534912
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

@ -17,7 +17,7 @@ public class CameraController : MonoBehaviour {
// Update is called once per frame // Update is called once per frame
void Update() { void Update() {
if (player) { if (player) {
transform.position = new Vector3(player.position.x-2, player.position.y+2, player.position.z-10); transform.position = new Vector3(player.position.x-2, player.position.y+4, player.position.z-10);
transform.LookAt(player.transform.position + player.up * 4f); transform.LookAt(player.transform.position + player.up * 4f);
} }
} }

@ -20,13 +20,9 @@ public class Networking : ScriptableObject {
public LoginInfo loginInfo; public LoginInfo loginInfo;
private ClientWebSocket sock; private ClientWebSocket sock;
private Task writeTask;
private Task<WebSocketReceiveResult> readTask;
private ArraySegment<byte> readBuffer;
private int seq; private int seq;
async public void Connect() { async public void Connect() {
readBuffer = new ArraySegment<byte>(new byte[32000]);
if (sock != null) { if (sock != null) {
if (sock.State == WebSocketState.Open) { if (sock.State == WebSocketState.Open) {
@ -46,6 +42,9 @@ public class Networking : ScriptableObject {
Debug.LogFormat("Connecting to: {0}", b.Uri); Debug.LogFormat("Connecting to: {0}", b.Uri);
await sock.ConnectAsync(b.Uri, CancellationToken.None); await sock.ConnectAsync(b.Uri, CancellationToken.None);
Debug.LogFormat("Finished connection task with status: {0}", sock.State); Debug.LogFormat("Finished connection task with status: {0}", sock.State);
if (loginInfo.playerName != "" && loginInfo.password != "") {
SendLogin();
}
return; return;
} }
@ -83,11 +82,13 @@ public class Networking : ScriptableObject {
loginInfo.loginError = ""; loginInfo.loginError = "";
string msg = JsonUtility.ToJson(login); string msg = JsonUtility.ToJson(login);
ArraySegment<byte> buf = new ArraySegment<byte>(Encoding.UTF8.GetBytes(msg)); ArraySegment<byte> buf = new ArraySegment<byte>(Encoding.UTF8.GetBytes(msg));
Debug.LogFormat("sending login user: {0} pass: {1}", loginInfo.playerName, loginInfo.password);
sock.SendAsync(buf, WebSocketMessageType.Text, true, CancellationToken.None); sock.SendAsync(buf, WebSocketMessageType.Text, true, CancellationToken.None);
} }
public IEnumerator ReadMessages() { public IEnumerator ReadMessages() {
Task<WebSocketReceiveResult> readTask = null; // = sock.ReceiveAsync(readBuffer, CancellationToken.None); ArraySegment<byte> readBuffer = new ArraySegment<byte>(new byte[32000]);
Task<WebSocketReceiveResult> readTask = null;
while (true) { while (true) {
if (!isConnected()) { if (!isConnected()) {
@ -109,7 +110,9 @@ public class Networking : ScriptableObject {
continue; continue;
case TaskStatus.RanToCompletion: case TaskStatus.RanToCompletion:
parseMessage(readTask.Result); WebSocketReceiveResult result = readTask.Result;
string msg = Encoding.UTF8.GetString(readBuffer.Array, 0, result.Count);
parseMessage(msg);
break; break;
case TaskStatus.Canceled: case TaskStatus.Canceled:
@ -122,8 +125,7 @@ public class Networking : ScriptableObject {
} }
} }
private void parseMessage(WebSocketReceiveResult message) { private void parseMessage(string msg) {
string msg = Encoding.UTF8.GetString(readBuffer.Array, 0, message.Count);
string[] parts = msg.Split(new char[]{' '}, 2); string[] parts = msg.Split(new char[]{' '}, 2);
if (parts.Length != 2) { if (parts.Length != 2) {
Debug.LogFormat("dunno how to handle this msg: {0}", msg); Debug.LogFormat("dunno how to handle this msg: {0}", msg);
@ -157,7 +159,11 @@ public class Networking : ScriptableObject {
private void onSpawnSoul(SpawnSoul spawn) { private void onSpawnSoul(SpawnSoul spawn) {
Debug.LogFormat("spawn a soul: {0} at {1}", spawn.playerName, spawn.position); Debug.LogFormat("spawn a soul: {0} at {1}", spawn.playerName, spawn.position);
GameObject soul = Instantiate(soulPrefab, spawn.position, Quaternion.identity); GameObject soul = Instantiate(soulPrefab, spawn.position, Quaternion.identity);
soul.name = spawn.playerName; if (spawn.playerName != "") {
soul.name = spawn.playerName;
} else {
soul.name = "FUCK";
}
GameObject allSouls = GameObject.Find("Souls"); GameObject allSouls = GameObject.Find("Souls");
if (allSouls == null) { if (allSouls == null) {
@ -172,7 +178,11 @@ public class Networking : ScriptableObject {
private void onSoulCollected(CollectSoul collected) { private void onSoulCollected(CollectSoul collected) {
Debug.LogFormat("a soul was collected: {0}", collected); Debug.LogFormat("a soul was collected: {0}", collected);
GameObject soul = GameObject.Find("Souls/"+collected.playerName); string objName = "Souls/" + collected.playerName;
if (collected.playerName == "") {
objName = "Souls/FUCK";
}
GameObject soul = GameObject.Find(objName);
Destroy(soul); Destroy(soul);
if (collected.playerName == loginInfo.playerName) { if (collected.playerName == loginInfo.playerName) {

Loading…
Cancel
Save