fix bugs and add features to blohaGames and ChestGame

This commit is contained in:
Firesieht 2022-01-26 22:10:40 +03:00
parent 3b29c005ef
commit 57803891ad
15 changed files with 716 additions and 26 deletions

View File

@ -409,7 +409,8 @@ MonoBehaviour:
- {fileID: 3948254973102075788, guid: cdaa7b14c6cb18f4680e5cd924266aa1, type: 3}
- {fileID: 3948254973102075788, guid: cdaa7b14c6cb18f4680e5cd924266aa1, type: 3}
chestWidthLamp: {fileID: 3948254973102075788, guid: e04d74882132bb54d9dd31401f51bd42, type: 3}
button: {fileID: 34072745}
openChestButton: {fileID: 34072745}
getLampButton: {fileID: 1660094208}
--- !u!1 &117754087
GameObject:
m_ObjectHideFlags: 0
@ -444,8 +445,8 @@ RectTransform:
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.000011444, y: 0}
m_SizeDelta: {x: 871.798, y: 89.6758}
m_AnchoredPosition: {x: 0.000011444, y: -127}
m_SizeDelta: {x: 776.0612, y: 119.4133}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &117754089
MonoBehaviour:
@ -460,7 +461,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9811321, g: 0.29156283, b: 0.29156283, 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
@ -469,10 +470,10 @@ MonoBehaviour:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 72
m_FontSize: 48
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 7
m_MinSize: 4
m_MaxSize: 72
m_Alignment: 4
m_AlignByGeometry: 0
@ -702,6 +703,78 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1213858281
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1213858282}
- component: {fileID: 1213858284}
- component: {fileID: 1213858283}
m_Layer: 5
m_Name: cursor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1213858282
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1213858281}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2075150843}
m_RootOrder: 3
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.000016212, y: 0.000016212}
m_SizeDelta: {x: 122.8471, y: 122.8471}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1213858283
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1213858281}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 2800000, guid: 9ef24bec33175424b96f5d25b5925cb5, type: 3}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!222 &1213858284
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1213858281}
m_CullTransparentMesh: 1
--- !u!1 &1529997920
GameObject:
m_ObjectHideFlags: 0
@ -847,6 +920,218 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1608582147
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1608582148}
- component: {fileID: 1608582150}
- component: {fileID: 1608582149}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1608582148
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1608582147}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1660094209}
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: 13.5}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1608582149
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1608582147}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.22745098, g: 0.13725491, b: 0.06666667, 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_FontData:
m_Font: {fileID: 12800000, guid: be643c0c6aa10b54f849c7fa2b29a222, type: 3}
m_FontSize: 72
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 7
m_MaxSize: 73
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u0412\u0437\u044F\u0442\u044C"
--- !u!222 &1608582150
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1608582147}
m_CullTransparentMesh: 1
--- !u!1 &1660094208
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1660094209}
- component: {fileID: 1660094212}
- component: {fileID: 1660094211}
- component: {fileID: 1660094210}
m_Layer: 5
m_Name: getLamp
m_TagString: button
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1660094209
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1660094208}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1608582148}
m_Father: {fileID: 2075150843}
m_RootOrder: 2
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.000015259, y: -485}
m_SizeDelta: {x: 692.6834, y: 189.4229}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1660094210
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1660094208}
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: 1
m_TargetGraphic: {fileID: 1660094211}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 75246285}
m_TargetAssemblyTypeName: main, Assembly-CSharp
m_MethodName:
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1660094211
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1660094208}
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: 74dfff80d48f40c4f8e2cd3891f40eb5, 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!222 &1660094212
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1660094208}
m_CullTransparentMesh: 1
--- !u!1 &2075150839
GameObject:
m_ObjectHideFlags: 0
@ -940,6 +1225,8 @@ RectTransform:
m_Children:
- {fileID: 117754088}
- {fileID: 34072746}
- {fileID: 1660094209}
- {fileID: 1213858282}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

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

BIN
Assets/images/cursor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -0,0 +1,120 @@
fileFormatVersion: 2
guid: 9ef24bec33175424b96f5d25b5925cb5
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 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: Android
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Material 1
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.9622642, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 04766b0997b6e4e418fbfcfab5efc1e5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -73,6 +73,6 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0, b: 0, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -92,6 +92,7 @@ GameObject:
- component: {fileID: 3948254973102075791}
- component: {fileID: -6030418705777131346}
- component: {fileID: 3276105321069666716}
- component: {fileID: 984409992584537297}
m_Layer: 0
m_Name: Chest
m_TagString: chest
@ -146,6 +147,18 @@ MonoBehaviour:
precomputeOutline: 0
bakeKeys: []
bakeValues: []
--- !u!114 &984409992584537297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3948254973102075788}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7052127bf8a3b7d48ac8fb91f5262e4f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &3948254973771866327
GameObject:
m_ObjectHideFlags: 0
@ -237,9 +250,9 @@ Animation:
m_GameObject: {fileID: 3948254973771866327}
m_Enabled: 1
serializedVersion: 3
m_Animation: {fileID: 7400000, guid: 6b97969f8218d4b45831e5d623be103b, type: 2}
m_Animation: {fileID: 0}
m_Animations:
- {fileID: 7400000, guid: 6b97969f8218d4b45831e5d623be103b, type: 2}
- {fileID: 0}
m_WrapMode: 0
m_PlayAutomatically: 1
m_AnimatePhysics: 0

View File

@ -92,6 +92,7 @@ GameObject:
- component: {fileID: 3948254973102075791}
- component: {fileID: -6030418705777131346}
- component: {fileID: 3276105321069666716}
- component: {fileID: 6952974847028770159}
m_Layer: 0
m_Name: lampChest
m_TagString: chest
@ -112,6 +113,7 @@ Transform:
m_Children:
- {fileID: 3948254973771866315}
- {fileID: 3948254973030415050}
- {fileID: 2491940189053459711}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -146,6 +148,18 @@ MonoBehaviour:
precomputeOutline: 0
bakeKeys: []
bakeValues: []
--- !u!114 &6952974847028770159
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3948254973102075788}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7052127bf8a3b7d48ac8fb91f5262e4f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &3948254973771866327
GameObject:
m_ObjectHideFlags: 0
@ -173,7 +187,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3948254973771866327}
m_LocalRotation: {x: -0, y: -0, z: 0.005560251, w: 0.9999846}
m_LocalPosition: {x: -0.01, y: 0.739, z: 0.006}
m_LocalPosition: {x: -0.016, y: 0.739, z: 0.006}
m_LocalScale: {x: 1, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 3948254973102075791}
@ -206,7 +220,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 3ce4373d6156ce040b57020ef2a00cc6, type: 2}
- {fileID: 2100000, guid: 2c4b61fca618e8d4198a6dca85eabd31, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -237,10 +251,125 @@ Animation:
m_GameObject: {fileID: 3948254973771866327}
m_Enabled: 1
serializedVersion: 3
m_Animation: {fileID: 7400000, guid: 6b97969f8218d4b45831e5d623be103b, type: 2}
m_Animation: {fileID: 0}
m_Animations:
- {fileID: 7400000, guid: 6b97969f8218d4b45831e5d623be103b, type: 2}
- {fileID: 0}
m_WrapMode: 0
m_PlayAutomatically: 1
m_AnimatePhysics: 0
m_CullingType: 0
--- !u!1 &6286875875808988789
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2491940189053459711}
- component: {fileID: 458519346999257266}
- component: {fileID: 4261899294707898284}
- component: {fileID: 1753975975956052251}
- component: {fileID: 5743851695361155527}
m_Layer: 0
m_Name: lamp
m_TagString: lamp
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &2491940189053459711
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6286875875808988789}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 2.034, z: 0}
m_LocalScale: {x: 0.55, y: 1.12, z: 0.57}
m_Children: []
m_Father: {fileID: 3948254973102075791}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &458519346999257266
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6286875875808988789}
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4261899294707898284
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6286875875808988789}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 04766b0997b6e4e418fbfcfab5efc1e5, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &1753975975956052251
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6286875875808988789}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5
m_Height: 1.9999999
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &5743851695361155527
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6286875875808988789}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 0
outlineColor: {r: 0, g: 1, b: 0.00427413, a: 1}
outlineWidth: 5.12
precomputeOutline: 0
bakeKeys: []
bakeValues: []

View File

@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class chestController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (PlayerPrefs.GetInt(gameObject.name) == 1)
{
Debug.Log(gameObject.transform.GetChild(0).gameObject.name);
PlayerPrefs.SetInt(gameObject.name, 2);
gameObject.transform.GetChild(0).gameObject.GetComponent<MeshRenderer>().material.color = Color.red;
if (gameObject.name == "chest5")
{
gameObject.transform.Find("lamp").gameObject.SetActive(true);
}
}
}
}

View File

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

View File

@ -11,7 +11,9 @@ public class main : MonoBehaviour
{
[SerializeField] List<GameObject> chests;
[SerializeField] GameObject chestWidthLamp;
[SerializeField] GameObject button;
[SerializeField] GameObject openChestButton;
[SerializeField] GameObject getLampButton;
ARRaycastManager raycastManager;
Text status;
@ -29,7 +31,6 @@ public class main : MonoBehaviour
void Update()
{
detectPLanes();
openChest();
}
@ -54,7 +55,7 @@ public class main : MonoBehaviour
cords.RemoveAt(index);
}
obj = Instantiate(chestWidthLamp, position: cords[0], rotation: new Quaternion());
obj.name = "chest 5";
obj.name = "chest5";
}
private void detectPLanes()
@ -71,7 +72,7 @@ public class main : MonoBehaviour
search = false;
if (spawnedchest == false && hits.Count > 0)
{
status.text = "spawned chest";
status.gameObject.SetActive(false);
spawnedchest = true;
spawnChests(hits[0].pose.position);
}
@ -82,10 +83,17 @@ public class main : MonoBehaviour
Ray ray = new Ray(gameObject.transform.GetChild(0).transform.position, gameObject.transform.GetChild(0).transform.forward);
RaycastHit raycastHit;
if (Physics.Raycast(ray, out raycastHit))
if (Physics.Raycast(ray, out raycastHit) && GameObject.FindGameObjectsWithTag("aim").Length == 0)
{
status.text = "ray";
if (raycastHit.collider.gameObject.tag == "chest")
if (raycastHit.collider.gameObject.tag == "lamp")
{
rayRecObj = raycastHit.collider.gameObject;
rayRecObj.GetComponent<Outline>().enabled = true;
getLampButton.SetActive(true);
}
else if (raycastHit.collider.gameObject.tag == "chest")
{
if (isTracking == false)
{
@ -94,10 +102,8 @@ public class main : MonoBehaviour
//óñòàíàâëèâàåì ïîäñâåòêó îáúåêòà + äîáàâëÿåì êíîïêó îòêðûòü
PlayerPrefs.SetInt("chestNumber", Convert.ToInt32(rayRecObj.name.Substring(5)));
rayRecObj.GetComponent<Outline>().enabled = true;
button.SetActive(true);
status.text = "chest";
openChestButton.SetActive(true);
}
status.text = "chest";
//raycastHit.collider.gameObject.transform.GetChild(0).GetComponent<Renderer>().material.color = Color.green;
}
@ -116,15 +122,14 @@ public class main : MonoBehaviour
{
isTracking = false;
//ñáðàñûâàåì ïîäñâåòêó îáúåêòà + óáèðàåì êíîïêó îòêðûòü
status.text = "no chest";
rayRecObj.GetComponent<Outline>().enabled = false;
button.SetActive(false);
openChestButton.SetActive(false);
getLampButton.SetActive(false);
}
}
public void openBloha()
{
Debug.LogError("SCENE");
SceneManager.LoadScene("BlohaGame", LoadSceneMode.Additive);
}
}

View File

@ -76,6 +76,8 @@ public class blohaManager : MonoBehaviour
public void chestOpen()
{
PlayerPrefs.SetInt("chest" + PlayerPrefs.GetInt("chestNumber").ToString(), 1);
Debug.Log(PlayerPrefs.GetInt("chest" + PlayerPrefs.GetInt("chestNumber").ToString()));
Debug.Log("chest" + PlayerPrefs.GetInt("chestNumber").ToString());
SceneManager.UnloadScene("BlohaGame");
//ïðîèñõîäèò òî, ÷òîáû ñóíäóê îòêðûâàëñÿ
}

View File

@ -15,6 +15,7 @@ TagManager:
- tenpoints_startpos
- chest
- tenpoints_tagget
- lamp
layers:
- Default
- TransparentFX

Binary file not shown.