diff --git a/Assets/Scenes/ClientScene.unity b/Assets/Scenes/ClientScene.unity index 5ce197a..34ae528 100644 --- a/Assets/Scenes/ClientScene.unity +++ b/Assets/Scenes/ClientScene.unity @@ -1182,7 +1182,18 @@ MonoBehaviour: m_TargetGraphic: {fileID: 483086014} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 914867460} + m_MethodName: + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!114 &483086014 @@ -1219,6 +1230,51 @@ CanvasRenderer: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 483086011} m_CullTransparentMesh: 0 +--- !u!1 &555203924 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 555203926} + - component: {fileID: 555203925} + m_Layer: 0 + m_Name: ServerManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &555203925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555203924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f767c4220f486f49aba41a71b372a1f, type: 3} + m_Name: + m_EditorClassIdentifier: + SetSingletonOnAwake: 1 + isPersistant: 1 + StartOnAwake: 0 + Port: 4444 + Seed: 0 +--- !u!4 &555203926 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 555203924} + 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: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &574996014 GameObject: m_ObjectHideFlags: 0 @@ -2881,6 +2937,49 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 55} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1574517160 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1574517162} + - component: {fileID: 1574517161} + m_Layer: 0 + m_Name: HomeScreenManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1574517161 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1574517160} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dfb1677e1946204499147b2ff56be203, type: 3} + m_Name: + m_EditorClassIdentifier: + IP: {fileID: 574996016} + Port: {fileID: 651669416} + Name: {fileID: 883227279} +--- !u!4 &1574517162 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1574517160} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 221.87048, y: -20.283712, z: 438.58536} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1612507252 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scipts/HomeScreenManager.cs b/Assets/Scipts/HomeScreenManager.cs new file mode 100644 index 0000000..cb750c8 --- /dev/null +++ b/Assets/Scipts/HomeScreenManager.cs @@ -0,0 +1,35 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using Multiplayer; +using TMPro; +public class HomeScreenManager : MonoBehaviour { + + + public TextMeshProUGUI IP; + public TextMeshProUGUI Port; + public TextMeshProUGUI Name; + + + public void Connect() + { + int intVal = 0; + bool Succeeded = int.TryParse(Port.text, out intVal); + if (Succeeded) + { + Destroy(ServerManager.Instance.gameObject); + ClientManager.Instance.StartClient(IP.text, intVal); + } + } + + public void Host() + { + int intVal = 0; + bool Succeeded = int.TryParse(Port.text, out intVal); + if (Succeeded) + { + ServerManager.Instance.StartServer(); + } + } +} diff --git a/Assets/Scipts/HomeScreenManager.cs.meta b/Assets/Scipts/HomeScreenManager.cs.meta new file mode 100644 index 0000000..00c9277 --- /dev/null +++ b/Assets/Scipts/HomeScreenManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dfb1677e1946204499147b2ff56be203 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites.meta b/Assets/Sprites.meta new file mode 100644 index 0000000..6fdcf6b --- /dev/null +++ b/Assets/Sprites.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1e3188b298f77eb479ef28360c1d3d50 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/received_2274286395935792.png b/Assets/Sprites/received_2274286395935792.png new file mode 100644 index 0000000..0d3fbbd --- /dev/null +++ b/Assets/Sprites/received_2274286395935792.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67caeba94186aadbdec1b70d8767caf6ce414bc1f46d21c0291ca073c7ca7633 +size 116976 diff --git a/Assets/Sprites/received_2274286395935792.png.meta b/Assets/Sprites/received_2274286395935792.png.meta new file mode 100644 index 0000000..9c075f0 --- /dev/null +++ b/Assets/Sprites/received_2274286395935792.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: a214c7ee79ee08246816ba2a1764d21e +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 9dd16d575e43e5d43978f6ca589567cc + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/received_298712554164257.png b/Assets/Sprites/received_298712554164257.png new file mode 100644 index 0000000..77f7406 --- /dev/null +++ b/Assets/Sprites/received_298712554164257.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:190d2fe73c074e5c74c4f3c4ba8bbed9d46df939d3876c11f2b712973530c372 +size 42452 diff --git a/Assets/Sprites/received_298712554164257.png.meta b/Assets/Sprites/received_298712554164257.png.meta new file mode 100644 index 0000000..2f26ef5 --- /dev/null +++ b/Assets/Sprites/received_298712554164257.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: db3d66eba817c734c867be86442a1e92 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 7e48a6adec5379f4281336bbec11877e + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/received_305954910116526.png b/Assets/Sprites/received_305954910116526.png new file mode 100644 index 0000000..61a9324 --- /dev/null +++ b/Assets/Sprites/received_305954910116526.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a3b2f9f10b9bd79c5b876bf6a877716edf19df43658f82a24fc88734becbb2f +size 29393 diff --git a/Assets/Sprites/received_305954910116526.png.meta b/Assets/Sprites/received_305954910116526.png.meta new file mode 100644 index 0000000..6a4c30c --- /dev/null +++ b/Assets/Sprites/received_305954910116526.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 518466c429a5a4442bc1c3dd2c9b15f4 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: b498ba69e5326964782f11f50d2a1299 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/received_532581637262136.png b/Assets/Sprites/received_532581637262136.png new file mode 100644 index 0000000..685a3b3 --- /dev/null +++ b/Assets/Sprites/received_532581637262136.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cbb09826e41b8d87ec100f730a78bd111fa1bbc9ce0f24ee1e462b2497c5393 +size 35268 diff --git a/Assets/Sprites/received_532581637262136.png.meta b/Assets/Sprites/received_532581637262136.png.meta new file mode 100644 index 0000000..2c15e8a --- /dev/null +++ b/Assets/Sprites/received_532581637262136.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 92a8248f4e5df7e45ace27459b5fe6f0 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 88afac8d92a8fe64ca7d557a207dc5ab + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: