feat: new voter sticerks

This commit is contained in:
Fangh 2024-01-31 22:04:51 +01:00
parent 937006e07c
commit 580dbbdca8
19 changed files with 974 additions and 3286 deletions

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
@ -139,7 +139,7 @@ TextureImporter:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
internalID: 1537655665
vertices: []
indices:
edges: []

View File

@ -48,8 +48,8 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 500
spriteBorder: {x: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1

BIN
Assets/2DAssets/ScoreVoteTexture/8.png (Stored with Git LFS)

Binary file not shown.

View File

@ -1,153 +0,0 @@
fileFormatVersion: 2
guid: c5f7aa046abe3604c9db077a80ee3fc2
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
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: 100, y: 100, z: 100, w: 100}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 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
ignorePlatformSupport: 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
ignorePlatformSupport: 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
ignorePlatformSupport: 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
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 1537655665
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -65,10 +65,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: playernamevraimentlong
m_text: 01234567891234567
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 9fb4d071241c54841ab116886c83b585, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -92,12 +92,12 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSize: 25.55
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontSizeMax: 36
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
@ -192,14 +192,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.854902, g: 0.75294125, b: 0.76470596, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Sprite: {fileID: 21300000, guid: 2976887ec0d7c0449a05a497c5e28353, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
@ -218,9 +218,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 943229596838791819}
- component: {fileID: -3919290783414862184}
- component: {fileID: 9117562908589005100}
m_Layer: 5
m_Name: VoterSticker
m_Name: PlayerSticker
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -247,7 +247,7 @@ RectTransform:
m_AnchoredPosition: {x: -427, y: 38}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &-3919290783414862184
--- !u!114 &9117562908589005100
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -260,3 +260,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
playerNameLabel: {fileID: 2430977146559507814}
background: {fileID: 5096287721252539344}
colors:
- {fileID: 21300000, guid: fd34549f885408249a297cc6a21c81c9, type: 3}
- {fileID: 21300000, guid: 0ee0312f568806b478a366909c99109e, type: 3}
- {fileID: 21300000, guid: 9f910186744147d4fa07dac46709683b, type: 3}
- {fileID: 21300000, guid: 1d168eaa4018b5f4f9fe8fed55f26673, type: 3}
- {fileID: 21300000, guid: 1db45b8963eb22947b0eff6942e33aaa, type: 3}
- {fileID: 21300000, guid: 023e2f1ca34256849b141980d26cfc38, type: 3}
- {fileID: 21300000, guid: eaa71830df5ab274b8be23a296887907, type: 3}
- {fileID: 21300000, guid: 2976887ec0d7c0449a05a497c5e28353, type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 960796ead2964d54d9cf0b50f3f052e5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class PlayerSticker : MonoBehaviour
{
[Header("References")]
[SerializeField] private TextMeshProUGUI playerNameLabel;
[SerializeField] private Image background;
[SerializeField] private List<Sprite> colors;
public void Initialize(string _playerName, int _index)
{
playerNameLabel.text = _playerName;
background.sprite = colors[_index];
}
}

View File

@ -20,7 +20,7 @@ public class RoomManager : MonoBehaviour
/// </summary>
public TextMeshProUGUI roomCodeLabel;
public AudioClip playerJoinSFX;
public List<TextMeshProUGUI> waitingForPlayersLabels = new List<TextMeshProUGUI>();
public List<PlayerSticker> playerStickers = new List<PlayerSticker>();
[Header("Explanation Page")]
public GameObject explanationPage;
@ -86,9 +86,9 @@ private void SendRoomState(GameState _newState)
private void ResetAllPlayerLabels()
{
for (int i = 0; i < waitingForPlayersLabels.Count; i++)
for (int i = 0; i < playerStickers.Count; i++)
{
waitingForPlayersLabels[i].text = $"Waiting for P{i + 1}";
playerStickers[i].Initialize($"Waiting for P{i + 1}", i);
}
}
@ -315,7 +315,7 @@ private void UpdateConnectedPlayerList(List<Player> _players)
for (int i = 0; i < orderedPlayers.Count; i++)
{
Debug.Log($"player {i} = {orderedPlayers[i].name}");
waitingForPlayersLabels[i].text = orderedPlayers[i].name;
playerStickers[i].Initialize(orderedPlayers[i].name, i);
}
}

View File

@ -1,9 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class VoterSticker : MonoBehaviour
{
public TextMeshProUGUI playerNameLabel;
}