미니 게임 방해물 세팅
This commit is contained in:
parent
1d69ae2f81
commit
afbea3a298
|
|
@ -0,0 +1,158 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6448229895534547540
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7551506542390865336}
|
||||
- component: {fileID: 3796235301141747270}
|
||||
- component: {fileID: 7983161183767018483}
|
||||
- component: {fileID: 4999278125974513358}
|
||||
- component: {fileID: 4713341926392384895}
|
||||
- component: {fileID: 3907185225494642013}
|
||||
m_Layer: 5
|
||||
m_Name: MiniGameObtacle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7551506542390865336
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6448229895534547540}
|
||||
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: 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: 50, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3796235301141747270
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6448229895534547540}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 878143d44e45aed48a1044db746ee56e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RectTransform: {fileID: 7551506542390865336}
|
||||
m_Rigidbody2D: {fileID: 4713341926392384895}
|
||||
i_img: {fileID: 4999278125974513358}
|
||||
--- !u!222 &7983161183767018483
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6448229895534547540}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4999278125974513358
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6448229895534547540}
|
||||
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: 511a3d63bb91c5147a49d252b69daf99, 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!50 &4713341926392384895
|
||||
Rigidbody2D:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6448229895534547540}
|
||||
m_BodyType: 0
|
||||
m_Simulated: 1
|
||||
m_UseFullKinematicContacts: 0
|
||||
m_UseAutoMass: 0
|
||||
m_Mass: 1
|
||||
m_LinearDamping: 0
|
||||
m_AngularDamping: 0.05
|
||||
m_GravityScale: 0.2
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_Interpolate: 0
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!58 &3907185225494642013
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6448229895534547540}
|
||||
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: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Radius: 25
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a0adfcf60f0fee042ac623f3116ef254
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1 +1 @@
|
|||
[{"s_ID": "LuckyPoint", "n_Value": "100", "exception": "럭키 포인트 100% 필요량"}, {"s_ID": "LuckyBlockWithdMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (가로)"}, {"s_ID": "LuckyBlockWithdMax", "n_Value": "251", "exception": "럭키 블록 최대 크기 (가로)"}, {"s_ID": "LuckyBlockHeightMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (세로)"}, {"s_ID": "LuckyBlockHeightMax", "n_Value": "100", "exception": "럭키 블록 최대 크기 (세로)"}, {"s_ID": "LuckyBlockSpeedMin", "n_Value": "150", "exception": "럭키 블록 최소 스피드"}, {"s_ID": "LuckyBlockSpeedMax", "n_Value": "250", "exception": "럭키 블록 최대 스피드"}, {"s_ID": "GachaAmount", "n_Value": "5", "exception": "가챠에 필요한 가챠 코인 개수"}, {"s_ID": "GachaAD_Reward", "n_Value": "5", "exception": "가챠 광고 가챠 코인 보상 개수"}, {"s_ID": "ADSec_Gacha", "n_Value": "600", "exception": "가챠 광고 시간 (초)"}, {"s_ID": "ADSec_Shop", "n_Value": "600", "exception": "상점 광고 시간 (초)"}, {"s_ID": "MiniGameHP", "n_Value": "10", "exception": "미니 게임 HP"}]
|
||||
[{"s_ID": "LuckyPoint", "n_Value": "100", "exception": "럭키 포인트 100% 필요량"}, {"s_ID": "LuckyBlockWithdMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (가로)"}, {"s_ID": "LuckyBlockWithdMax", "n_Value": "251", "exception": "럭키 블록 최대 크기 (가로)"}, {"s_ID": "LuckyBlockHeightMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (세로)"}, {"s_ID": "LuckyBlockHeightMax", "n_Value": "100", "exception": "럭키 블록 최대 크기 (세로)"}, {"s_ID": "LuckyBlockSpeedMin", "n_Value": "150", "exception": "럭키 블록 최소 스피드"}, {"s_ID": "LuckyBlockSpeedMax", "n_Value": "250", "exception": "럭키 블록 최대 스피드"}, {"s_ID": "GachaAmount", "n_Value": "5", "exception": "가챠에 필요한 가챠 코인 개수"}, {"s_ID": "GachaAD_Reward", "n_Value": "5", "exception": "가챠 광고 가챠 코인 보상 개수"}, {"s_ID": "ADSec_Gacha", "n_Value": "600", "exception": "가챠 광고 시간 (초)"}, {"s_ID": "ADSec_Shop", "n_Value": "600", "exception": "상점 광고 시간 (초)"}, {"s_ID": "MiniGameHP", "n_Value": "10", "exception": "미니 게임 HP"}, {"s_ID": "MiniGameSpeedMin", "n_Value": "0.2", "exception": "미니 게임 방해물 최소 속도"}, {"s_ID": "MiniGameSpeedMax", "n_Value": "1", "exception": "미니 게임 방해물 최대 속도"}, {"s_ID": "MiniGameWeight_White", "n_Value": "100", "exception": "미니 게임 흰 액체 등장 확률"}, {"s_ID": "MiniGameWeight_Red", "n_Value": "50", "exception": "미니 게임 빨간 액체 등장 확률"}, {"s_ID": "MiniGameWeight_AlbumOpen", "n_Value": "5", "exception": "미니 게임 앨범 오픈 재화 등장 확률"}, {"s_ID": "MiniGameWeight_ChatCoin", "n_Value": "5", "exception": "미니 게임 채팅 코인 등장 확률"}, {"s_ID": "MiniGameWeight_GachaCoin", "n_Value": "5", "exception": "미니 게임 가챠 코인 등장 확률"}, {"s_ID": "MiniGameWeight_HpHeal", "n_Value": "5", "exception": "미니 게임 체력 회복 등장 확률"}]
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
|
|
@ -0,0 +1,155 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 511a3d63bb91c5147a49d252b69daf99
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -9018148900744180236
|
||||
second: whitecircle_0
|
||||
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: 1
|
||||
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: 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: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: whitecircle_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 91
|
||||
height: 91
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 4fd409fda5919d280800000000000000
|
||||
internalID: -9018148900744180236
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -13901,9 +13901,10 @@ GameObject:
|
|||
- component: {fileID: 754949300}
|
||||
- component: {fileID: 754949302}
|
||||
- component: {fileID: 754949301}
|
||||
- component: {fileID: 754949303}
|
||||
m_Layer: 5
|
||||
m_Name: character
|
||||
m_TagString: Untagged
|
||||
m_TagString: Player
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
@ -13965,6 +13966,43 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 754949299}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!70 &754949303
|
||||
CapsuleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 754949299}
|
||||
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: -2.9432914, y: -2.14056}
|
||||
m_Size: {x: 111.87622, y: 191.61253}
|
||||
m_Direction: 0
|
||||
--- !u!1 &768345792
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -23039,6 +23077,41 @@ MonoBehaviour:
|
|||
t_goods: {fileID: 1077473718}
|
||||
t_price: {fileID: 1650672106}
|
||||
go_BuyComplete: {fileID: 1203914738}
|
||||
--- !u!1 &1246693589
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1246693590}
|
||||
m_Layer: 5
|
||||
m_Name: ObtaclePos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1246693590
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1246693589}
|
||||
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, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -25}
|
||||
m_SizeDelta: {x: 0, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1250211778
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -36509,6 +36582,7 @@ RectTransform:
|
|||
- {fileID: 78161988}
|
||||
- {fileID: 352843715}
|
||||
- {fileID: 754949300}
|
||||
- {fileID: 1246693590}
|
||||
- {fileID: 707889050}
|
||||
m_Father: {fileID: 48693080}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -36536,6 +36610,8 @@ MonoBehaviour:
|
|||
- {fileID: 1256458700}
|
||||
- {fileID: 1439057740}
|
||||
slider_hp: {fileID: 1865564609}
|
||||
tf_obtacleParent: {fileID: 1246693590}
|
||||
go_Obtacle: {fileID: 6448229895534547540, guid: a0adfcf60f0fee042ac623f3116ef254, type: 3}
|
||||
--- !u!1 &2010236531
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using GUPS.AntiCheat.Protected;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.UI;
|
||||
|
|
@ -9,13 +10,28 @@ public class Game_Mini : MonoBehaviour
|
|||
public Image i_girl, i_girlsd;
|
||||
public MiniGameItemCard[] items;
|
||||
public Slider slider_hp;
|
||||
public Transform tf_obtacleParent;
|
||||
public GameObject go_Obtacle;
|
||||
|
||||
// 1 평소, 2 맞았을 때
|
||||
AsyncOperationHandle<Sprite> m_Handle1, m_Handle2, m_HandleSD;
|
||||
ProtectedInt32 m_HP;
|
||||
|
||||
Dictionary<eMiniGameObtacleType, int> dic_weight = new Dictionary<eMiniGameObtacleType, int>();
|
||||
List<MiniGameObtacle> list_MiniGameObtacle = new List<MiniGameObtacle>();
|
||||
|
||||
public void Set()
|
||||
{
|
||||
if (dic_weight.Count == 0)
|
||||
{
|
||||
dic_weight.Add(eMiniGameObtacleType.White, table_GlobalValue.Ins.Get_Int("MiniGameWeight_White"));
|
||||
dic_weight.Add(eMiniGameObtacleType.Red, table_GlobalValue.Ins.Get_Int("MiniGameWeight_Red"));
|
||||
dic_weight.Add(eMiniGameObtacleType.AlbumOpen, table_GlobalValue.Ins.Get_Int("MiniGameWeight_AlbumOpen"));
|
||||
dic_weight.Add(eMiniGameObtacleType.ChatCoin, table_GlobalValue.Ins.Get_Int("MiniGameWeight_ChatCoin"));
|
||||
dic_weight.Add(eMiniGameObtacleType.GachaCoin, table_GlobalValue.Ins.Get_Int("MiniGameWeight_GachaCoin"));
|
||||
dic_weight.Add(eMiniGameObtacleType.HpHeal, table_GlobalValue.Ins.Get_Int("MiniGameWeight_HpHeal"));
|
||||
}
|
||||
|
||||
gameObject.SetActive(true);
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
items[i].Set();
|
||||
|
|
@ -43,9 +59,41 @@ public class Game_Mini : MonoBehaviour
|
|||
slider_hp.value = 1f;
|
||||
m_HP = table_GlobalValue.Ins.Get_Int("MiniGameHP");
|
||||
m_HP.Obfuscate();
|
||||
|
||||
StartCoroutine(Co_Update());
|
||||
}
|
||||
|
||||
public void Hit() { StopAllCoroutines(); StartCoroutine(Co_Hit()); }
|
||||
IEnumerator Co_Update()
|
||||
{
|
||||
yield return new WaitForSeconds(3f);
|
||||
|
||||
float gap = 0.5f;
|
||||
list_MiniGameObtacle.ForEach(f => f.gameObject.SetActive(false));
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (m_HP <= 0) break;
|
||||
|
||||
var obtacle = list_MiniGameObtacle.Find(f => !f.gameObject.activeInHierarchy);
|
||||
if (obtacle == null)
|
||||
{
|
||||
obtacle = DSUtil.Get_Clone<MiniGameObtacle>(go_Obtacle, tf_obtacleParent);
|
||||
list_MiniGameObtacle.Add(obtacle);
|
||||
}
|
||||
obtacle.Set(dic_weight);
|
||||
|
||||
yield return new WaitForSeconds(gap);
|
||||
gap -= Time.deltaTime;
|
||||
if (gap < 0.1f) gap = 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
Coroutine cohit;
|
||||
public void Hit()
|
||||
{
|
||||
if (cohit != null) StopCoroutine(cohit);
|
||||
cohit = StartCoroutine(Co_Hit());
|
||||
}
|
||||
IEnumerator Co_Hit()
|
||||
{
|
||||
--m_HP;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
using GUPS.AntiCheat.Protected;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public enum eMiniGameObtacleType { White, Red, AlbumOpen, ChatCoin, GachaCoin, HpHeal }
|
||||
|
||||
public class MiniGameObtacle : MonoBehaviour
|
||||
{
|
||||
public RectTransform m_RectTransform;
|
||||
public Rigidbody2D m_Rigidbody2D;
|
||||
public Image i_img;
|
||||
|
||||
eMiniGameObtacleType m_Type;
|
||||
ProtectedInt32 m_Dmg;
|
||||
|
||||
public void Set(Dictionary<eMiniGameObtacleType, int> dic_weight)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
SetRandomTypeByWeight(dic_weight);
|
||||
m_Dmg = m_Type == eMiniGameObtacleType.Red ? 2 : 1;
|
||||
m_Rigidbody2D.gravityScale = Random.Range(table_GlobalValue.Ins.Get_Float("MiniGameSpeedMin"),
|
||||
table_GlobalValue.Ins.Get_Float("MiniGameSpeedMax"));
|
||||
|
||||
var x = (Screen.width >> 1) - 50;
|
||||
m_RectTransform.anchoredPosition = new Vector2(Random.Range(-x, x), 0f);
|
||||
|
||||
i_img.color = Color.white;
|
||||
switch (m_Type)
|
||||
{
|
||||
case eMiniGameObtacleType.White:
|
||||
i_img.sprite = UIAtlasMgr.Ins.Get_Sprite("whitecircle");
|
||||
break;
|
||||
case eMiniGameObtacleType.Red:
|
||||
i_img.sprite = UIAtlasMgr.Ins.Get_Sprite("whitecircle");
|
||||
i_img.color = Color.red;
|
||||
break;
|
||||
case eMiniGameObtacleType.AlbumOpen:
|
||||
i_img.sprite = UIAtlasMgr.Ins.Get_Sprite(eMoney.AlbumOpen);
|
||||
break;
|
||||
case eMiniGameObtacleType.ChatCoin:
|
||||
i_img.sprite = UIAtlasMgr.Ins.Get_Sprite(eMoney.Chat);
|
||||
break;
|
||||
case eMiniGameObtacleType.GachaCoin:
|
||||
i_img.sprite = UIAtlasMgr.Ins.Get_Sprite(eMoney.Gacha);
|
||||
break;
|
||||
case eMiniGameObtacleType.HpHeal:
|
||||
i_img.sprite = UIAtlasMgr.Ins.Get_Sprite("hp");
|
||||
break;
|
||||
}
|
||||
|
||||
void SetRandomTypeByWeight(Dictionary<eMiniGameObtacleType, int> dic_weight)
|
||||
{
|
||||
// 총합
|
||||
int totalWeight = dic_weight.Values.Sum();
|
||||
if (totalWeight <= 0)
|
||||
{
|
||||
Debug.LogWarning("가중치 총합이 0 이하입니다. 기본값으로 White 선택.");
|
||||
m_Type = eMiniGameObtacleType.White;
|
||||
return;
|
||||
}
|
||||
|
||||
// 랜덤 뽑기
|
||||
int rand = Random.Range(0, totalWeight);
|
||||
int cumulative = 0;
|
||||
|
||||
foreach (var pair in dic_weight)
|
||||
{
|
||||
cumulative += pair.Value;
|
||||
if (rand < cumulative)
|
||||
{
|
||||
m_Type = pair.Key;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (m_RectTransform.anchoredPosition.y < -Screen.height)
|
||||
{
|
||||
Off();
|
||||
}
|
||||
}
|
||||
|
||||
void Off()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
if (collision.tag.Equals("Player"))
|
||||
{
|
||||
Off();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 878143d44e45aed48a1044db746ee56e
|
||||
Loading…
Reference in New Issue