코인 패널 작업 완료
This commit is contained in:
parent
834f752d70
commit
0797415f9b
@ -51,11 +51,11 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: eea2199565579f74994703cd3b57324b, type: 3}
|
m_Script: {fileID: 11500000, guid: eea2199565579f74994703cd3b57324b, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_coinsRemoveImageObject: {fileID: 0}
|
_coinsRemoveImageObject: {fileID: 4198953742281733827}
|
||||||
_coinsCountText: {fileID: 0}
|
_coinsCountText: {fileID: 2892066450466788586}
|
||||||
_coinsRemoveAudioClip: {fileID: 0}
|
_coinsRemoveAudioClip: {fileID: 8300000, guid: 585a9de0fb7ee4163af5c559ba5b2364, type: 3}
|
||||||
_coinsAddAudioClip: {fileID: 0}
|
_coinsAddAudioClip: {fileID: 8300000, guid: 1ec44182fa76a4b3eb1459c0a6d9a8ab, type: 3}
|
||||||
_coinsEmptyAudioClip: {fileID: 0}
|
_coinsEmptyAudioClip: {fileID: 8300000, guid: 908a78cb991984977bea42916bed8684, type: 3}
|
||||||
--- !u!82 &5499754916380040505
|
--- !u!82 &5499754916380040505
|
||||||
AudioSource:
|
AudioSource:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -164,7 +164,7 @@ GameObject:
|
|||||||
- component: {fileID: 4144968568495096558}
|
- component: {fileID: 4144968568495096558}
|
||||||
- component: {fileID: 6016265620447360569}
|
- component: {fileID: 6016265620447360569}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Heart Remove Image
|
m_Name: Coins Remove Image
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -217,7 +217,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 21300000, guid: f4100b35e05ee5742b84036e3fac9739, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 307bff9630735f342852f28b1cd5d300, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
@ -442,7 +442,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 21300000, guid: f4100b35e05ee5742b84036e3fac9739, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 307bff9630735f342852f28b1cd5d300, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
|
BIN
Assets/Resouces/Coins_ADD_Sound.wav
Normal file
BIN
Assets/Resouces/Coins_ADD_Sound.wav
Normal file
Binary file not shown.
23
Assets/Resouces/Coins_ADD_Sound.wav.meta
Normal file
23
Assets/Resouces/Coins_ADD_Sound.wav.meta
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1ec44182fa76a4b3eb1459c0a6d9a8ab
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 1
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 0
|
||||||
|
compressionFormat: 0
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Resouces/Coins_Empty_Sound.wav
Normal file
BIN
Assets/Resouces/Coins_Empty_Sound.wav
Normal file
Binary file not shown.
23
Assets/Resouces/Coins_Empty_Sound.wav.meta
Normal file
23
Assets/Resouces/Coins_Empty_Sound.wav.meta
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 908a78cb991984977bea42916bed8684
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 1
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 0
|
||||||
|
compressionFormat: 0
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Resouces/Coins_Remove_Sound.wav
Normal file
BIN
Assets/Resouces/Coins_Remove_Sound.wav
Normal file
Binary file not shown.
23
Assets/Resouces/Coins_Remove_Sound.wav.meta
Normal file
23
Assets/Resouces/Coins_Remove_Sound.wav.meta
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 585a9de0fb7ee4163af5c559ba5b2364
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 1
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 0
|
||||||
|
compressionFormat: 0
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -35,7 +35,7 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
_coinsRemoveImageObject.SetActive(false);
|
_coinsRemoveImageObject.SetActive(false);
|
||||||
|
|
||||||
// TODO : 코인 수량 초기화
|
// TODO : 코인 수량 초기화
|
||||||
// InitCoinsCount(<어디선가 가져와야함!>);
|
InitCoinsCount(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -59,12 +59,18 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
if (isAdd)
|
if (isAdd)
|
||||||
{
|
{
|
||||||
var currentHeartCount = _coinsCountText.text;
|
var currentHeartCount = _coinsCountText.text;
|
||||||
_coinsCountText.text = (int.Parse(currentHeartCount) + 1).ToString();
|
_coinsCountText.text = (int.Parse(currentHeartCount) + 100).ToString();
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// 임시
|
||||||
|
_coinsCount += 100;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var currentHeartCount = _coinsCountText.text;
|
var currentHeartCount = _coinsCountText.text;
|
||||||
_coinsCountText.text = (int.Parse(currentHeartCount) - 1).ToString();
|
_coinsCountText.text = (int.Parse(currentHeartCount) - 100).ToString();
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// 임시
|
||||||
|
_coinsCount -= 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Coins Panel의 Width를 글자 수에 따라 변경
|
// Coins Panel의 Width를 글자 수에 따라 변경
|
||||||
@ -85,7 +91,7 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Sequence sequence = DOTween.Sequence();
|
Sequence sequence = DOTween.Sequence();
|
||||||
|
|
||||||
for (int i = 0; i < coinsCount; i++)
|
for (int i = 0; i < coinsCount; i+=100)
|
||||||
{
|
{
|
||||||
sequence.AppendCallback(() =>
|
sequence.AppendCallback(() =>
|
||||||
{
|
{
|
||||||
@ -96,8 +102,8 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 효과음 재생
|
// 효과음 재생
|
||||||
// if (UserInformation.IsPlaySFX)
|
// TODO : if (UserInformation.IsPlaySFX)
|
||||||
// _audioSource.PlayOneShot(_coinsAddAudioClip);
|
_audioSource.PlayOneShot(_coinsAddAudioClip);
|
||||||
});
|
});
|
||||||
sequence.AppendInterval(0.5f);
|
sequence.AppendInterval(0.5f);
|
||||||
}
|
}
|
||||||
@ -106,17 +112,25 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
public void EmptyCoins()
|
public void EmptyCoins()
|
||||||
{
|
{
|
||||||
// 효과음 재생
|
// 효과음 재생
|
||||||
// if (UserInformation.IsPlaySFX)
|
// TODO: if (UserInformation.IsPlaySFX)
|
||||||
// _audioSource.PlayOneShot(_coinsEmptyAudioClip);
|
_audioSource.PlayOneShot(_coinsEmptyAudioClip);
|
||||||
|
|
||||||
GetComponent<RectTransform>().DOPunchPosition(new Vector3(20f, 0, 0), 1f, 7);
|
GetComponent<RectTransform>().DOPunchPosition(new Vector3(20f, 0, 0), 1f, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveCoins(Action action)
|
public void RemoveCoins(Action action)
|
||||||
{
|
{
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// 임시
|
||||||
|
if (_coinsCount < 100)
|
||||||
|
{
|
||||||
|
EmptyCoins();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 효과음 재생
|
// 효과음 재생
|
||||||
// if (UserInformation.IsPlaySFX)
|
// TODO: if (UserInformation.IsPlaySFX)
|
||||||
// _audioSource.PlayOneShot(_coinsRemoveAudioClip);
|
_audioSource.PlayOneShot(_coinsRemoveAudioClip);
|
||||||
|
|
||||||
// 코인 사라지는 연출
|
// 코인 사라지는 연출
|
||||||
_coinsRemoveImageObject.SetActive(true);
|
_coinsRemoveImageObject.SetActive(true);
|
||||||
@ -127,9 +141,9 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
_coinsRemoveImageObject.GetComponent<Image>().DOFade(0f, 1f)
|
_coinsRemoveImageObject.GetComponent<Image>().DOFade(0f, 1f)
|
||||||
.OnComplete( ()=>ChangeTextAnimation(false, ()=>
|
.OnComplete( ()=>ChangeTextAnimation(false, ()=>
|
||||||
{
|
{
|
||||||
// 코인 수량 감소
|
// TODO: 코인 수량 감소
|
||||||
// GameManager.Instance.heartCount--;
|
// GameManager.Instance.heartCount--;
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
})); // 하트 수 텍스트 떨어지는 연출
|
})); // 텍스트 떨어지는 연출
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
Assets/Sprites/DegullMok-Coins.png
Normal file
BIN
Assets/Sprites/DegullMok-Coins.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
140
Assets/Sprites/DegullMok-Coins.png.meta
Normal file
140
Assets/Sprites/DegullMok-Coins.png.meta
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 307bff9630735f342852f28b1cd5d300
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
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: 3
|
||||||
|
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: 3
|
||||||
|
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: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
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: 3
|
||||||
|
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: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user