0.3.1.3
This commit is contained in:
parent
37612b8dbe
commit
108c038858
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3bd0e553275cdf41bb34834813d5658
|
||||
guid: 220707b92d9118b428f678148448058a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
94
Assets/02.Scripts/Tycoon/TycoonGameOver.cs
Normal file
94
Assets/02.Scripts/Tycoon/TycoonGameOver.cs
Normal file
@ -0,0 +1,94 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class TycoonGameOver : MonoBehaviour
|
||||
{
|
||||
// RectTransform을 통해 UI 오브젝트 위치를 제어
|
||||
private RectTransform rectTransform;
|
||||
|
||||
// 흔들림 강도와 범위 설정
|
||||
public float shakeAmount = 0.1f; // 흔들림 강도
|
||||
public float shakeLimit = 10f; // 흔들림 제한
|
||||
|
||||
// 밑으로 이동하는 속도 설정
|
||||
public float fallSpeed = 50f; // UI 좌표에서는 보통 작은 값을 사용
|
||||
|
||||
// 이동 시간을 제어하는 변수들
|
||||
private float shakeDuration = 2.0f; // 흔들리기만 하는 시간
|
||||
private float fallDuration = 5.0f; // 흔들리며 내려가는 시간
|
||||
|
||||
// 흔들림 변화 간격
|
||||
public float shakeInterval = 0.01f; // 흔들림 변화 주기 (뚝뚝 끊기게 만드는 간격)
|
||||
|
||||
// 초기 위치 저장
|
||||
private Vector2 originalPosition;
|
||||
private Vector2 shakeOffset;
|
||||
private float shakeTimer = 0f; // 흔들림 타이머
|
||||
|
||||
void Start()
|
||||
{
|
||||
// RectTransform 가져오기
|
||||
rectTransform = GetComponent<RectTransform>();
|
||||
originalPosition = rectTransform.anchoredPosition;
|
||||
|
||||
// 코루틴 시작
|
||||
StartCoroutine(MoveObject());
|
||||
}
|
||||
|
||||
// 코루틴 정의
|
||||
IEnumerator MoveObject()
|
||||
{
|
||||
// 2.0초 동안은 흔들리기만 함
|
||||
float timer = 0f;
|
||||
while (timer < shakeDuration)
|
||||
{
|
||||
ShakeObject();
|
||||
timer += Time.deltaTime;
|
||||
yield return null; // 다음 프레임까지 대기
|
||||
}
|
||||
|
||||
// 그 후 5.0초 동안은 흔들리며 밑으로 내려감
|
||||
timer = 0f;
|
||||
while (timer < fallDuration)
|
||||
{
|
||||
MoveDown();
|
||||
ShakeObject();
|
||||
timer += Time.deltaTime;
|
||||
yield return null; // 다음 프레임까지 대기
|
||||
}
|
||||
}
|
||||
|
||||
// 흔들림 구현 함수
|
||||
void ShakeObject()
|
||||
{
|
||||
shakeTimer += Time.deltaTime;
|
||||
|
||||
// 흔들림 타이머가 주기보다 크면 새로운 흔들림 값을 생성
|
||||
if (shakeTimer > shakeInterval)
|
||||
{
|
||||
// 새로운 무작위 흔들림 값 생성
|
||||
float offsetX = Random.Range(-shakeLimit, shakeLimit);
|
||||
float offsetY = Random.Range(-shakeLimit, shakeLimit);
|
||||
|
||||
// 새로운 흔들림 값을 저장
|
||||
shakeOffset = new Vector2(offsetX, offsetY);
|
||||
|
||||
// 타이머 초기화
|
||||
shakeTimer = 0f;
|
||||
}
|
||||
|
||||
// 현재 오브젝트의 좌표를 흔들림 값으로 업데이트
|
||||
rectTransform.anchoredPosition = originalPosition + shakeOffset;
|
||||
}
|
||||
|
||||
// 밑으로 내려가는 함수
|
||||
void MoveDown()
|
||||
{
|
||||
// 점점 밑으로 내려가는 부분 (Y 축 감소, anchoredPosition 사용)
|
||||
originalPosition.y -= fallSpeed * Time.deltaTime;
|
||||
|
||||
// 현재 오브젝트 위치도 업데이트
|
||||
rectTransform.anchoredPosition = originalPosition+ shakeOffset;
|
||||
}
|
||||
|
||||
}
|
2
Assets/02.Scripts/Tycoon/TycoonGameOver.cs.meta
Normal file
2
Assets/02.Scripts/Tycoon/TycoonGameOver.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3cd3ae36070b87f43897030288198ece
|
8
Assets/03.Images/Ui/Tycoon/GameOver.meta
Normal file
8
Assets/03.Images/Ui/Tycoon/GameOver.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe956f3b4a0124641b341c6ad3b6226a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Background.png
Normal file
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 MiB |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80bc51f72ddffd44f9f7b10443f5323e
|
||||
guid: 72cbeee7e64220e4797ec9137c6e818f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Bottom.png
Normal file
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 567 KiB |
117
Assets/03.Images/Ui/Tycoon/GameOver/Bottom.png.meta
Normal file
117
Assets/03.Images/Ui/Tycoon/GameOver/Bottom.png.meta
Normal file
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8df32e9f8bdc0034f9f4fe76cee00612
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Ship.png
Normal file
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Ship.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 891 KiB |
117
Assets/03.Images/Ui/Tycoon/GameOver/Ship.png.meta
Normal file
117
Assets/03.Images/Ui/Tycoon/GameOver/Ship.png.meta
Normal file
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 976f9e77302ef0b44928c277d512ddad
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Text.png
Normal file
BIN
Assets/03.Images/Ui/Tycoon/GameOver/Text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 KiB |
117
Assets/03.Images/Ui/Tycoon/GameOver/Text.png.meta
Normal file
117
Assets/03.Images/Ui/Tycoon/GameOver/Text.png.meta
Normal file
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 029718f470538364f90b28022d1bc838
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 MiB |
Loading…
Reference in New Issue
Block a user