Player Info Setup
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19c0714b22deb1041a40205b1d257f8b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9216d5f205aa2d40976da7e2f5b32b8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1013 KiB After Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 259 KiB |
@@ -0,0 +1,159 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44d4ee26d5fd6614db3860bbcee0fe3c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
@@ -21,8 +22,16 @@ public class Client : MonoBehaviour
|
||||
|
||||
[SerializeField] private UIHandler uiHandler;
|
||||
|
||||
[SerializeField] private TMP_Text[] playerNameTexts;
|
||||
[SerializeField] private GameObject[] playerInfo;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
playerInfo[i].SetActive(false);
|
||||
}
|
||||
|
||||
client = new TcpClient("185.245.96.48", 8051);
|
||||
stream = client.GetStream();
|
||||
|
||||
@@ -65,7 +74,7 @@ public class Client : MonoBehaviour
|
||||
else
|
||||
{
|
||||
GameObject player = Instantiate(playerPrefab);
|
||||
|
||||
|
||||
player.transform.position = new Vector3(job.data[2], job.data[3] + 0.5f, job.data[4]);
|
||||
|
||||
NoPlayablePlayer script = player.AddComponent<NoPlayablePlayer>();
|
||||
@@ -74,6 +83,7 @@ public class Client : MonoBehaviour
|
||||
script.dice = dice;
|
||||
script.camera = cam;
|
||||
}
|
||||
|
||||
break;
|
||||
//---------------------------------------------------------
|
||||
//-----Activate a Player
|
||||
@@ -98,7 +108,11 @@ public class Client : MonoBehaviour
|
||||
players[job.data[1]].name = Encoding.ASCII.GetString(name).Replace(" ", "");
|
||||
players[job.data[1]].Init();
|
||||
|
||||
uiHandler.DeactivateLayout0();
|
||||
playerNameTexts[job.data[1]].text = Encoding.ASCII.GetString(name).Replace(" ", "");
|
||||
|
||||
uiHandler.ActivateLayout1();
|
||||
|
||||
playerInfo[job.data[1]].SetActive(true);
|
||||
|
||||
break;
|
||||
case 126:
|
||||
|
||||
@@ -69,7 +69,7 @@ public class StartHandler : MonoBehaviour
|
||||
|
||||
public void ButtonJoin()
|
||||
{
|
||||
string code = roomCodeEnter.text;
|
||||
string code = roomCodeEnter.text.ToLower();
|
||||
roomcode = code;
|
||||
PlayerPrefs.SetString("roomcode", code);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
@@ -5,14 +5,17 @@ using UnityEngine;
|
||||
public class UIHandler : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject layout0;
|
||||
[SerializeField] private GameObject layout1;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
layout1.SetActive(false);
|
||||
layout0.SetActive(true);
|
||||
}
|
||||
|
||||
public void DeactivateLayout0()
|
||||
public void ActivateLayout1()
|
||||
{
|
||||
layout0.SetActive(false);
|
||||
layout1.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user