Added Second Scene + added monuments info

This commit is contained in:
Rabidus 2023-08-07 13:23:18 +03:00
parent 53710529b5
commit 05ec26cc9f
72 changed files with 26079 additions and 13282 deletions

View File

@ -59,7 +59,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 0edc847d036304549826a8591306cad2, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@ -122,7 +122,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.8, g: 0.8, b: 0.8, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -62,7 +62,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: b07f17b5d8d5e384da2d417a24381ab2, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@ -123,7 +123,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.22641507, g: 0.22641507, b: 0.22641507, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.22641504, g: 0.22641504, b: 0.22641504, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -59,7 +59,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 8e5a7d84f07680d4494818e3de59ef30, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@ -122,7 +122,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.19811317, g: 0.19811317, b: 0.19811317, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.19811314, g: 0.19811314, b: 0.19811314, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -60,7 +60,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 8e5a7d84f07680d4494818e3de59ef30, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@ -123,7 +123,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.45283014, g: 0.45283014, b: 0.45283014, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.45283008, g: 0.45283008, b: 0.45283008, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -60,7 +60,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 8e5a7d84f07680d4494818e3de59ef30, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@ -123,7 +123,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.16862741, g: 0.41725534, b: 0.7176471, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.16862738, g: 0.4172553, b: 0.7176471, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -60,8 +60,8 @@ Material:
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Texture: {fileID: 2800000, guid: 8e5a7d84f07680d4494818e3de59ef30, type: 3}
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
@ -124,7 +124,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.49803925, b: 0.19999999, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.49803925, b: 0.19999996, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1}
m_BuildTextureStacks: []

View File

@ -47,8 +47,8 @@ Material:
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Texture: {fileID: 2800000, guid: 7038e9da9f5b75d49b2b2ba283b09b4d, type: 3}
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
@ -111,7 +111,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.72156864, g: 0.2352941, b: 0.5098039, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.72156864, g: 0.23529407, b: 0.5098038, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []

View File

@ -60,7 +60,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 8e5a7d84f07680d4494818e3de59ef30, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@ -123,7 +123,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.8901961, g: 0.113725476, b: 0.17500925, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.8901961, g: 0.113725446, b: 0.17500922, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -111,7 +111,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.8000001, b: 0.8000001, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0, g: 0.8000001, b: 0.8000001, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []

View File

@ -111,7 +111,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.09803919, g: 0.89019614, b: 0.69411767, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.09803916, g: 0.89019614, b: 0.69411767, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -124,7 +124,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.9647059, b: 0, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.9647059, b: 0, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []

View File

@ -59,7 +59,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: db2e8562d9478b742bad3947dcb24236, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@ -11,6 +11,7 @@ Material:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ValidKeywords:
- _EMISSION
- _ENVIRONMENTREFLECTIONS_OFF
- _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
m_InvalidKeywords:
- _GLOSSYREFLECTIONS_OFF
@ -49,8 +50,8 @@ Material:
m_Scale: {x: 100, y: 100}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Texture: {fileID: 2800000, guid: 7038e9da9f5b75d49b2b2ba283b09b4d, type: 3}
m_Scale: {x: 100, y: 100}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
@ -113,7 +114,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.12549016, g: 0.17254898, b: 0.21568623, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.12549013, g: 0.17254895, b: 0.2156862, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.047169805, g: 0.047169805, b: 0.047169805, a: 1}
m_BuildTextureStacks: []

View File

@ -124,7 +124,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0, b: 0.4, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0, b: 0.39999998, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -24,8 +24,6 @@ Material:
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_ValidKeywords:
- _EMISSION
- _GLOSSINESS_FROM_BASE_ALPHA
- _SPECULAR_COLOR
m_InvalidKeywords: []
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
@ -62,7 +60,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 0edc847d036304549826a8591306cad2, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@ -22,9 +22,7 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: RenderMaterial
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_ValidKeywords:
- _GLOSSINESS_FROM_BASE_ALPHA
- _SPECULAR_COLOR
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
@ -61,7 +59,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 8400000, guid: 74ecb3ce20a15d94595d759a830bc012, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@ -63,7 +63,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: b729d7318ff923744818c4fe786eb90d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@ -22,6 +22,7 @@ Material:
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@ -113,7 +114,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0, g: 0.94130903, b: 1, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0, g: 0.94130903, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0.9896784, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -34,6 +34,7 @@ Material:
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@ -125,7 +126,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0.007843138, g: 0.83137256, b: 0.7294118, a: 0.6509804}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.007843138, g: 0.83137256, b: 0.7294118, a: 0.6509804}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -47,8 +47,8 @@ Material:
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Texture: {fileID: 2800000, guid: 7038e9da9f5b75d49b2b2ba283b09b4d, type: 3}
m_Scale: {x: 10, y: 10}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}

View File

@ -2544,14 +2544,7 @@ namespace BNG {
void OnDestroy() {
if(BeingHeld && !quitting) {
try
{
DropItem(false, false);
}
catch (System.Exception)
{
}
DropItem(false, false);
}
}

View File

@ -598,13 +598,20 @@ namespace BNG {
public virtual void ResetHandGraphics() {
if(HandsGraphics != null) {
// Make visible again
HandsGraphics.gameObject.SetActive(true);
try
{
// Make visible again
HandsGraphics.gameObject.SetActive(true);
// Move parent back to where it was originally
HandsGraphics.transform.parent = handsGraphicsParent;
HandsGraphics.transform.localPosition = handsGraphicsPosition;
HandsGraphics.transform.localRotation = handsGraphicsRotation;
// Move parent back to where it was originally
HandsGraphics.transform.parent = handsGraphicsParent;
HandsGraphics.transform.localPosition = handsGraphicsPosition;
HandsGraphics.transform.localRotation = handsGraphicsRotation;
}
catch (System.Exception ex)
{
Debug.LogError(ex.Message);
}
}
}

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Events;
namespace BNG {
public class VRKeyboard : MonoBehaviour {
@ -16,6 +16,7 @@ namespace BNG {
List<VRKeyboardKey> KeyboardKeys;
public UnityEvent OnSubmit;
void Awake() {
KeyboardKeys = transform.GetComponentsInChildren<VRKeyboardKey>().ToList();
}
@ -57,7 +58,8 @@ namespace BNG {
}
}
else if (formattedKey.ToLower() == "enter") {
// Debug.Log("Pressed Enter");
Debug.Log("Pressed Enter");
OnSubmit?.Invoke();
// UnityEngine.EventSystems.ExecuteEvents.Execute(AttachedInputField.gameObject, null, UnityEngine.EventSystems.ExecuteEvents.submitHandler);
}
else if (formattedKey.ToLower() == "shift") {

8
Assets/Images/UI.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 72c0b48d2ae65034f8272be71949098c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Images/UI/Lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: b893e8f2dc766e941a18fe6f2dd65dd1
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: 1
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: 1
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: 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:

View File

@ -7,15 +7,16 @@ public class MonumentController : MonoBehaviour
[SerializeField]
private float _energyToUnlock;
[SerializeField]
private float _unlockTime = 1;
[SerializeField]
private LeanTweenType _ease;
private MonumentInfo _info;
private PlayerSetup _playerSetup;
private EnergyController _energyController;
private float _currentEnergy;
private void Awake()
{
_playerSetup = FindObjectOfType<PlayerSetup>();
_energyController = FindObjectOfType<EnergyController>();
_currentEnergy = _energyToUnlock;
}
@ -24,11 +25,14 @@ public class MonumentController : MonoBehaviour
{
var totalEnergy = _energyController.Energy;
LeanTween.value(totalEnergy, 0, _unlockTime).setEase(_ease).setOnUpdate((float x)=>
LeanTween.value(totalEnergy, 0, 1).setEase(LeanTweenType.easeInOutSine).setOnUpdate((float x)=>
{
_energyController.Energy = x;
_currentEnergy = Mathf.Clamp(_energyToUnlock - (totalEnergy - x), 0, int.MaxValue);
Debug.Log($"Clamped energy value: {_currentEnergy / _energyToUnlock}");
});
//TODO: ÐÀÇÁËÎÊÈÐÎÂÀÒÜ ÌÎÍÓÌÅÍÒ ÒÎËÜÊÎ ÅÑËÈ ÕÂÀÒÈËÎ ÝÍÅÐÃÈÈ
_playerSetup.UnlockMonument(_info, _currentEnergy);
}
}

15
Assets/MonumentInfo.cs Normal file
View File

@ -0,0 +1,15 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "Monumet")]
public class MonumentInfo : ScriptableObject
{
public readonly string Name;
public readonly Sprite Image;
[TextArea]
public readonly string Description;
[HideInInspector]
public float Score;
}

View File

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

View File

@ -0,0 +1,67 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public class MonumentResultController : MonoBehaviour, IPlayerInfoRequre
{
private List<MonumentInfo> _monuments;
[SerializeField]
private UIMonumentButton _UIMonumentPrefab;
[SerializeField]
private Transform _placeHolder;
[SerializeField]
private TMPro.TextMeshProUGUI _descriptionText;
[SerializeField]
private Image _icon;
[SerializeField]
private TMPro.TextMeshProUGUI _score;
private PlayerSetup _playerSetup;
private void Start()
{
_monuments = new List<MonumentInfo>();
_monuments = Resources.LoadAll<MonumentInfo>("Monuments/").ToList();
InitPlayerInfo();
InitMonuments();
}
public void InitPlayerInfo()
{
_playerSetup = FindObjectOfType<PlayerSetup>();
}
private bool _showFirst = true;
private void InitMonuments()
{
_monuments.ForEach(x =>
{
var newUIMonument = Instantiate(_UIMonumentPrefab, _placeHolder);
newUIMonument.Init(x);
if (_playerSetup.TryFindMonument(x))
{
newUIMonument.Unlock();
if (_showFirst)
{
_showFirst = false;
newUIMonument.SelectMonument();
}
}
});
}
public void SelectMonument(MonumentInfo info)
{
_icon.sprite = info.Image;
_score.SetText(info.Score.ToString());
_descriptionText.SetText(info.Description);
}
}

View File

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

View File

@ -12,72 +12,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e87ef997297757344b0e2e4a70134259, type: 3}
m_Name: PlayerInfo
m_EditorClassIdentifier:
Players:
- Name: 123
Score: 5
- Name: Player_658
Score: 0
- Name: Player_952
Score: 0
- Name: Player_952
Score: 0
- Name: Player_952
Score: 4
- Name: Player_952
Score: 0
- Name: Player_952
Score: 0
- Name: Player_952
Score: 0
- Name: Player_894
Score: 0
- Name: Player_315
Score: 0
- Name: Player_360
Score: 0
- Name: Player_334
Score: 0
- Name: Player_556
Score: 0
- Name: Player_724
Score: 3
- Name: Player_715
Score: 0
- Name: Player_286
Score: 0
- Name: Player_449
Score: 0
- Name: Player_386
Score: 0
- Name: Player_732
Score: 0
- Name: Player_666
Score: 0
- Name: Player_732
Score: 2
- Name: Player_436
Score: 0
- Name: Player_702
Score: 0
- Name: Player_702
Score: 0
- Name: Player_1
Score: 1
- Name: Player_997
Score: 0
- Name: Player_619
Score: 0
- Name: Player_179
Score: 0
- Name: Player_469
Score: 0
- Name: Player_283
Score: 0
- Name: Player_597
Score: 0
- Name: Player_24
Score: 0
- Name: Player_10
Score: 0
- Name: Player_421
Score: 0
Players: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a55e269870fad4640851b50ba892068a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,428 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4727148157028696206
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4727148157028696205}
- component: {fileID: 4727148157028696203}
- component: {fileID: 4727148157028696204}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4727148157028696205
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157028696206}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4727148158051953544}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4727148157028696203
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157028696206}
m_CullTransparentMesh: 1
--- !u!114 &4727148157028696204
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157028696206}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
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_text: "\u041C\u043E\u043D\u0443\u043C\u0435\u043D\u0442 1"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 80
m_fontSizeBase: 80
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4727148157151075356
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4727148157151075355}
- component: {fileID: 4727148157151075353}
- component: {fileID: 4727148157151075354}
m_Layer: 5
m_Name: LockPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4727148157151075355
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157151075356}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4727148157503049452}
m_Father: {fileID: 4727148158051953544}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4727148157151075353
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157151075356}
m_CullTransparentMesh: 1
--- !u!114 &4727148157151075354
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157151075356}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.92941177}
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_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4727148157503049453
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4727148157503049452}
- component: {fileID: 4727148157503049450}
- component: {fileID: 4727148157503049451}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4727148157503049452
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157503049453}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4727148157151075355}
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: 114.8, y: 114.8}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4727148157503049450
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157503049453}
m_CullTransparentMesh: 1
--- !u!114 &4727148157503049451
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148157503049453}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
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: 21300000, guid: b893e8f2dc766e941a18fe6f2dd65dd1, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4727148158051953545
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4727148158051953544}
- component: {fileID: 4727148158051953541}
- component: {fileID: 4727148158051953542}
- component: {fileID: 4727148158051953543}
- component: {fileID: 4727148158051953540}
m_Layer: 5
m_Name: UIMonumentButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4727148158051953544
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148158051953545}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4727148157028696205}
- {fileID: 4727148157151075355}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 180}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4727148158051953541
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148158051953545}
m_CullTransparentMesh: 1
--- !u!114 &4727148158051953542
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148158051953545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
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: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4727148158051953543
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148158051953545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 0
m_TargetGraphic: {fileID: 4727148158051953542}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4727148158051953540
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4727148158051953545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b7d68d1d37d04147943d418a4658414, type: 3}
m_Name:
m_EditorClassIdentifier:
_lockPanel: {fileID: 4727148157151075356}
_name: {fileID: 4727148157028696204}

View File

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

8
Assets/Resources.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9962ae8121054c6479498af05c242e31
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b1c7c2f59df98034c9c15a7afb3e307c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c12e5cd6574c9c40b63c1ccfd6962f8, type: 3}
m_Name: Monumet 1
m_EditorClassIdentifier:
Name: Test 1
Image: {fileID: 21300000, guid: 5f7fa9a7940a64e79b5a42d9f661d42c, type: 3}
Description: Test description

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 75d18b997a1704b4eb38de61d48d78df
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c12e5cd6574c9c40b63c1ccfd6962f8, type: 3}
m_Name: Monumet 2
m_EditorClassIdentifier:
Name: Test 2
Image: {fileID: 21300000, guid: 5f7fa9a7940a64e79b5a42d9f661d42c, type: 3}
Description: Test description

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d4de157c27fc8834f882e406371a3e81
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c12e5cd6574c9c40b63c1ccfd6962f8, type: 3}
m_Name: Monumet
m_EditorClassIdentifier:
Name: Test
Image: {fileID: 21300000, guid: 5f7fa9a7940a64e79b5a42d9f661d42c, type: 3}
Description: Test description

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8b62f7aaa1e3446429f628b958076a13
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

8
Assets/Scenes/Other.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a7dccb20ba33164ea58174aaf3fcf4a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e5aa917ee6290354f8aadc3b694ec0c9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -19,9 +19,6 @@ public class GameManager : MonoBehaviour
private PlayerSetup _playerSetup;
private EnergyController _energyController;
[SerializeField]
private TMPro.TMP_InputField _inputField;
public UnityEvent OnGameStarted;
public UnityEvent OnGameEnded;
@ -50,11 +47,6 @@ public class GameManager : MonoBehaviour
_energyController = FindObjectOfType<EnergyController>();
}
private void Start()
{
_inputField.text = $"Player_{Random.Range(0, 1000)}";
}
public void ChangeState(GameState newState)
{
CurrentGameState = newState;
@ -65,18 +57,18 @@ public class GameManager : MonoBehaviour
{
case GameState.None:
{
SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().buildIndex);
SceneManager.LoadSceneAsync(1);
}
break;
case GameState.Started:
{
_playerSetup.CreateNewPlayer(_inputField.text);
_playerSetup.CreateNewPlayer();
OnGameStarted?.Invoke();
}
break;
case GameState.Ended:
{
_playerSetup.AddScore(_energyController.Energy);
_playerSetup.SetPlayerScore(_energyController.Energy);
OnGameEnded?.Invoke();
ChangeState(GameState.None);
}

View File

@ -0,0 +1,4 @@
public interface IPlayerInfoRequre
{
void InitPlayerInfo();
}

View File

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

View File

@ -3,29 +3,52 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public class LeaderboardController : MonoBehaviour
public class LeaderboardController : MonoBehaviour, IPlayerInfoRequre
{
[SerializeField]
private RectTransform _content;
[SerializeField]
private LeaderboardEntry _leaderboardEntryPrefab;
private PlayerSetup _playerSetup;
[SerializeField]
private PlayerInfo _playerInfo;
private InputField _nameInputField;
private List<LeaderboardEntry> _entries = new List<LeaderboardEntry>();
private void Start()
{
InitPlayerInfo();
UpdateLeaderboard();
}
private void UpdateLeaderboard()
{
var sortedList = _playerInfo.Players.OrderByDescending(x => x.Score).ToList();
_entries.ForEach(x => Destroy(x.gameObject));
_entries.Clear();
_entries = new List<LeaderboardEntry>();
var sortedList = _playerSetup.PlayerInfo.Players.OrderByDescending(x => x.Score).ToList();
for (int i = 0; i < sortedList.Count; i++)
{
var newEntry = Instantiate(_leaderboardEntryPrefab, _content);
_entries.Add(newEntry);
newEntry.Init(sortedList[i], i);
}
}
public void SubmitNewEntry()
{
_playerSetup.SetPlayerName(_nameInputField.text);
_playerSetup.SavePlayer();
UpdateLeaderboard();
}
public void InitPlayerInfo()
{
_playerSetup = FindObjectOfType<PlayerSetup>();
}
}

View File

@ -8,10 +8,7 @@ public class Player
public string Name;
public float Score;
public Player(string name)
{
Name = name;
}
public List<MonumentInfo> UnlockedMonumets = new List<MonumentInfo>();
}
[CreateAssetMenu(fileName = "PlayerInfo")]

View File

@ -4,18 +4,55 @@ using UnityEngine;
public class PlayerSetup : MonoBehaviour
{
public static PlayerSetup Instance;
[SerializeField]
private PlayerInfo _playerInfo;
private Player _currentPlayer;
public void CreateNewPlayer(string name)
public PlayerInfo PlayerInfo => _playerInfo;
private void Awake()
{
_currentPlayer = new Player(name);
_playerInfo.Players.Add(_currentPlayer);
if (Instance == null)
{
Instance = this;
}
else if (Instance == this)
{
Destroy(gameObject);
}
DontDestroyOnLoad(gameObject);
}
public void AddScore(float ammount)
public void CreateNewPlayer()
{
_currentPlayer = new Player();
}
public void SetPlayerScore(float ammount)
{
_currentPlayer.Score = ammount;
}
public void SetPlayerName(string name)
{
_currentPlayer.Name = name;
}
public void UnlockMonument(MonumentInfo info, float score)
{
info.Score = score;
_currentPlayer.UnlockedMonumets.Add(info);
}
public bool TryFindMonument(MonumentInfo info)
{
return _currentPlayer.UnlockedMonumets.Contains(info);
}
public void SavePlayer()
{
_playerInfo.Players.Add(_currentPlayer);
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,63 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(Button))]
public class UIMonumentButton : MonoBehaviour
{
[SerializeField]
private GameObject _lockPanel;
[SerializeField]
private TMPro.TextMeshProUGUI _name;
private Button _button;
private MonumentInfo _info;
private MonumentResultController _controller;
public void Init(MonumentInfo info)
{
_info = info;
_name.SetText(_info.Name);
}
private void Awake()
{
_button = GetComponent<Button>();
_controller = FindObjectOfType<MonumentResultController>();
}
private void OnEnable()
{
_button.onClick.AddListener(SelectMonument);
}
private void OnDisable()
{
_button.onClick.RemoveListener(SelectMonument);
}
private void Start()
{
Lock();
}
public void Lock()
{
_button.interactable = false;
_lockPanel.SetActive(true);
}
public void Unlock()
{
_button.interactable = true;
_lockPanel.SetActive(false);
}
public void SelectMonument()
{
_controller.SelectMonument(_info);
}
}

View File

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

View File

@ -3,6 +3,7 @@
"com.unity.cinemachine": "2.8.9",
"com.unity.collab-proxy": "1.17.2",
"com.unity.ext.nunit": "1.0.0",
"com.unity.feature.2d": "1.0.0",
"com.unity.feature.development": "1.0.1",
"com.unity.feature.vr": "1.0.0",
"com.unity.ide.rider": "3.0.15",

View File

@ -1,5 +1,90 @@
{
"dependencies": {
"com.unity.2d.animation": {
"version": "7.0.8",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.2d.common": "6.0.5",
"com.unity.2d.sprite": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.uielements": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.2d.common": {
"version": "6.0.5",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.mathematics": "1.1.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.burst": "1.5.1"
},
"url": "https://packages.unity.com"
},
"com.unity.2d.path": {
"version": "5.0.2",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.2d.pixel-perfect": {
"version": "5.0.1",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.2d.psdimporter": {
"version": "6.0.6",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.2d.animation": "7.0.8",
"com.unity.2d.common": "6.0.5",
"com.unity.2d.sprite": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.2d.sprite": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {}
},
"com.unity.2d.spriteshape": {
"version": "7.0.6",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.1.0",
"com.unity.2d.common": "6.0.4",
"com.unity.2d.path": "5.0.2",
"com.unity.modules.physics2d": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.2d.tilemap": {
"version": "1.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {}
},
"com.unity.2d.tilemap.extras": {
"version": "2.2.3",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.tilemap": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ugui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.7.3",
"depth": 1,
@ -41,6 +126,20 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.feature.2d": {
"version": "1.0.0",
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.2d.animation": "7.0.8",
"com.unity.2d.pixel-perfect": "5.0.1",
"com.unity.2d.psdimporter": "6.0.6",
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.spriteshape": "7.0.6",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.2d.tilemap.extras": "2.2.3"
}
},
"com.unity.feature.development": {
"version": "1.0.1",
"depth": 0,

View File

@ -6,8 +6,11 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/Scene.unity
path: Assets/Scenes/MainScene.unity
guid: 3b4f32e611af09c48965f54374cbd5b4
- enabled: 1
path: Assets/Scenes/ResultScene.unity
guid: e5aa917ee6290354f8aadc3b694ec0c9
m_configObjects:
Unity.XR.Oculus.Settings: {fileID: 11400000, guid: bfa1182bd221b4ca89619141f66f1260,
type: 2}