럭키 게임 일단락, 일부 버그 수정

This commit is contained in:
Ino 2025-09-13 09:22:48 +09:00
parent 382007047e
commit f8f6f95c7e
8 changed files with 1587 additions and 331 deletions

View File

@ -0,0 +1,326 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3660481320925993394
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2384313464022318936}
- component: {fileID: 6305766621231215774}
- component: {fileID: 3477444599677085151}
m_Layer: 5
m_Name: t_value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2384313464022318936
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3660481320925993394}
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: 2454745031453221229}
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: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6305766621231215774
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3660481320925993394}
m_CullTransparentMesh: 1
--- !u!114 &3477444599677085151
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3660481320925993394}
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: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: +0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3055b5c28f94e6c4ea6b9a379bb315a5, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: f0e824099790d3445af94a5b86b5cc4a, 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: 50
m_fontSizeBase: 50
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 25
m_fontSizeMax: 100
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 4096
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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: 0
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!1 &5076376233050697095
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8729742757740202176}
- component: {fileID: 7371644771306818119}
- component: {fileID: 3404941236702017507}
m_Layer: 5
m_Name: block
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8729742757740202176
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5076376233050697095}
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: 2454745031453221229}
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!222 &7371644771306818119
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5076376233050697095}
m_CullTransparentMesh: 1
--- !u!114 &3404941236702017507
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5076376233050697095}
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: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b0a7567624709ee45872c0e655845f2d, 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!1 &5507361601909063842
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2454745031453221229}
- component: {fileID: 1233985638064132727}
- component: {fileID: 8397187939073256901}
- component: {fileID: 5921619950101286240}
m_Layer: 5
m_Name: LuckyRandomBlock
m_TagString: RandomBlock
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2454745031453221229
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5507361601909063842}
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:
- {fileID: 8729742757740202176}
- {fileID: 2384313464022318936}
m_Father: {fileID: 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: 0}
m_SizeDelta: {x: 122.2, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1233985638064132727
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5507361601909063842}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f64d4b082a41a9e42804e2ddfb768398, type: 3}
m_Name:
m_EditorClassIdentifier:
m_rt: {fileID: 2454745031453221229}
i_bg: {fileID: 3404941236702017507}
t_value: {fileID: 3477444599677085151}
--- !u!61 &8397187939073256901
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5507361601909063842}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 1
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 122.2, y: 100}
m_EdgeRadius: 0
--- !u!114 &5921619950101286240
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5507361601909063842}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 970655c7570620b4b81080ce46bbd866, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 35b33271aa1bd5e479b44d19341bd5b4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -23,7 +23,6 @@ public class ShowPanel : MonoBehaviour
gameObject.SetActive(true);
go_btns.SetActive(true);
if (m_Handle.IsValid()) Addressables.Release(m_Handle);
i_image.enabled = false;
AddrResourceMgr.Ins.LoadObject<Sprite>((data as ShowAlbumBase).s_Image, handle =>
{
@ -45,7 +44,8 @@ public class ShowPanel : MonoBehaviour
{
case 0: // 나가기
gameObject.SetActive(false);
if (m_Handle.IsValid()) Addressables.Release(m_Handle);
AddrResourceMgr.Ins.Relese(m_Handle);
i_image.sprite = null;
Camera.main.orthographicSize = original_orthographicSize;
act_Close();
break;

File diff suppressed because it is too large Load Diff

View File

@ -47,4 +47,13 @@ public class AddrResourceMgr : MonoBehaviourSingletonTemplate<AddrResourceMgr>
// 필요하다면 해제는 여기서
// Addressables.Release(handle);
}
public void Relese(AsyncOperationHandle handle)
{
if (handle.IsValid())
{
Addressables.Release(handle);
handle = default; // 핸들 초기화
}
}
}

View File

@ -2,6 +2,7 @@ using GUPS.AntiCheat.Protected;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
public class Game_Lucky : MonoBehaviour
@ -12,14 +13,14 @@ public class Game_Lucky : MonoBehaviour
public Transform tf_cupin; // 컵 안 (공들이 들어가는 위치 부모)
List<GameObject> list_dropobj = new List<GameObject>();
public LuckyRandomBlock temp;
public List<LuckyRandomBlock> list_randomblock;
// 회전 관련 변수
private bool isRotating = false;
private float targetZ = 0f;
private float rotateSpeed = 150f; // 초당 몇 도 회전할지
bool bRotCup = false;
bool bRotCup = false, updateTime = false;
ProtectedFloat m_Time;
ProtectedInt32 _get; public int m_Amount { get { return _get; } set { _get = value; _get.Obfuscate(); } }
ProtectedInt32 _bb; public int m_BubbleAmount { get { return _bb; } set { _bb = value; _bb.Obfuscate(); } }
@ -47,7 +48,7 @@ public class Game_Lucky : MonoBehaviour
}
}
temp.Set();
StartCoroutine(Co_Block());
Set_Ball();
Init_game();
@ -62,7 +63,7 @@ public class Game_Lucky : MonoBehaviour
void Init_game()
{
Time.timeScale = 1f;
updateTime = true;
m_Time = 30f; m_Time.Obfuscate();
m_Amount = 0;
m_BubbleAmount = 0;
@ -91,10 +92,12 @@ public class Game_Lucky : MonoBehaviour
IEnumerator Co_GameOver()
{
updateTime = false;
list_dropobj.ForEach(f => f.GetComponent<LuckyGameObj>().StopObj());
yield return new WaitForSecondsRealtime(3f);
// TODO : 결과 보여주기 (결과 화면 나갈 때, Time.timeScale = 1f; 필수)
// TODO : 결과 보여주기
gameObject.SetActive(false); // 지금은 그냥 나가기
StopAllCoroutines();
}
Vector3 Get_CupInLocalPos()
@ -161,13 +164,32 @@ public class Game_Lucky : MonoBehaviour
}
}
if (m_Time > 0f)
if (updateTime && m_Time > 0f)
{
m_Time -= Time.deltaTime;
Debug.Log(m_Time);
Set_Texts();
if (m_Time <= 0f)
GameOver();
}
}
IEnumerator Co_Block()
{
list_randomblock.ForEach(f => f.Init());
LuckyRandomBlock PreBlock = null;
while (true)
{
for (int i = 0; i < list_randomblock.Count; i++)
{
if (!list_randomblock[i].IsMoving() && (PreBlock == null || PreBlock.IsCrossCenter()))
{
PreBlock = list_randomblock[i];
PreBlock.Move();
}
}
yield return null;
}
}
}

View File

@ -1,6 +1,7 @@
using GUPS.AntiCheat.Protected;
using GUPS.AntiCheat.Protected.Collection;
using System;
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@ -10,16 +11,17 @@ public enum eRandomBlock { Minus, Plus, Multiplier, Divide }
public class LuckyRandomBlock : MonoBehaviour
{
public RectTransform m_rt;
public Image i_bg;
public TextMeshProUGUI t_value;
eRandomBlock m_BlockType;
ProtectedInt32 m_Value;
float MoveSpeed;
bool isMoving;
ProtectedList<Int32> list_value = new ProtectedList<Int32> { 1, 2, 3, 4, 5 };
public void Set()
public void Init()
{
// BlockType 랜덤 (Enum 전체 범위에서 선택)
int typeCount = Enum.GetValues(typeof(eRandomBlock)).Length;
@ -37,9 +39,33 @@ public class LuckyRandomBlock : MonoBehaviour
case eRandomBlock.Divide: t_value.text = $"/{m_Value}"; i_bg.color = Color.grey; break;
}
MoveSpeed = Random.Range(2f, 5f);
m_rt.sizeDelta = new Vector2(Random.Range(100, 200), m_rt.sizeDelta.y);
isMoving = false;
}
public void Move()
{
StartCoroutine(Co_Move());
}
IEnumerator Co_Move()
{
isMoving = true;
var MoveSpeed = Random.Range(75f, 150f);
m_rt.anchoredPosition = new Vector3(300f, 0f);
while (transform.localPosition.x > -1300)
{
yield return null;
m_rt.anchoredPosition = new Vector3(m_rt.anchoredPosition.x - MoveSpeed * Time.deltaTime, 0f);
}
Init();
}
public bool IsMoving() { return isMoving; }
public bool IsCrossCenter() { return m_rt.anchoredPosition.x <= -(Screen.width >> 1); }
public int Get_Value(int amount)
{
switch (m_BlockType)

View File

@ -19,7 +19,7 @@ public class AlbumCard : CardBase
base.Set(_base, iLoop, idata);
m_Data = _base as albumtabledata;
if (m_Handle.IsValid()) Addressables.Release(m_Handle);
AddrResourceMgr.Ins.Relese(m_Handle);
gos[0].SetActive(m_Data.n_Index == SaveMgr.Ins.Get_UnLockIndex() + 1);