From 51a41024131728d6dfdaad1dc88ddfe13b732f71 Mon Sep 17 00:00:00 2001 From: amm266 Date: Tue, 13 Apr 2021 19:39:49 +0430 Subject: [PATCH] multiple bug fixes --- Assets/Scenes/MapScene.unity | 705 +++++++++--------- Assets/Scenes/SampleScene.unity | 1055 ++++++++++++++++++++++----- Assets/Scripts/MapMaker/MapMaker.cs | 78 +- Assets/Scripts/MoveCamera.cs | 33 +- 4 files changed, 1335 insertions(+), 536 deletions(-) diff --git a/Assets/Scenes/MapScene.unity b/Assets/Scenes/MapScene.unity index 3253080..ecfe42f 100644 --- a/Assets/Scenes/MapScene.unity +++ b/Assets/Scenes/MapScene.unity @@ -267,7 +267,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &123243328 +--- !u!1 &181119229 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -275,82 +275,85 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 123243329} - - component: {fileID: 123243332} - - component: {fileID: 123243331} - - component: {fileID: 123243330} + - component: {fileID: 181119230} + - component: {fileID: 181119234} + - component: {fileID: 181119233} + - component: {fileID: 181119232} + - component: {fileID: 181119231} m_Layer: 5 - m_Name: setting_team1 + m_Name: winner_panel m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &123243329 + m_IsActive: 0 +--- !u!224 &181119230 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123243328} + m_GameObject: {fileID: 181119229} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.6064154, y: 0.6064154, z: 0.6064154} - m_Children: [] + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 379599948} + - {fileID: 403204783} m_Father: {fileID: 1654332462} - m_RootOrder: 15 + m_RootOrder: 17 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: -724, y: 283} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &123243330 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.30900002, y: 0.45927167} + m_AnchoredPosition: {x: 553, y: 189} + m_SizeDelta: {x: 0, y: -3} + m_Pivot: {x: 0, y: 0} +--- !u!114 &181119231 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123243328} + m_GameObject: {fileID: 181119229} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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: 123243331} - m_OnClick: + m_ShowMaskGraphic: 1 +--- !u!114 &181119232 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 181119229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 0} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.01 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 30 + m_Viewport: {fileID: 0} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 0} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 0 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: 0 + m_OnValueChanged: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1778195490} - m_TargetAssemblyTypeName: GameManager, Assembly-CSharp - m_MethodName: LeftStatsClicked + - m_Target: {fileID: 1509055359} + m_TargetAssemblyTypeName: MoveCamera, Assembly-CSharp + m_MethodName: onScrool m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -360,28 +363,28 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 ---- !u!114 &123243331 +--- !u!114 &181119233 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123243328} + m_GameObject: {fileID: 181119229} 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.31132078, g: 0.31132078, b: 0.31132078, a: 1} + m_Color: {r: 0.55534565, g: 0.5943396, b: 0.54668033, a: 0.85882354} 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: 10d78c024582d744ab51ef91e39909aa, type: 3} - m_Type: 0 + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -389,14 +392,14 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &123243332 + m_PixelsPerUnitMultiplier: 0.15 +--- !u!222 &181119234 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123243328} + m_GameObject: {fileID: 181119229} m_CullTransparentMesh: 0 --- !u!114 &286255581 stripped MonoBehaviour: @@ -420,6 +423,140 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &379599947 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 379599948} + - component: {fileID: 379599950} + - component: {fileID: 379599949} + 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 &379599948 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 379599947} + 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: 181119230} + 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: 77.000015} + m_SizeDelta: {x: 374.9359, y: 118.25108} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &379599949 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 379599947} + 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: __winner__ + 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: 72 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + 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: 1 + 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!222 &379599950 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 379599947} + m_CullTransparentMesh: 0 --- !u!1001 &397345935 PrefabInstance: m_ObjectHideFlags: 0 @@ -427,77 +564,37 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 2069621863} m_Modifications: - - target: {fileID: 201270615, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 734 - objectReference: {fileID: 0} - - target: {fileID: 201270615, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.y - value: 291 - objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 695.77 - objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.y - value: 397 - objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.x - value: 0.5193514 - objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.y - value: 0.5193514 - objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.z - value: 0.5193514 + - target: {fileID: 123243330, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1778195490} + - target: {fileID: 201270614, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: Mute + value: 1 objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_SizeDelta.x - value: 115.06003 + - target: {fileID: 201270619, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: isMute + value: 1 objectReference: {fileID: 0} - - target: {fileID: 520874198, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_SizeDelta.y - value: 102.73825 + - target: {fileID: 520874197, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} - target: {fileID: 520874199, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target value: objectReference: {fileID: 1778195490} - - target: {fileID: 520874200, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_Maskable - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 736659285, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 235 - objectReference: {fileID: 0} - target: {fileID: 798870761, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Target value: objectReference: {fileID: 1509055359} - - target: {fileID: 1063152377, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 762.2 - objectReference: {fileID: 0} - - target: {fileID: 1063152377, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.y - value: 398.7 - objectReference: {fileID: 0} - - target: {fileID: 1063152377, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.x - value: 0.4608757 - objectReference: {fileID: 0} - - target: {fileID: 1063152377, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.y - value: 0.4608757 + - target: {fileID: 912928598, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} - - target: {fileID: 1063152377, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.z - value: 0.4608757 + - target: {fileID: 1063152376, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} - target: {fileID: 1063152378, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -505,30 +602,38 @@ PrefabInstance: objectReference: {fileID: 1778195490} - target: {fileID: 1236313013, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_AnchorMax.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 1236313013, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1331234044, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1778195490} + - target: {fileID: 1503478381, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_IsActive + value: 1 objectReference: {fileID: 0} - target: {fileID: 1537088302, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Target value: objectReference: {fileID: 1509055359} - - target: {fileID: 1873759371, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: -40 - objectReference: {fileID: 0} - - target: {fileID: 897281233120809902, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: -386 - objectReference: {fileID: 0} - target: {fileID: 897281234955408375, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_AnchorMax.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 897281234955408375, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 899166943726102645, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_ChildControlHeight + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} @@ -543,6 +648,10 @@ PrefabInstance: propertyPath: m_LocalPosition.z value: 229.44333 objectReference: {fileID: 0} + - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_LocalRotation.x value: -0 @@ -555,14 +664,6 @@ PrefabInstance: propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - target: {fileID: 2495248660206519639, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 @@ -579,68 +680,150 @@ PrefabInstance: propertyPath: m_Name value: UI objectReference: {fileID: 0} - - target: {fileID: 3241652078898949051, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4663512140528063356, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.x - value: 1.2 - objectReference: {fileID: 0} - - target: {fileID: 4663512140528063356, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_LocalScale.y - value: 1.2 - objectReference: {fileID: 0} - - target: {fileID: 4663512140528063356, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 631 - objectReference: {fileID: 0} - - target: {fileID: 4663512140528063356, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.y - value: 119 - objectReference: {fileID: 0} - - target: {fileID: 6091547920659155532, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6497878173460714080, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 548.99994 - objectReference: {fileID: 0} - - target: {fileID: 7306596528923647282, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_IsActive + - target: {fileID: 8674794668803218738, guid: c96875b7a845a7143be803fea0004d49, type: 3} + propertyPath: m_ChildControlHeight value: 1 objectReference: {fileID: 0} - - target: {fileID: 8402233282379174966, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8674794667775569190, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: -1035.4999 - objectReference: {fileID: 0} - - target: {fileID: 8674794667942260731, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 316 - objectReference: {fileID: 0} - - target: {fileID: 8674794668642842268, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: -766.00006 - objectReference: {fileID: 0} - - target: {fileID: 8674794669103592194, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: -898 - objectReference: {fileID: 0} - - target: {fileID: 8674794669239260972, guid: c96875b7a845a7143be803fea0004d49, type: 3} - propertyPath: m_AnchoredPosition.x - value: 722.99994 - objectReference: {fileID: 0} - target: {fileID: 8674794669486866726, guid: c96875b7a845a7143be803fea0004d49, type: 3} propertyPath: m_Camera value: objectReference: {fileID: 1509055357} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c96875b7a845a7143be803fea0004d49, type: 3} +--- !u!1 &403204782 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 403204783} + - component: {fileID: 403204784} + - component: {fileID: 403204785} + m_Layer: 5 + m_Name: Text (TMP) (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &403204783 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403204782} + 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: 181119230} + m_RootOrder: 1 + 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.7999878, y: -60.7} + m_SizeDelta: {x: 435.91638, y: 210.95226} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &403204784 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403204782} + m_CullTransparentMesh: 0 +--- !u!114 &403204785 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403204782} + 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: 'winner:' + 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: 4278583040 + m_fontColor: {r: 0, g: 1, b: 0.0184803, 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: 72 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + 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: 1 + 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!114 &464039737 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 4375446094312665835, guid: c96875b7a845a7143be803fea0004d49, type: 3} @@ -676,7 +859,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &1003224826 MonoBehaviour: m_ObjectHideFlags: 0 @@ -870,137 +1053,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &1331234042 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1331234043} - - component: {fileID: 1331234046} - - component: {fileID: 1331234045} - - component: {fileID: 1331234044} - m_Layer: 5 - m_Name: Close (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1331234043 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331234042} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.6064154, y: 0.6064154, z: 0.6064154} - m_Children: [] - m_Father: {fileID: 1654332462} - m_RootOrder: 16 - 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: 595, y: 283} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1331234044 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331234042} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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: 1331234045} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1778195490} - m_TargetAssemblyTypeName: GameManager, Assembly-CSharp - m_MethodName: RightStatsClicked - 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 &1331234045 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331234042} - 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.6320754, g: 0.25740176, b: 0.19975968, 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: 10d78c024582d744ab51ef91e39909aa, 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 &1331234046 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331234042} - m_CullTransparentMesh: 0 --- !u!114 &1380460256 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 1620972576, guid: c96875b7a845a7143be803fea0004d49, type: 3} @@ -1112,6 +1164,7 @@ MonoBehaviour: dragSpeed: 15 zoomSpeed: 1 myCamera: {fileID: 1509055357} + crossCameraSize: 0 --- !u!1 &1539077790 stripped GameObject: m_CorrespondingSourceObject: {fileID: 8402233282379174966, guid: c96875b7a845a7143be803fea0004d49, type: 3} @@ -1399,6 +1452,8 @@ MonoBehaviour: m_EditorClassIdentifier: InGame: {fileID: 2069621862} GameLogBrowser: {fileID: 1003224825} + winnerPanel: {fileID: 181119229} + winnerText: {fileID: 403204785} antPrefab: {fileID: 4492105072940884455, guid: 8d0458e01e56e614fb48d9a31922334d, type: 3} cell_empty: {fileID: 2414748525179884939, guid: 3fb5f3165b9b0f74caa7b42352f2245f, type: 3} cell_wall: {fileID: 4228955896558502353, guid: 2e1bde7b6afb8c74cb3fc069c88ca4f8, type: 3} @@ -1585,7 +1640,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &2069621863 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index ec56616..b451a81 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -123,6 +123,147 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &86914674 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 86914676} + - component: {fileID: 86914678} + - component: {fileID: 86914677} + - component: {fileID: 86914675} + m_Layer: 5 + m_Name: InputField (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &86914675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86914674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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: 86914677} + m_TextComponent: {fileID: 885212811} + m_Placeholder: {fileID: 944916691} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!224 &86914676 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86914674} + 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: 944916693} + - {fileID: 885212809} + m_Father: {fileID: 1209871802} + m_RootOrder: 4 + 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: -31.5} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &86914677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86914674} + 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: 10911, 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!222 &86914678 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86914674} + m_CullTransparentMesh: 0 --- !u!1 &385420696 GameObject: m_ObjectHideFlags: 0 @@ -259,7 +400,7 @@ MonoBehaviour: m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 + m_DynamicPixelsPerUnit: 10 --- !u!223 &423554802 Canvas: m_ObjectHideFlags: 0 @@ -292,16 +433,96 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 1209871802} - {fileID: 1751228919} m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 960, y: 540} + m_AnchoredPosition: {x: -6, y: 2} m_SizeDelta: {x: 1920, y: 1080} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &457321453 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 457321454} + - component: {fileID: 457321456} + - component: {fileID: 457321455} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &457321454 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 457321453} + 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: 1206896261} + 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!114 &457321455 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 457321453} + 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.19607843, g: 0.19607843, b: 0.19607843, 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: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Load + +' +--- !u!222 &457321456 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 457321453} + m_CullTransparentMesh: 0 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -347,8 +568,7 @@ MonoBehaviour: widthInput: {fileID: 1377457018} heightInput: {fileID: 1045931136} canvas: {fileID: 423554802} - width: 10 - height: 10 + path: {fileID: 86914675} cell: {fileID: 1850880820349203027, guid: e41e35146487f2441b776430daa93435, type: 3} res1Prefab: {fileID: 0} res2Prefab: {fileID: 0} @@ -362,7 +582,7 @@ Camera: m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_BackGroundColor: {r: 0.5420078, g: 0.6394031, b: 0.7924528, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -379,7 +599,7 @@ Camera: far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 17.8 + orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -421,9 +641,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0e6dda28b97103a4e89340af0863e0ed, type: 3} m_Name: m_EditorClassIdentifier: + ArrowMoveSpeed: 2 dragSpeed: 2 zoomSpeed: 2 myCamera: {fileID: 519420031} + crossCameraSize: 1 --- !u!1 &656879637 GameObject: m_ObjectHideFlags: 0 @@ -531,16 +753,16 @@ RectTransform: m_GameObject: {fileID: 875360906} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.0963092, y: 0.0963092, z: 0.0963092} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 385420697} - {fileID: 1559488834} - m_Father: {fileID: 1751228919} - m_RootOrder: 1 + m_Father: {fileID: 2086358230} + 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: -983.6, y: -529.1} + m_AnchoredPosition: {x: -686.68005, y: 392.01} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &875360908 @@ -644,7 +866,7 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 875360906} m_CullTransparentMesh: 0 ---- !u!1 &1027187182 +--- !u!1 &885212808 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -652,78 +874,236 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1027187183} - - component: {fileID: 1027187184} + - component: {fileID: 885212809} + - component: {fileID: 885212810} + - component: {fileID: 885212811} m_Layer: 5 - m_Name: Toggle - m_TagString: Finish + m_Name: Text + m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1027187183 +--- !u!224 &885212809 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1027187182} + m_GameObject: {fileID: 885212808} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.11524084, y: 0.11524084, z: 0.11524084} - m_Children: - - {fileID: 1832650744} - - {fileID: 1315799203} - m_Father: {fileID: 1751228919} - m_RootOrder: 4 + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 86914676} + m_RootOrder: 1 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: -981.9, y: -525} - m_SizeDelta: {x: 160, y: 20} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1027187184 +--- !u!222 &885212810 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 885212808} + m_CullTransparentMesh: 0 +--- !u!114 &885212811 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1027187182} + m_GameObject: {fileID: 885212808} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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: 1832650745} - toggleTransition: 1 - graphic: {fileID: 1742429696} + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!1 &944916690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 944916693} + - component: {fileID: 944916692} + - component: {fileID: 944916691} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &944916691 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 944916690} + 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.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + 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: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Path +--- !u!222 &944916692 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 944916690} + m_CullTransparentMesh: 0 +--- !u!224 &944916693 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 944916690} + 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: 86914676} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1027187182 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1027187183} + - component: {fileID: 1027187184} + m_Layer: 5 + m_Name: Toggle + m_TagString: Finish + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1027187183 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1027187182} + 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: 1832650744} + - {fileID: 1315799203} + m_Father: {fileID: 2086358230} + 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: -678.71, y: 420.4} + m_SizeDelta: {x: 160, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1027187184 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1027187182} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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: 1832650745} + toggleTransition: 1 + graphic: {fileID: 1742429696} m_Group: {fileID: 0} onValueChanged: m_PersistentCalls: @@ -898,8 +1278,8 @@ RectTransform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045931135} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 302.61368} - m_LocalScale: {x: 0.0963092, y: 0.0963092, z: 0.0963092} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1286592859} - {fileID: 1038202472} @@ -908,7 +1288,7 @@ 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.65319824, y: -3.7209473} + m_AnchoredPosition: {x: 0, y: 50.9} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1045931138 @@ -947,9 +1327,244 @@ CanvasRenderer: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045931135} + m_GameObject: {fileID: 1045931135} + m_CullTransparentMesh: 0 +--- !u!1 &1075752812 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1075752813} + - component: {fileID: 1075752816} + - component: {fileID: 1075752815} + - component: {fileID: 1075752814} + m_Layer: 5 + m_Name: Button (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1075752813 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1075752812} + 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: 1562029929} + m_Father: {fileID: 1209871802} + 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, y: 6.6} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1075752814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1075752812} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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: 1075752815} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 519420030} + m_TargetAssemblyTypeName: MapMaker, Assembly-CSharp + m_MethodName: StartMapMaker + 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 + - m_Target: {fileID: 1751228918} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1209871801} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + 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 &1075752815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1075752812} + 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!222 &1075752816 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1075752812} + m_CullTransparentMesh: 0 +--- !u!1 &1091495242 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1091495243} + - component: {fileID: 1091495245} + - component: {fileID: 1091495244} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1091495243 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1091495242} + 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: 1718697979} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1091495244 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1091495242} + 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.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + 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: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Res2 +--- !u!222 &1091495245 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1091495242} m_CullTransparentMesh: 0 ---- !u!1 &1075752812 +--- !u!1 &1206896260 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -957,44 +1572,44 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1075752813} - - component: {fileID: 1075752816} - - component: {fileID: 1075752815} - - component: {fileID: 1075752814} + - component: {fileID: 1206896261} + - component: {fileID: 1206896264} + - component: {fileID: 1206896263} + - component: {fileID: 1206896262} m_Layer: 5 - m_Name: Button (1) + m_Name: Button (2) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1075752813 +--- !u!224 &1206896261 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1075752812} + m_GameObject: {fileID: 1206896260} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 302.61368} - m_LocalScale: {x: 0.09935486, y: 0.09935486, z: 0.09935486} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 1562029929} + - {fileID: 457321454} m_Father: {fileID: 1209871802} - m_RootOrder: 2 + 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.5533447, y: -8.4210205} + m_AnchoredPosition: {x: 0, y: -68} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1075752814 +--- !u!114 &1206896262 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1075752812} + m_GameObject: {fileID: 1206896260} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} @@ -1027,13 +1642,13 @@ MonoBehaviour: m_SelectedTrigger: Selected m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 1075752815} + m_TargetGraphic: {fileID: 1206896263} m_OnClick: m_PersistentCalls: m_Calls: - m_Target: {fileID: 519420030} m_TargetAssemblyTypeName: MapMaker, Assembly-CSharp - m_MethodName: StartMapMaker + m_MethodName: load m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -1067,13 +1682,13 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 ---- !u!114 &1075752815 +--- !u!114 &1206896263 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1075752812} + m_GameObject: {fileID: 1206896260} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -1097,92 +1712,13 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1075752816 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1075752812} - m_CullTransparentMesh: 0 ---- !u!1 &1091495242 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1091495243} - - component: {fileID: 1091495245} - - component: {fileID: 1091495244} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1091495243 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1091495242} - 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: 1718697979} - 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.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1091495244 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1091495242} - 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.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - 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: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Res2 ---- !u!222 &1091495245 +--- !u!222 &1206896264 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1091495242} + m_GameObject: {fileID: 1206896260} m_CullTransparentMesh: 0 --- !u!1 &1208140745 GameObject: @@ -1287,13 +1823,15 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1209871801} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -956.1467, y: -529.379, z: -302.61368} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: -153, z: 0} + m_LocalScale: {x: 2.6379, y: 2.6379, z: 2.6379} m_Children: - {fileID: 1377457019} - {fileID: 1045931137} - {fileID: 1075752813} - m_Father: {fileID: 423554803} + - {fileID: 1206896261} + - {fileID: 86914676} + m_Father: {fileID: 1381696518} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1286592856 @@ -1544,8 +2082,8 @@ RectTransform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1377457017} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 302.61368} - m_LocalScale: {x: 0.0963092, y: 0.0963092, z: 0.0963092} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 2101634290} - {fileID: 1953802628} @@ -1554,7 +2092,7 @@ 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.8532715, y: 0.27905273} + m_AnchoredPosition: {x: 0, y: 99} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1377457020 @@ -1595,6 +2133,106 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1377457017} m_CullTransparentMesh: 0 +--- !u!1 &1381696514 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1381696518} + - component: {fileID: 1381696517} + - component: {fileID: 1381696516} + - component: {fileID: 1381696515} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1381696515 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381696514} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1381696516 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381696514} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1381696517 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381696514} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1381696518 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381696514} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1209871802} + - {fileID: 2086358230} + m_Father: {fileID: 0} + m_RootOrder: 3 + 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: 0} + m_Pivot: {x: 0, y: 0} --- !u!1 &1559488833 GameObject: m_ObjectHideFlags: 0 @@ -1847,16 +2485,16 @@ RectTransform: m_GameObject: {fileID: 1718697978} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.0963092, y: 0.0963092, z: 0.0963092} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1091495243} - {fileID: 1208140746} - m_Father: {fileID: 1751228919} - m_RootOrder: 2 + m_Father: {fileID: 2086358230} + m_RootOrder: 1 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: -983.6, y: -533.1} + m_AnchoredPosition: {x: -686.68005, y: 362.5} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1718697980 @@ -2058,17 +2696,13 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1751228918} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: 3071512293437574756} - - {fileID: 875360907} - - {fileID: 1718697979} - - {fileID: 1977979288} - - {fileID: 1027187183} m_Father: {fileID: 423554803} - m_RootOrder: 1 + 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} @@ -2258,15 +2892,15 @@ RectTransform: m_GameObject: {fileID: 1977979287} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.09935486, y: 0.09935486, z: 0.09935486} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 656879638} - m_Father: {fileID: 1751228919} - m_RootOrder: 3 + m_Father: {fileID: 2086358230} + 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: -983.3, y: -537.8} + m_AnchoredPosition: {x: -686.9, y: 332.1} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1977979289 @@ -2362,6 +2996,45 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1977979287} m_CullTransparentMesh: 0 +--- !u!1 &2086358229 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2086358230} + m_Layer: 5 + m_Name: SetRes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2086358230 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2086358229} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.7503649, y: 1.7503649, z: 1.7503649} + m_Children: + - {fileID: 875360907} + - {fileID: 1718697979} + - {fileID: 1977979288} + - {fileID: 1027187183} + m_Father: {fileID: 1381696518} + m_RootOrder: 1 + 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: 441, y: -245} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &2101634287 GameObject: m_ObjectHideFlags: 0 @@ -2448,14 +3121,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1751228919} m_Modifications: - - target: {fileID: 1850880820349203026, guid: e41e35146487f2441b776430daa93435, type: 3} - propertyPath: isRes - value: - objectReference: {fileID: 1027187184} - - target: {fileID: 1850880820349203026, guid: e41e35146487f2441b776430daa93435, type: 3} - propertyPath: MapMaker - value: - objectReference: {fileID: 519420030} - target: {fileID: 1850880820349203027, guid: e41e35146487f2441b776430daa93435, type: 3} propertyPath: m_Name value: CellMaker @@ -2510,11 +3175,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3679320382081885893, guid: e41e35146487f2441b776430daa93435, type: 3} propertyPath: m_AnchoredPosition.x - value: -957 + value: 3.2 objectReference: {fileID: 0} - target: {fileID: 3679320382081885893, guid: e41e35146487f2441b776430daa93435, type: 3} propertyPath: m_AnchoredPosition.y - value: -541 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3679320382081885893, guid: e41e35146487f2441b776430daa93435, type: 3} propertyPath: m_SizeDelta.x diff --git a/Assets/Scripts/MapMaker/MapMaker.cs b/Assets/Scripts/MapMaker/MapMaker.cs index d6cdddc..8f6ecec 100644 --- a/Assets/Scripts/MapMaker/MapMaker.cs +++ b/Assets/Scripts/MapMaker/MapMaker.cs @@ -12,8 +12,9 @@ public class MapMaker : MonoBehaviour [SerializeField] private InputField widthInput; [SerializeField] private InputField heightInput; [SerializeField] private Canvas canvas; - private int width; - private int height; + [SerializeField] private InputField path; + private int width; + private int height; [SerializeField] private GameObject cell; [SerializeField] private GameObject res1Prefab; [SerializeField] private GameObject res2Prefab; @@ -109,7 +110,6 @@ void Start() // gameConfigMake.cells_type = cellTypeMake; // string json = JsonUtility.ToJson(gameConfigMake); // Debug.Log(json); - } public void changeCell(int row, int col, int type) @@ -128,14 +128,80 @@ public void setRes(int row, int col, GameObject cell) } catch (Exception e) { + // ignored } - res1[row][col] = res1Amount; - res2[row][col] = res2Amount; + res1[col][row] = res1Amount; + res2[col][row] = res2Amount; cell.GetComponent().res1Text.text = res1Amount.ToString(); cell.GetComponent().res2Text.text = res2Amount.ToString(); } + public void load() + { + string json; + if(path.text == "") + json = File.ReadAllText("map1.json"); + else + json = File.ReadAllText(path.text); + GameConfigMake gameConfigMake = JsonUtility.FromJson(json); + CellTypeMakeJson[] cellTypeMake = gameConfigMake.cells_type; + height = 0; + foreach (CellTypeMakeJson cell in cellTypeMake) + { + if (cell.row + 1 > height) + height = cell.row + 1; + } + + width = 0; + foreach (CellTypeMakeJson cell in cellTypeMake) + { + if (cell.col + 1 > width) + width = cell.col + 1; + } + + foreach (var VARIABLE in Cells) + { + foreach (GameObject gameObject in VARIABLE) + { + Destroy(gameObject); + } + } + + map = new int[height][]; + res1 = new int[height][]; + res2 = new int[height][]; + Cells = new GameObject[height][]; + for (int i = 0; i < height; i++) + { + map[i] = new int[width]; + res1[i] = new int[width]; + res2[i] = new int[width]; + Cells[i] = new GameObject[width]; + for (int j = 0; j < width; j++) + { + CellTypeMakeJson ctm = null; + foreach (CellTypeMakeJson ce in cellTypeMake) + { + if (ce.row == i && ce.col == j) + { + ctm = ce; + break; + } + } + + map[i][j] = ctm.cell_type; + res1[i][j] = ctm.rec1; + res2[i][j] = ctm.rec2; + GameObject cellObj = Instantiate(cell); + cellObj.GetComponent().SetCellTypeMake(j, i, ctm.cell_type, ctm.rec1, ctm.rec2); + cellObj.transform.SetParent(canvas.transform); + cellObj.transform.position = new Vector3(j * 4, -i * 4); + Cells[i][j] = cellObj; + } + } + } + public void ExportMap() { CellTypeMakeJson[] cellTypeMake = new CellTypeMakeJson [width * height]; @@ -143,7 +209,7 @@ public void ExportMap() { for (int j = 0; j < width; j++) { - cellTypeMake[i * width + j] = new CellTypeMakeJson(i,j, map[i][j], res1[i][j], res2[i][j]); + cellTypeMake[i * width + j] = new CellTypeMakeJson(i, j, map[i][j], res1[i][j], res2[i][j]); } } diff --git a/Assets/Scripts/MoveCamera.cs b/Assets/Scripts/MoveCamera.cs index c5e0fa0..05f7096 100644 --- a/Assets/Scripts/MoveCamera.cs +++ b/Assets/Scripts/MoveCamera.cs @@ -1,7 +1,4 @@ -// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement -// for using the mouse displacement for calculating the amount of camera movement and panning code. - -using System; +using System; using UnityEngine; using System.Collections; using UnityEngine.UIElements; @@ -15,6 +12,7 @@ public class MoveCamera : MonoBehaviour [SerializeField] private Camera myCamera; private float lastZoom; private bool IsSet = false; + [SerializeField] private bool crossCameraSize; public void setMaid(int maxX, int maxY) { @@ -39,7 +37,7 @@ void Update() if (myCamera.orthographicSize < 0) { - myCamera.orthographicSize = 0; + myCamera.orthographicSize = 0.1f; } Vector3 pos; @@ -48,25 +46,28 @@ void Update() { pos = Vector3.up; move = new Vector3(-pos.x * ArrowMoveSpeed * Time.deltaTime, -pos.y * ArrowMoveSpeed * Time.deltaTime, 0); - transform.Translate(move, Space.World); + MovingCamera(move); } + if (Input.GetAxis("Vertical") > 0) { pos = Vector3.down; move = new Vector3(-pos.x * ArrowMoveSpeed * Time.deltaTime, -pos.y * ArrowMoveSpeed * Time.deltaTime, 0); - transform.Translate(move, Space.World); + MovingCamera(move); } + if (Input.GetAxis("Horizontal") < 0) { pos = Vector3.right; move = new Vector3(-pos.x * ArrowMoveSpeed * Time.deltaTime, -pos.y * ArrowMoveSpeed * Time.deltaTime, 0); - transform.Translate(move, Space.World); + MovingCamera(move); } + if (Input.GetAxis("Horizontal") > 0) { pos = Vector3.left; move = new Vector3(-pos.x * ArrowMoveSpeed * Time.deltaTime, -pos.y * ArrowMoveSpeed * Time.deltaTime, 0); - transform.Translate(move, Space.World); + MovingCamera(move); } if (Input.GetMouseButtonDown(0)) @@ -80,7 +81,19 @@ void Update() pos = Camera.main.ScreenToViewportPoint(Input.mousePosition - dragOrigin); move = new Vector3(-pos.x * dragSpeed * Time.deltaTime, -pos.y * dragSpeed * Time.deltaTime, 0); - transform.Translate(move, Space.World); + MovingCamera(move); + } + + private void MovingCamera(Vector3 move) + { + if (crossCameraSize) + { + transform.Translate(move * myCamera.orthographicSize, Space.World); + } + else + { + transform.Translate(move, Space.World); + } } public void onScrool()