From 987050cee35808b67c1f732d53e01f850000aaa1 Mon Sep 17 00:00:00 2001 From: Ino Date: Fri, 19 Sep 2025 05:42:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=B8=EB=8B=88=EA=B2=8C=EC=9E=84=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=20=EC=A4=91...=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/SampleScene.unity | 47 +++++++++++++++++++++++--- Assets/Scripts/Game/Game_Mini.cs | 4 +-- Assets/Scripts/Game/MiniGameObtacle.cs | 9 +++-- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 0232036..18db90e 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -10566,7 +10566,7 @@ BoxCollider2D: drawMode: 0 adaptiveTiling: 0 m_AutoTiling: 0 - m_Size: {x: 1080, y: 50} + m_Size: {x: 800, y: 50} m_EdgeRadius: 0 --- !u!114 &420248623 MonoBehaviour: @@ -12246,6 +12246,41 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 492508385} m_CullTransparentMesh: 1 +--- !u!1 &497965008 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 497965009} + m_Layer: 5 + m_Name: ObjEndPos + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &497965009 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 497965008} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2007599844} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &498762634 GameObject: m_ObjectHideFlags: 0 @@ -15058,7 +15093,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4809904008994882, guid: c105577ec49dfb3408a7a89c3b7730be, type: 3} propertyPath: m_LocalPosition.z - value: 0 + value: -5 objectReference: {fileID: 0} - target: {fileID: 4809904008994882, guid: c105577ec49dfb3408a7a89c3b7730be, type: 3} propertyPath: m_LocalRotation.w @@ -18949,7 +18984,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 0} m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_RaycastPadding: {x: -85.41, y: -39.97, z: 0, w: 9.64} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -33916,7 +33951,7 @@ MonoBehaviour: m_Arguments: m_ObjectArgument: {fileID: 0} m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 + m_IntArgument: 1 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 @@ -33936,7 +33971,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 0} m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_RaycastPadding: {x: -85.41, y: -39.97, z: 0, w: 9.64} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -47626,6 +47661,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 497965009} - {fileID: 1602734863} - {fileID: 78161988} - {fileID: 754949300} @@ -47723,6 +47759,7 @@ MonoBehaviour: - {fileID: 914178569} - {fileID: 903863711} tf_pc: {fileID: 754949300} + tf_objend: {fileID: 497965009} m_Joystick: {fileID: 1165478906} NoDamage: 0 --- !u!1 &2010236531 diff --git a/Assets/Scripts/Game/Game_Mini.cs b/Assets/Scripts/Game/Game_Mini.cs index 11c6f91..7f01e4f 100644 --- a/Assets/Scripts/Game/Game_Mini.cs +++ b/Assets/Scripts/Game/Game_Mini.cs @@ -18,7 +18,7 @@ public class Game_Mini : MonoBehaviour public Transform tf_obtacleParent; public GameObject go_Obtacle; public GameObject[] gos_hiteffect; - public RectTransform tf_pc; + public RectTransform tf_pc, tf_objend; public Joystick m_Joystick; #if UNITY_EDITOR @@ -184,7 +184,7 @@ public class Game_Mini : MonoBehaviour obtacle = DSUtil.Get_Clone(go_Obtacle, tf_obtacleParent); list_MiniGameObtacle.Add(obtacle); } - obtacle.Set(dic_weight); + obtacle.Set(dic_weight, tf_objend); } private void Update() diff --git a/Assets/Scripts/Game/MiniGameObtacle.cs b/Assets/Scripts/Game/MiniGameObtacle.cs index 06d6960..7187a94 100644 --- a/Assets/Scripts/Game/MiniGameObtacle.cs +++ b/Assets/Scripts/Game/MiniGameObtacle.cs @@ -11,14 +11,16 @@ public class MiniGameObtacle : MonoBehaviour public RectTransform m_RectTransform; public Rigidbody2D m_Rigidbody2D; public Image i_img; + public RectTransform tf_objend; eMiniGameObtacleType m_Type; ProtectedInt32 m_Dmg; - public void Set(Dictionary dic_weight) + public void Set(Dictionary dic_weight, RectTransform rtend) { gameObject.SetActive(true); SetRandomTypeByWeight(dic_weight); + tf_objend = rtend; m_Rigidbody2D.gravityScale = Random.Range(table_GlobalValue.Ins.Get_Float("MiniGameSpeedMin"), table_GlobalValue.Ins.Get_Float("MiniGameSpeedMax")); @@ -68,6 +70,9 @@ public class MiniGameObtacle : MonoBehaviour if (m_Type == eMiniGameObtacleType.AlbumOpen || m_Type == eMiniGameObtacleType.ChatCoin || m_Type == eMiniGameObtacleType.GachaCoin) i_img.transform.localScale = Vector3.one * 0.5f; + else + i_img.transform.localScale = Vector3.one; + i_img.transform.eulerAngles = Vector3.zero; m_Dmg.Obfuscate(); void SetRandomTypeByWeight(Dictionary dic_weight) @@ -99,7 +104,7 @@ public class MiniGameObtacle : MonoBehaviour private void Update() { - if (m_RectTransform.anchoredPosition.y < -Screen.height) + if (m_RectTransform.position.y < tf_objend.position.y) { Off(false); }