미니게임 작업 중... 2
This commit is contained in:
parent
76604e5334
commit
987050cee3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<MiniGameObtacle>(go_Obtacle, tf_obtacleParent);
|
||||
list_MiniGameObtacle.Add(obtacle);
|
||||
}
|
||||
obtacle.Set(dic_weight);
|
||||
obtacle.Set(dic_weight, tf_objend);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
|||
|
|
@ -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<eMiniGameObtacleType, int> dic_weight)
|
||||
public void Set(Dictionary<eMiniGameObtacleType, int> 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<eMiniGameObtacleType, int> 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue