Compare commits
2 Commits
dec34b0ef3
...
32888a6843
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32888a6843 | ||
|
|
749d72904e |
@@ -17,3 +17,4 @@ MonoBehaviour:
|
||||
- {fileID: 3304458114253143478, guid: 7244cf6c7874ae448bc99d0c26416ad3, type: 3}
|
||||
- {fileID: 458265635552197097, guid: a77d1e8b2fa8aa945a6f39b312536e0d, type: 3}
|
||||
- {fileID: 552225285624929822, guid: e39992796d5459442be9967c77e27066, type: 3}
|
||||
- {fileID: 7644433920135100480, guid: 12d242e44fe80ab44af852254b7cab0f, type: 3}
|
||||
|
||||
@@ -32,6 +32,9 @@ MonoBehaviour:
|
||||
endlessDescenderClampXMin: -3.5
|
||||
endlessDescenderClampXMax: 3.5
|
||||
endlessDescenderSpeedExponent: 0.97
|
||||
interactableLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1024
|
||||
combinationRules:
|
||||
- itemA: {fileID: 11400000, guid: 33e7ca06b22108d4e802486e08bcdfd1, type: 2}
|
||||
itemB: {fileID: 11400000, guid: 8b2616beb14825a46b9b1ed85ad3cb25, type: 2}
|
||||
|
||||
19
Assets/Data/Settings/SceneOrientationConfig.asset
Normal file
19
Assets/Data/Settings/SceneOrientationConfig.asset
Normal file
@@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 46888a96d57e4761a5d16861b5b0a9b1, type: 3}
|
||||
m_Name: SceneOrientationConfig
|
||||
m_EditorClassIdentifier:
|
||||
sceneOrientations:
|
||||
- sceneName: AppleHillsOverworld
|
||||
requiredOrientation: 1
|
||||
- sceneName: Quarry
|
||||
requiredOrientation: 0
|
||||
8
Assets/Data/Settings/SceneOrientationConfig.asset.meta
Normal file
8
Assets/Data/Settings/SceneOrientationConfig.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b21ef7a641efc44894a81133f630a72
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,4 +3,5 @@ https://arongranberg.com/astar/ <- Free version
|
||||
assetstore.unity.com/packages/2d/fonts/fatality-fps-gaming-font-216954 <- for some debug stuff
|
||||
https://craftpix.net/freebies/free-top-down-animals-farm-pixel-art-sprites/ <- placeholder sprites
|
||||
https://bonvicio.itch.io/pixel-art-bonfire
|
||||
https://assetstore.unity.com/packages/tools/physics/optimized-ropes-and-cables-tool-287164
|
||||
https://assetstore.unity.com/packages/tools/physics/optimized-ropes-and-cables-tool-287164
|
||||
https://www.vecteezy.com/vector-art/5380184-phone-rotation-icon-symbol-tilting-screen-flat-design-on-white-background
|
||||
BIN
Assets/External/Placeholders/phone_rotate_icon.png
vendored
Normal file
BIN
Assets/External/Placeholders/phone_rotate_icon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
247
Assets/External/Placeholders/phone_rotate_icon.png.meta
vendored
Normal file
247
Assets/External/Placeholders/phone_rotate_icon.png.meta
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea7e819e86dd94d4cb82c1b22e0eee4b
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -9200460974075412672
|
||||
second: phone_rotate_icon_0
|
||||
- first:
|
||||
213: -2320685753038348737
|
||||
second: phone_rotate_icon_1
|
||||
- first:
|
||||
213: -3973883825926085703
|
||||
second: phone_rotate_icon_2
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
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
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: phone_rotate_icon_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 607
|
||||
height: 783
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 04ff36e7d75615080800000000000000
|
||||
internalID: -9200460974075412672
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: phone_rotate_icon_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 86
|
||||
y: 79
|
||||
width: 1069
|
||||
height: 1151
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: f3ed6d66a944bcfd0800000000000000
|
||||
internalID: -2320685753038348737
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: phone_rotate_icon_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 627
|
||||
y: 526
|
||||
width: 608
|
||||
height: 782
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 9b3610107bde9d8c0800000000000000
|
||||
internalID: -3973883825926085703
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
phone_rotate_icon_0: -9200460974075412672
|
||||
phone_rotate_icon_1: -2320685753038348737
|
||||
phone_rotate_icon_2: -3973883825926085703
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -181,7 +181,7 @@ MonoBehaviour:
|
||||
rotationSpeed: 360
|
||||
slowdownDistance: 3
|
||||
pickNextWaypointDist: 4
|
||||
endReachedDistance: 1
|
||||
endReachedDistance: 0.2
|
||||
alwaysDrawGizmos: 1
|
||||
slowWhenNotFacingTarget: 1
|
||||
whenCloseToDestination: 0
|
||||
|
||||
@@ -13,7 +13,7 @@ GameObject:
|
||||
- component: {fileID: 3070149615425714466}
|
||||
- component: {fileID: 7616859841301711022}
|
||||
- component: {fileID: 592045584872845087}
|
||||
m_Layer: 0
|
||||
m_Layer: 10
|
||||
m_Name: BasePickup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
|
||||
@@ -98,11 +98,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: TestApple
|
||||
value: TestAss
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Size.x
|
||||
|
||||
@@ -13,7 +13,7 @@ GameObject:
|
||||
- component: {fileID: 841695541655102207}
|
||||
- component: {fileID: 4981092805118965486}
|
||||
- component: {fileID: 1397300447834037203}
|
||||
m_Layer: 0
|
||||
m_Layer: 10
|
||||
m_Name: BaseLevelSwitch
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
|
||||
51
Assets/Prefabs/Managers/OrientationEnforcer.prefab
Normal file
51
Assets/Prefabs/Managers/OrientationEnforcer.prefab
Normal file
@@ -0,0 +1,51 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7644433920135100480
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8950196090942657951}
|
||||
- component: {fileID: 8580662658518916835}
|
||||
m_Layer: 0
|
||||
m_Name: OrientationEnforcer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8950196090942657951
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7644433920135100480}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -5.02902, y: -8.20187, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8580662658518916835
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7644433920135100480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5be782e6ff7641519b9bad2e7552d4e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
orientationConfig: {fileID: 0}
|
||||
orientationPromptPrefab: {fileID: 0}
|
||||
OnOrientationCorrect:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
7
Assets/Prefabs/Managers/OrientationEnforcer.prefab.meta
Normal file
7
Assets/Prefabs/Managers/OrientationEnforcer.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12d242e44fe80ab44af852254b7cab0f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1042,6 +1042,107 @@ PrefabInstance:
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1631660124}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
--- !u!1 &1369934763
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1369934767}
|
||||
- component: {fileID: 1369934766}
|
||||
- component: {fileID: 1369934765}
|
||||
- component: {fileID: 1369934764}
|
||||
m_Layer: 5
|
||||
m_Name: RotatePhonePrompt
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1369934764
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1369934763}
|
||||
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 &1369934765
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1369934763}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0.7
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1369934766
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1369934763}
|
||||
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_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1369934767
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1369934763}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!4 &1553825406 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2844046668579196942, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
|
||||
@@ -23468,10 +23569,6 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7393789300602426170, guid: 301b4e0735896334f8f6fb9a68a7e419, type: 3}
|
||||
propertyPath: endReachedDistance
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@@ -23493,3 +23590,4 @@ SceneRoots:
|
||||
- {fileID: 1578994555}
|
||||
- {fileID: 1234715653}
|
||||
- {fileID: 1336824707}
|
||||
- {fileID: 1369934767}
|
||||
|
||||
@@ -440950,7 +440950,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1443463278548606047, guid: e660bbbe18c2a044f9f066822a6fd703, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 0
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4092047856540417737, guid: e660bbbe18c2a044f9f066822a6fd703, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
||||
1002
Assets/Scenes/MainMenu.unity
Normal file
1002
Assets/Scenes/MainMenu.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/MainMenu.unity.meta
Normal file
7
Assets/Scenes/MainMenu.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b93f2f3b39a62684c8474ba79c8f698d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -58,6 +58,7 @@ public class GameManager : MonoBehaviour
|
||||
public float FollowerSpeedMultiplier => gameSettings != null ? gameSettings.followerSpeedMultiplier : 1.2f;
|
||||
public float HeldIconDisplayHeight => gameSettings != null ? gameSettings.heldIconDisplayHeight : 2.0f;
|
||||
public GameObject BasePickupPrefab => gameSettings != null ? gameSettings.basePickupPrefab : null;
|
||||
public LayerMask InteractableLayerMask => gameSettings != null ? gameSettings.interactableLayerMask : -1;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the combination rule for two items, if any.
|
||||
|
||||
@@ -45,6 +45,10 @@ public class GameSettings : ScriptableObject
|
||||
[Tooltip("Exponent for speed drop-off curve (higher = sharper drop near target)")]
|
||||
public float endlessDescenderSpeedExponent = 2.5f;
|
||||
|
||||
[Header("InputManager Settings")]
|
||||
[Tooltip("Layer(s) to use for interactable objects.")]
|
||||
public LayerMask interactableLayerMask = -1; // Default to Everything
|
||||
|
||||
[System.Serializable]
|
||||
public class CombinationRule {
|
||||
public PickupItemData itemA;
|
||||
|
||||
@@ -149,18 +149,29 @@ public class InputManager : MonoBehaviour
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to delegate a tap to an interactable at the given world position.
|
||||
/// Traces on the "Interactable" channel and logs detailed info.
|
||||
/// </summary>
|
||||
private bool TryDelegateToInteractable(Vector2 worldPos)
|
||||
{
|
||||
Collider2D hit = Physics2D.OverlapPoint(worldPos);
|
||||
LayerMask mask = GameManager.Instance != null ? GameManager.Instance.InteractableLayerMask : -1;
|
||||
Collider2D hit = Physics2D.OverlapPoint(worldPos, mask);
|
||||
if (hit != null)
|
||||
{
|
||||
var interactable = hit.GetComponent<ITouchInputConsumer>();
|
||||
if (interactable != null)
|
||||
{
|
||||
Debug.unityLogger.Log("Interactable", $"[InputManager] Delegating tap to interactable at {worldPos} (GameObject: {hit.gameObject.name})");
|
||||
interactable.OnTap(worldPos);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.unityLogger.Log("Interactable", $"[InputManager] Collider2D hit at {worldPos} (GameObject: {hit.gameObject.name}), but no ITouchInputConsumer found.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.unityLogger.Log("Interactable", $"[InputManager] No Collider2D found at {worldPos} for interactable delegation.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
3
Assets/Scripts/Settings.meta
Normal file
3
Assets/Scripts/Settings.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b8016679a814f4ebc03e4f8e59ee0e2
|
||||
timeCreated: 1757316711
|
||||
29
Assets/Scripts/Settings/SceneOrientationConfig.cs
Normal file
29
Assets/Scripts/Settings/SceneOrientationConfig.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Settings
|
||||
{
|
||||
[CreateAssetMenu(fileName = "SceneOrientationConfig", menuName = "Settings/Scene Orientation Config")]
|
||||
public class SceneOrientationConfig : ScriptableObject
|
||||
{
|
||||
[System.Serializable]
|
||||
public class SceneOrientationEntry
|
||||
{
|
||||
public string sceneName;
|
||||
public ScreenOrientationRequirement requiredOrientation;
|
||||
}
|
||||
|
||||
public List<SceneOrientationEntry> sceneOrientations = new List<SceneOrientationEntry>();
|
||||
|
||||
public ScreenOrientationRequirement GetRequirementForScene(string sceneName)
|
||||
{
|
||||
foreach (var entry in sceneOrientations)
|
||||
{
|
||||
if (entry.sceneName == sceneName)
|
||||
return entry.requiredOrientation;
|
||||
}
|
||||
// Default to Portrait if not found
|
||||
return ScreenOrientationRequirement.Portrait;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Settings/SceneOrientationConfig.cs.meta
Normal file
3
Assets/Scripts/Settings/SceneOrientationConfig.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46888a96d57e4761a5d16861b5b0a9b1
|
||||
timeCreated: 1757316711
|
||||
9
Assets/Scripts/Settings/ScreenOrientationRequirement.cs
Normal file
9
Assets/Scripts/Settings/ScreenOrientationRequirement.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Settings
|
||||
{
|
||||
public enum ScreenOrientationRequirement
|
||||
{
|
||||
Portrait,
|
||||
Landscape
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1a3b10d13874397abfc29e36c1633ef
|
||||
timeCreated: 1757316711
|
||||
8
Assets/Scripts/UI.meta
Normal file
8
Assets/Scripts/UI.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 364c78baf25bd6a49a93580fc0384138
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/Scripts/UI/MainMenu.cs
Normal file
19
Assets/Scripts/UI/MainMenu.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MainMenu : MonoBehaviour
|
||||
{
|
||||
public void StartGame()
|
||||
{
|
||||
// Replace with the actual scene name as set in Build Settings
|
||||
SceneManager.LoadScene("AppleHillsOverworld");
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/MainMenu.cs.meta
Normal file
2
Assets/Scripts/UI/MainMenu.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1db41e23e1963544989e5298f201e730
|
||||
3
Assets/Scripts/Utility.meta
Normal file
3
Assets/Scripts/Utility.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91906734c1e6462b86642f3b19844694
|
||||
timeCreated: 1757316712
|
||||
114
Assets/Scripts/Utility/SceneOrientationEnforcer.cs
Normal file
114
Assets/Scripts/Utility/SceneOrientationEnforcer.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using System;
|
||||
using Settings;
|
||||
|
||||
namespace Utility
|
||||
{
|
||||
public class SceneOrientationEnforcer : MonoBehaviour
|
||||
{
|
||||
private static SceneOrientationEnforcer _instance;
|
||||
private static bool _isQuitting;
|
||||
public static SceneOrientationEnforcer Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<SceneOrientationEnforcer>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("SceneOrientationEnforcer");
|
||||
_instance = go.AddComponent<SceneOrientationEnforcer>();
|
||||
// DontDestroyOnLoad(go); // Uncomment if you want persistence
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
[Header("Config")]
|
||||
public SceneOrientationConfig orientationConfig;
|
||||
public GameObject orientationPromptPrefab;
|
||||
|
||||
public event Action OnOrientationCorrect;
|
||||
|
||||
private GameObject promptInstance;
|
||||
private ScreenOrientationRequirement requiredOrientation;
|
||||
private bool orientationCorrect;
|
||||
private Coroutine orientationCheckCoroutine;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
OnOrientationCorrect += HandleOrientationCorrect;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
string sceneName = SceneManager.GetActiveScene().name;
|
||||
requiredOrientation = orientationConfig != null ? orientationConfig.GetRequirementForScene(sceneName) : ScreenOrientationRequirement.Portrait;
|
||||
orientationCorrect = IsOrientationCorrect();
|
||||
if (!orientationCorrect)
|
||||
{
|
||||
ShowPrompt();
|
||||
orientationCheckCoroutine = StartCoroutine(OrientationCheckRoutine());
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsOrientationCorrect()
|
||||
{
|
||||
switch (requiredOrientation)
|
||||
{
|
||||
case ScreenOrientationRequirement.Portrait:
|
||||
return Screen.height >= Screen.width;
|
||||
case ScreenOrientationRequirement.Landscape:
|
||||
return Screen.width > Screen.height;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator OrientationCheckRoutine()
|
||||
{
|
||||
while (!IsOrientationCorrect())
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
orientationCorrect = true;
|
||||
OnOrientationCorrect?.Invoke();
|
||||
}
|
||||
|
||||
private void ShowPrompt()
|
||||
{
|
||||
if (orientationPromptPrefab != null && promptInstance == null)
|
||||
{
|
||||
promptInstance = Instantiate(orientationPromptPrefab);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleOrientationCorrect()
|
||||
{
|
||||
if (promptInstance != null)
|
||||
{
|
||||
Destroy(promptInstance);
|
||||
promptInstance = null;
|
||||
}
|
||||
if (orientationCheckCoroutine != null)
|
||||
{
|
||||
StopCoroutine(orientationCheckCoroutine);
|
||||
orientationCheckCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
OnOrientationCorrect -= HandleOrientationCorrect;
|
||||
}
|
||||
|
||||
void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Utility/SceneOrientationEnforcer.cs.meta
Normal file
3
Assets/Scripts/Utility/SceneOrientationEnforcer.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5be782e6ff7641519b9bad2e7552d4e8
|
||||
timeCreated: 1757316712
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
"com.unity.addressables.android": "1.0.6",
|
||||
"com.unity.cinemachine": "3.1.4",
|
||||
"com.unity.feature.2d": "2.0.1",
|
||||
"com.unity.ide.rider": "3.0.36",
|
||||
"com.unity.ide.rider": "3.0.37",
|
||||
"com.unity.inputsystem": "1.14.2",
|
||||
"com.unity.multiplayer.center": "1.0.0",
|
||||
"com.unity.render-pipelines.universal": "17.1.0",
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
}
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.36",
|
||||
"version": "3.0.37",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user