Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapitak committed Dec 16, 2024
1 parent d2659f1 commit aa14630
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 2 deletions.
172 changes: 172 additions & 0 deletions UnityProject/Assets/Scenes/BathroomMiniGameScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,90 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &157024926
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 157024927}
- component: {fileID: 157024928}
m_Layer: 0
m_Name: left
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &157024927
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157024926}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -118.413376, y: -290.49338, z: -648.00006}
m_LocalScale: {x: 5.9580007, y: 5.9580007, z: 7.200001}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1771960043}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &157024928
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 157024926}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 0.14509805, g: 0.14509805, b: 0.15686275, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &215454055
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -639,6 +723,90 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1094146251
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1094146252}
- component: {fileID: 1094146253}
m_Layer: 0
m_Name: right
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1094146252
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1094146251}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 79.60321, y: -290.42212, z: -648.00006}
m_LocalScale: {x: 4.8227324, y: 5.4342923, z: 7.200001}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1771960043}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1094146253
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1094146251}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 0.14509805, g: 0.14509805, b: 0.15686275, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1549508943
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -858,6 +1026,8 @@ RectTransform:
- {fileID: 215454057}
- {fileID: 942043395}
- {fileID: 1549508947}
- {fileID: 1094146252}
- {fileID: 157024927}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
Expand All @@ -882,6 +1052,8 @@ MonoBehaviour:
pauseBtn: {fileID: 0}
inventoryBtn: {fileID: 0}
line: {fileID: 942043392}
left: {fileID: 157024926}
right: {fileID: 1094146251}
lineRenderer: {fileID: 942043393}
InventorySprite: {fileID: 21300000, guid: ae9af9ca44cefe64cbd87b626549b70a, type: 3}
plumb: {fileID: 759991196}
Expand Down
8 changes: 6 additions & 2 deletions UnityProject/Assets/Scripts/BathroomMiniGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class BathroomMinigame : MonoBehaviour
public GameObject pauseBtn;
public GameObject inventoryBtn;
public GameObject line;
public GameObject left;
public GameObject right;
public SpriteRenderer lineRenderer;
public Sprite InventorySprite;
public GameObject plumb;
Expand Down Expand Up @@ -44,9 +46,11 @@ private void Awake()
(pauseBtn).SetActive(false);
(inventoryBtn).SetActive(false);
Vector3 initialScreenPos = Camera.main.WorldToScreenPoint(cursor.transform.position);
Vector3 initialleft = Camera.main.WorldToScreenPoint(left.transform.position);
Vector3 initialright = Camera.main.WorldToScreenPoint(right.transform.position);
initialScreenX = initialScreenPos.x;
greenSectorStart = initialScreenX + 500f;
greenSectorEnd = greenSectorStart + 226f;
greenSectorStart = initialleft.x;
greenSectorEnd = initialright.x;
}
void Start()

Expand Down

0 comments on commit aa14630

Please sign in to comment.