Browse Source

move code to game manager: change object texture and update player UI/collected vale

created level scoreboard for amount of coloured gameobjects 10second timer, then loads the main scoreboard, ten second timer, then loads the new scene based on string given in inspector
allow texture to load through script
Josh_Dev_branch
Claire Peta 5 years ago
parent
commit
57d423d041
32 changed files with 3714 additions and 112 deletions
  1. +2
    -2
      Assets/Data/Networking/Server/Realtime/ClientList.asset
  2. +1
    -14
      Assets/Prefabs/UI/MainScoreboard.prefab
  3. +0
    -0
      Assets/Prefabs/UI/MainScoreboard.prefab.meta
  4. +1549
    -0
      Assets/Prefabs/UI/levelScoreboard.prefab
  5. +2
    -3
      Assets/Prefabs/UI/levelScoreboard.prefab.meta
  6. +3
    -0
      Assets/Resources/BlueGrass.jpg
  7. +88
    -0
      Assets/Resources/BlueGrass.jpg.meta
  8. +3
    -0
      Assets/Resources/OrangeGrass.jpg
  9. +88
    -0
      Assets/Resources/OrangeGrass.jpg.meta
  10. +3
    -0
      Assets/Resources/PinkGrass.jpg
  11. +88
    -0
      Assets/Resources/PinkGrass.jpg.meta
  12. +3
    -0
      Assets/Resources/PurpleGrass.jpg
  13. +88
    -0
      Assets/Resources/PurpleGrass.jpg.meta
  14. +3
    -0
      Assets/Resources/RedGrass.jpg
  15. +88
    -0
      Assets/Resources/RedGrass.jpg.meta
  16. +3
    -0
      Assets/Resources/YellowGrass.jpg
  17. +88
    -0
      Assets/Resources/YellowGrass.jpg.meta
  18. +40
    -40
      Assets/Scenes/Client Scenes/LoginScreen.unity
  19. +1426
    -29
      Assets/Scenes/ColourCollideOne.unity
  20. +73
    -5
      Assets/Scripts/GameMode/ColorGameMode.cs
  21. +4
    -3
      Assets/Scripts/MainMenuController.cs
  22. +39
    -0
      Assets/Scripts/UI/ColourSquareCollection.cs
  23. +11
    -0
      Assets/Scripts/UI/ColourSquareCollection.cs.meta
  24. +11
    -6
      Assets/Scripts/UI/ScoreBoard.cs
  25. +1
    -1
      Assets/Textures/BlueGrass.jpg.meta
  26. +1
    -1
      Assets/Textures/OrangeGrass.jpg.meta
  27. +1
    -1
      Assets/Textures/PinkGrass.jpg.meta
  28. +1
    -1
      Assets/Textures/PurpleGrass.jpg.meta
  29. +1
    -1
      Assets/Textures/RedGrass.jpg.meta
  30. +1
    -1
      Assets/Textures/YellowGrass.jpg.meta
  31. +2
    -2
      ProjectSettings/EditorBuildSettings.asset
  32. +2
    -2
      ProjectSettings/TagManager.asset

+ 2
- 2
Assets/Data/Networking/Server/Realtime/ClientList.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:dc1ec7c5075e33efd474f1ddf3c7218ba21681a156fb152c89f3fba581b02fea
size 499
oid sha256:f98b7661c0a00db2d66e1aac407483b7d21e9204b73bfb0842d2a6815509981a
size 622

Assets/Prefabs/UI/Scoreboard.prefab → Assets/Prefabs/UI/MainScoreboard.prefab View File

@ -1132,9 +1132,8 @@ GameObject:
- component: {fileID: 6715947279418743287} - component: {fileID: 6715947279418743287}
- component: {fileID: 6715947279418743286} - component: {fileID: 6715947279418743286}
- component: {fileID: 6715947279418743285} - component: {fileID: 6715947279418743285}
- component: {fileID: 8897488140307869662}
m_Layer: 5 m_Layer: 5
m_Name: Scoreboard
m_Name: MainScoreboard
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -1228,18 +1227,6 @@ MonoBehaviour:
m_BlockingMask: m_BlockingMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 4294967295 m_Bits: 4294967295
--- !u!114 &8897488140307869662
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6715947279418743284}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f3481b961a4a56046b973a51de723523, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6715947279703559776 --- !u!1 &6715947279703559776
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

Assets/Prefabs/UI/Scoreboard.prefab.meta → Assets/Prefabs/UI/MainScoreboard.prefab.meta View File


+ 1549
- 0
Assets/Prefabs/UI/levelScoreboard.prefab
File diff suppressed because it is too large
View File


Assets/Scripts/Components.meta → Assets/Prefabs/UI/levelScoreboard.prefab.meta View File

@ -1,7 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8d7394d70ec233849a60a26da5f23b75
folderAsset: yes
DefaultImporter:
guid: a475835665805f14892abc694728c976
PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:

+ 3
- 0
Assets/Resources/BlueGrass.jpg View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7f424f7354ac4c29139a2c0f3d50e4a998d69cf4a321d75fa61f83b4ed5a783d
size 477993

+ 88
- 0
Assets/Resources/BlueGrass.jpg.meta View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 0eea4dec756f99e40b70a704d4b2a745
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
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
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Resources/OrangeGrass.jpg View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:32a2cc9f8e72ef9358276399b719ce5e03bfa0e32c114d78693acb9819f69e4d
size 492386

+ 88
- 0
Assets/Resources/OrangeGrass.jpg.meta View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: aa2cbb1a53c81b84aa57cc8f3ed456e1
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
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
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Resources/PinkGrass.jpg View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d0413242e91988b01608dd87c44482d7d8575db3b865df05f5de697a4f200f2d
size 468434

+ 88
- 0
Assets/Resources/PinkGrass.jpg.meta View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: f1763a646017cd140b15e5a656d356e8
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
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
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Resources/PurpleGrass.jpg View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:18c9ac1120530f5032d758fcd3a73bcf7ff74f550efac7c6b723ae7087df7e27
size 488890

+ 88
- 0
Assets/Resources/PurpleGrass.jpg.meta View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 750f08c2a813294428aa533055aafe1f
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
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
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Resources/RedGrass.jpg View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:323054010d3d2a74fe85c830adf45ed7f087d885ed1ba901f4ae6aeedafb3708
size 488345

+ 88
- 0
Assets/Resources/RedGrass.jpg.meta View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 0c9ccc19465ae4c44a2b90b5edfc3463
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
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
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Resources/YellowGrass.jpg View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:17078eea0066d24e5c86870574f7a643a75de217d36aa3ba9dbd59183c21dee8
size 475700

+ 88
- 0
Assets/Resources/YellowGrass.jpg.meta View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 5a0b9a04fbc48c34cbea389c7a77a268
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
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
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

+ 40
- 40
Assets/Scenes/Client Scenes/LoginScreen.unity View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@ -405,10 +405,10 @@ RectTransform:
m_Father: {fileID: 1490570091} m_Father: {fileID: 1490570091}
m_RootOrder: 3 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 153.95001, y: -378.95}
m_SizeDelta: {x: 220, y: 220}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &98974308 --- !u!114 &98974308
MonoBehaviour: MonoBehaviour:
@ -919,10 +919,10 @@ RectTransform:
m_Father: {fileID: 1490570091} m_Father: {fileID: 1490570091}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 613.95, y: -148.95001}
m_SizeDelta: {x: 220, y: 220}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &288437140 --- !u!114 &288437140
MonoBehaviour: MonoBehaviour:
@ -1065,7 +1065,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &425791971 --- !u!224 &425791971
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1376,11 +1376,11 @@ MonoBehaviour:
lineCount: 1 lineCount: 1
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 1
m_havePropertiesChanged: 0
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0} m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 1
m_isInputParsingRequired: 0
m_inputSource: 0 m_inputSource: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_subTextObjects: m_subTextObjects:
@ -1434,10 +1434,10 @@ RectTransform:
m_Father: {fileID: 1490570091} m_Father: {fileID: 1490570091}
m_RootOrder: 4 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 383.95, y: -378.95}
m_SizeDelta: {x: 220, y: 220}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &742666699 --- !u!114 &742666699
MonoBehaviour: MonoBehaviour:
@ -1844,7 +1844,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &867460039 --- !u!114 &867460039
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2320,11 +2320,11 @@ MonoBehaviour:
lineCount: 1 lineCount: 1
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 1
m_havePropertiesChanged: 0
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0} m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 1
m_isInputParsingRequired: 0
m_inputSource: 0 m_inputSource: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_subTextObjects: m_subTextObjects:
@ -2482,11 +2482,11 @@ MonoBehaviour:
lineCount: 1 lineCount: 1
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 1
m_havePropertiesChanged: 0
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0} m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 1
m_isInputParsingRequired: 0
m_inputSource: 0 m_inputSource: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_subTextObjects: m_subTextObjects:
@ -2968,11 +2968,11 @@ MonoBehaviour:
lineCount: 1 lineCount: 1
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 1
m_havePropertiesChanged: 0
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0} m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 1
m_isInputParsingRequired: 0
m_inputSource: 0 m_inputSource: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_subTextObjects: m_subTextObjects:
@ -3215,11 +3215,11 @@ MonoBehaviour:
lineCount: 1 lineCount: 1
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 1
m_havePropertiesChanged: 0
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0} m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 1
m_isInputParsingRequired: 0
m_inputSource: 0 m_inputSource: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_subTextObjects: m_subTextObjects:
@ -3477,10 +3477,10 @@ RectTransform:
m_Father: {fileID: 1490570091} m_Father: {fileID: 1490570091}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 383.95, y: -148.95001}
m_SizeDelta: {x: 220, y: 220}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1409883286 --- !u!114 &1409883286
MonoBehaviour: MonoBehaviour:
@ -3987,11 +3987,11 @@ MonoBehaviour:
lineCount: 1 lineCount: 1
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 1
m_havePropertiesChanged: 0
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0} m_spriteAnimator: {fileID: 0}
m_isInputParsingRequired: 1
m_isInputParsingRequired: 0
m_inputSource: 0 m_inputSource: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_subTextObjects: m_subTextObjects:
@ -4250,10 +4250,10 @@ RectTransform:
m_Father: {fileID: 1490570091} m_Father: {fileID: 1490570091}
m_RootOrder: 5 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 613.95, y: -378.95}
m_SizeDelta: {x: 220, y: 220}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1661631624 --- !u!114 &1661631624
MonoBehaviour: MonoBehaviour:
@ -4399,10 +4399,10 @@ RectTransform:
m_Father: {fileID: 1490570091} m_Father: {fileID: 1490570091}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 153.95001, y: -148.95001}
m_SizeDelta: {x: 220, y: 220}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1686081524 --- !u!114 &1686081524
MonoBehaviour: MonoBehaviour:
@ -4675,7 +4675,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0.0009460449, y: 30.000008}
m_AnchoredPosition: {x: 0.0009765625, y: 30.000008}
m_SizeDelta: {x: -0.0099487305, y: 60} m_SizeDelta: {x: -0.0099487305, y: 60}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1991592983 --- !u!114 &1991592983

+ 1426
- 29
Assets/Scenes/ColourCollideOne.unity
File diff suppressed because it is too large
View File


+ 73
- 5
Assets/Scripts/GameMode/ColorGameMode.cs View File

@ -2,14 +2,33 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using Networking.Server; using Networking.Server;
using TMPro;
using UnityEngine.UI;
public class ColorGameMode : GameMode public class ColorGameMode : GameMode
{ {
public int MaxRound = 5; public int MaxRound = 5;
private int RoundCount = 0; private int RoundCount = 0;
public GameObject counterScore;
public GameObject colorCube;
private int counter = 1;
private GameObject[] objs;
public Texture playerTexture;
private LayerMask Ignore;
public List<ClientData> ConnectedClients;
public GameObject levelScoreboard;
public GameObject[] players = new GameObject[4];
public GameObject[] scores = new GameObject[4];
public ScoreBoard mainscoreboard;
void Start(){
counterScore.GetComponent<TextMeshProUGUI>().text = counter.ToString();
objs = GameObject.FindGameObjectsWithTag("Coloured");
}
/// <summary> /// <summary>
/// Called once all players have finished their moves but before the Objective is checked /// Called once all players have finished their moves but before the Objective is checked
@ -25,20 +44,69 @@ public class ColorGameMode : GameMode
/// <returns>returns if game is finished</returns> /// <returns>returns if game is finished</returns>
public override bool isGameOver() public override bool isGameOver()
{ {
return (RoundCount <= MaxRound);
return (RoundCount <= MaxRound);
} }
/// <summary>
/// couroutine to display level scores
/// </summary>
IEnumerator displayforSeconds(GameObject display, float time)
{
display.SetActive (true);
yield return new WaitForSeconds(time);
display.SetActive (false);
mainscoreboard.endGame();
}
/// <summary>
/// calculates and assigns scores in desc order, call coroutine
/// </summary>
public void levelComplete(ClientList clientDataList)
{
ConnectedClients = clientDataList.ConnectedClients;
ConnectedClients.Sort((a, b) => b.collected.CompareTo(a.collected));
for (int i = 0; i<ConnectedClients.Count; i++){
players[i].GetComponent<TextMeshProUGUI>().text = ConnectedClients[i].Name;
scores[i].GetComponent<TextMeshProUGUI>().text = ConnectedClients[i].collected.ToString();
}
StartCoroutine(displayforSeconds(levelScoreboard, 10.0f));
}
/// <summary> /// <summary>
/// Called once per player after they have moved onto a block /// Called once per player after they have moved onto a block
/// </summary> /// </summary>
/// <param name="character">Character whic hmoved</param>
/// <param name="character">Character which moved</param>
/// <param name="client">Client of the character</param> /// <param name="client">Client of the character</param>
/// <param name="currentBlock">Block moved onto</param> /// <param name="currentBlock">Block moved onto</param>
public override void OnPlayerFinishedMove(Character character,ClientData client, Block currentBlock)
public override void OnPlayerFinishedMove(Character character, ClientData client, Block currentBlock)
{ {
string clientTexture = client.Color + "Grass";
playerTexture = Resources.Load<Texture>(clientTexture);
//Resources.Load<Texture2D>(clientTexture);
//Code for changing block color;
//Block.isBlockAtPosition(transform.position + Vector3.down / 2, 0.5f, ~Ignore, out CurrentBlock);
Renderer abc = currentBlock.GetComponent<Renderer>();
if(abc.material.GetTexture("_Albedo") != playerTexture){
abc.material.SetTexture("_Albedo", playerTexture);
}
//Code for changing block color and updating player scores;
//Code for updating player scores;
colorCube.GetComponent<Image>().color = client.Color;
counter = 1;
foreach(GameObject a in objs){
abc = a.GetComponent<Renderer>();
if (abc.material.GetTexture("_Albedo") == playerTexture)
{
counter++;
}
}
counterScore.GetComponent<TextMeshProUGUI>().text = counter.ToString();
client.collected = counter;
} }
} }

+ 4
- 3
Assets/Scripts/MainMenuController.cs View File

@ -36,9 +36,10 @@ public class MainMenuController : MonoBehaviour
public void OnPlayClick () public void OnPlayClick ()
{ {
//toggle which menu displays //toggle which menu displays
MainMenu.SetActive (false);
GameOptionsMenu.SetActive (true);
GameOpt_S1.SetActive (true);
//MainMenu.SetActive (false);
//GameOptionsMenu.SetActive (true);
//GameOpt_S1.SetActive (true);
UnityEngine.SceneManagement.SceneManager.LoadScene ("LoginScreen");
} }
public void OnSettingsClick () public void OnSettingsClick ()

+ 39
- 0
Assets/Scripts/UI/ColourSquareCollection.cs View File

@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class ColourSquareCollection : MonoBehaviour
{
public Texture colouredTexture;
public GameObject counterScore;
public GameObject colourCube;
public Color currentPlayerColour;
GameObject[] objs;
Renderer abc;
int counter = 0;
void Start(){
//have to first get colour from player, hard code purple in at the moment
colourCube.GetComponent<Image>().color = currentPlayerColour;
objs = GameObject.FindGameObjectsWithTag("Coloured");
counter = 1;
counterScore.GetComponent<TextMeshProUGUI>().text = counter.ToString();
}
// Update is called once per frame
public void colourupdatefromMove()
{
counter = 1;
foreach(GameObject a in objs){
abc = a.GetComponent<Renderer>();
if (abc.material.GetTexture("_Albedo") == colouredTexture)
{
counter++;
}
}
counterScore.GetComponent<TextMeshProUGUI>().text = counter.ToString();
}
}

+ 11
- 0
Assets/Scripts/UI/ColourSquareCollection.cs.meta View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15e038497e984864fb91253066856048
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 11
- 6
Assets/Scripts/UI/ScoreBoard.cs View File

@ -5,12 +5,13 @@ using UnityEngine.Networking;
using Networking.Server; using Networking.Server;
using Networking; using Networking;
using TMPro; using TMPro;
using UnityEngine.SceneManagement;
public class ScoreBoard : MonoBehaviour public class ScoreBoard : MonoBehaviour
{ {
public ClientList clientDataList; public ClientList clientDataList;
public List<ClientData> ConnectedClients; public List<ClientData> ConnectedClients;
public bool endOfGame = false;
public GameObject FirstPlaceName; public GameObject FirstPlaceName;
public GameObject FirstPlaceScore; public GameObject FirstPlaceScore;
public GameObject SecondPlaceName; public GameObject SecondPlaceName;
@ -20,11 +21,14 @@ public class ScoreBoard : MonoBehaviour
public GameObject FourthPlaceName; public GameObject FourthPlaceName;
public GameObject FourthPlaceScore; public GameObject FourthPlaceScore;
void Update()
public string nextScene;
public GameObject MainScoreboard;
IEnumerator displayforSeconds(GameObject display, float time)
{ {
if (Input.GetKeyDown("m")){
endGame();
}
display.SetActive (true);
yield return new WaitForSeconds(time);
SceneManager.LoadScene(nextScene);
} }
public void endGame() public void endGame()
@ -40,6 +44,7 @@ public class ScoreBoard : MonoBehaviour
ThirdPlaceScore.GetComponent<TextMeshProUGUI>().text = ConnectedClients[2].Score.ToString(); ThirdPlaceScore.GetComponent<TextMeshProUGUI>().text = ConnectedClients[2].Score.ToString();
FourthPlaceName.GetComponent<TextMeshProUGUI>().text = ConnectedClients[3].Name; FourthPlaceName.GetComponent<TextMeshProUGUI>().text = ConnectedClients[3].Name;
FourthPlaceScore.GetComponent<TextMeshProUGUI>().text = ConnectedClients[3].Score.ToString(); FourthPlaceScore.GetComponent<TextMeshProUGUI>().text = ConnectedClients[3].Score.ToString();
StartCoroutine(displayforSeconds(MainScoreboard, 10.0f));
} }
//after 10 seconds load next scene/game
} }

+ 1
- 1
Assets/Textures/BlueGrass.jpg.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0eea4dec756f99e40b70a704d4b2a745
guid: 4513f7e615fe6194eb541bf2aa0ec56b
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
externalObjects: {} externalObjects: {}

+ 1
- 1
Assets/Textures/OrangeGrass.jpg.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: aa2cbb1a53c81b84aa57cc8f3ed456e1
guid: 59da5d47474e3bb48a11e4289e983b34
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
externalObjects: {} externalObjects: {}

+ 1
- 1
Assets/Textures/PinkGrass.jpg.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: f1763a646017cd140b15e5a656d356e8
guid: e780cf0d37f71b6408d89b0a3cc3f060
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
externalObjects: {} externalObjects: {}

+ 1
- 1
Assets/Textures/PurpleGrass.jpg.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 750f08c2a813294428aa533055aafe1f
guid: 1a108a2983f44b74c96e8f516c786698
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
externalObjects: {} externalObjects: {}

+ 1
- 1
Assets/Textures/RedGrass.jpg.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0c9ccc19465ae4c44a2b90b5edfc3463
guid: c65b64f909e9095479f45df8f724ed8c
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
externalObjects: {} externalObjects: {}

+ 1
- 1
Assets/Textures/YellowGrass.jpg.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5a0b9a04fbc48c34cbea389c7a77a268
guid: cde5baeed2525014c850f27b95a59739
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
externalObjects: {} externalObjects: {}

+ 2
- 2
ProjectSettings/EditorBuildSettings.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3efc8aa953b42cdb6b56fd558a98a0a19da40d54605abb89122bb6f3755616d4
size 1202
oid sha256:88d9f08941b47a69507b753a69d9ac66a0476ae2803df22e24904f0e7667efcf
size 1316

+ 2
- 2
ProjectSettings/TagManager.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:62eccf8fc7b489c45e400510e49de0e20272e66576250b7b29d9adee3ee3c5f7
size 403
oid sha256:7317ce4fb5ff3b0aba81dcbe81d92b823ec0f3ee870b5a2b78560baae6c53a91
size 416

Loading…
Cancel
Save