[Update] 게임형식 및 오류수정
1. 게임형태 변경 - Game스텝에서 기존 1단계, 2단계 수정(회전만 가능하게). - ShootButton을 만들어 플레이어도 총알을 쏠수 있도록 수정. - Bullet, BulletSpawner, PlayerController를 수정 - SpawnZone을 생성하여 기존 고정이던 스포너를 랜덤으로 생성. 2. 오류 수정 - 모바일 버전 시 플레이어가 한방향만 보던 형상 수정. - 펜스에서 플레이어 캐릭터가 닿으면 회전하던 형상 수정.
This commit is contained in:
+1
-3
@@ -33,7 +33,7 @@ Transform:
|
||||
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 15, y: 15, z: 15}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -108,8 +108,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Bullet
|
||||
speed: 8
|
||||
effect: {fileID: 2433282508537954060, guid: 3ef3ae421f71c5c4e97fe12dc2fc6312, type: 3}
|
||||
audioSource: {fileID: 0}
|
||||
clip: {fileID: 8300000, guid: 5c7b6d4002009e842bd2621585546d19, type: 3}
|
||||
--- !u!82 &-4140456380393619884
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c76b2be243135eb41bd6b876db0011b6
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
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
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
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:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7819f6eba9c7bff499871a8f33d9e0ed
|
||||
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: 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
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
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.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef76ea32f32af454fbdef8631e9a37c5
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
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
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
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:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,211 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2120466481984335114
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1694098956196228282}
|
||||
m_Layer: 9
|
||||
m_Name: FirePoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1694098956196228282
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2120466481984335114}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -0.06, z: 0.1737}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2096590804284731245}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &5186700973467465567
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 483227593400030367, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 695530592764560454, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1323006897854398973, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3198881905586908258, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3354079399026712615, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3869735284848402988, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5598847031641045358, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5884405469530735240, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Revolver_LP_1 Variant
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5884405469530735240, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5884405469530735240, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_TagString
|
||||
value: Spawner
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -9.65
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7065678250186275707, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7280463954022416853, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8057460697526235609, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8432854626870868717, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
insertIndex: 1
|
||||
addedObject: {fileID: 1694098956196228282}
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 5884405469530735240, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 4806039932380757063}
|
||||
- targetCorrespondingSourceObject: {fileID: 5884405469530735240, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: -6485968457914575509}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
--- !u!1 &1608707105887204823 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5884405469530735240, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
m_PrefabInstance: {fileID: 5186700973467465567}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &4806039932380757063
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1608707105887204823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d24b6e1f590a3664ea844a54866cc26b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::BulletSpawner
|
||||
prefab: {fileID: 19026177839507540, guid: b7ae10a17e67dc74eade85509a3d702f, type: 3}
|
||||
bulletSpeed: 8
|
||||
firePoint: {fileID: 1694098956196228282}
|
||||
min: 0.5
|
||||
max: 3
|
||||
--- !u!65 &-6485968457914575509
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1608707105887204823}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 0.2, y: 0.2, z: 0.3}
|
||||
m_Center: {x: 0, y: 0.03, z: 0}
|
||||
--- !u!4 &2096590804284731245 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 6548879496589514802, guid: 3d6c7430bd21a564489df266ea8864e1, type: 3}
|
||||
m_PrefabInstance: {fileID: 5186700973467465567}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4103c7f244b057c4bb3e5236e6dbf66c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!134 &13400000
|
||||
PhysicsMaterial:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ZeroFriction
|
||||
serializedVersion: 2
|
||||
m_DynamicFriction: 0
|
||||
m_StaticFriction: 0
|
||||
m_Bounciness: 0
|
||||
m_FrictionCombine: 0
|
||||
m_BounceCombine: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91223f2c57e8ed743ae1b19afc85cef5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 13400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+2310
-2002
File diff suppressed because one or more lines are too long
+133
-271
@@ -119,6 +119,138 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &87760041
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 87760042}
|
||||
- component: {fileID: 87760045}
|
||||
- component: {fileID: 87760044}
|
||||
- component: {fileID: 87760043}
|
||||
m_Layer: 5
|
||||
m_Name: GAME START
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &87760042
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 87760041}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 155.9, y: 155.9, z: 155.9}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1920784534}
|
||||
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: -186.7}
|
||||
m_SizeDelta: {x: 2.63, y: 0.57}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &87760043
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 87760041}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 87760044}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2015425059}
|
||||
m_TargetAssemblyTypeName: SceneChange, Assembly-CSharp
|
||||
m_MethodName: Change
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &87760044
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 87760041}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7819f6eba9c7bff499871a8f33d9e0ed, 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!222 &87760045
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 87760041}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &203844586
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -246,143 +378,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &515788184
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 515788185}
|
||||
- component: {fileID: 515788187}
|
||||
- component: {fileID: 515788186}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &515788185
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 515788184}
|
||||
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: 1779799993}
|
||||
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!114 &515788186
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 515788184}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: START
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4281479730
|
||||
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 48
|
||||
m_fontSizeBase: 48
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
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!222 &515788187
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 515788184}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &544250150
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -847,139 +842,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1779799992
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1779799993}
|
||||
- component: {fileID: 1779799997}
|
||||
- component: {fileID: 1779799996}
|
||||
- component: {fileID: 1779799995}
|
||||
m_Layer: 5
|
||||
m_Name: Start_Btn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1779799993
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1779799992}
|
||||
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: 515788185}
|
||||
m_Father: {fileID: 1920784534}
|
||||
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: -248.6}
|
||||
m_SizeDelta: {x: 400, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!114 &1779799995
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1779799992}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 1779799996}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2015425059}
|
||||
m_TargetAssemblyTypeName: SceneChange, Assembly-CSharp
|
||||
m_MethodName: Change
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &1779799996
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1779799992}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: fafb57e9cc0c62245a6bd4d42a895309, type: 3}
|
||||
m_Type: 1
|
||||
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!222 &1779799997
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1779799992}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1920784530
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1075,7 +937,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 585151270}
|
||||
- {fileID: 1779799993}
|
||||
- {fileID: 87760042}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
|
||||
+29
-29
@@ -4,11 +4,16 @@ public class Bullet : MonoBehaviour
|
||||
{
|
||||
public float speed = 8f;
|
||||
private Rigidbody rb;
|
||||
|
||||
public GameObject effect;
|
||||
|
||||
public AudioSource audioSource;
|
||||
public AudioClip clip;
|
||||
public bool isPlayerBullet = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
rb = GetComponent<Rigidbody>();
|
||||
rb.linearVelocity = transform.forward * speed;
|
||||
Destroy(gameObject, 3f);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
@@ -19,33 +24,28 @@ public class Bullet : MonoBehaviour
|
||||
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
Instantiate(effect, other.transform.position, Quaternion.identity);
|
||||
|
||||
PlayerController pc = other.GetComponent<PlayerController>();
|
||||
if (pc != null)
|
||||
if (!isPlayerBullet)
|
||||
{
|
||||
pc.Die();
|
||||
GameObject.Find("The_Lead_Hits_Deep").GetComponent<AudioSource>().Stop();
|
||||
Instantiate(effect, other.transform.position, Quaternion.identity);
|
||||
PlayerController pc = other.GetComponent<PlayerController>();
|
||||
if (pc != null)
|
||||
{
|
||||
pc.Die();
|
||||
GameManager.instance.PlayDeathMusic();
|
||||
}
|
||||
Destroy(gameObject);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (other.CompareTag("Spawner"))
|
||||
{
|
||||
if (isPlayerBullet)
|
||||
{
|
||||
Destroy(other.gameObject);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
rb = GetComponent<Rigidbody>();
|
||||
rb.linearVelocity = transform.forward * speed;
|
||||
|
||||
Destroy(gameObject, 3f);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,26 +17,38 @@ public class BulletSpawner : MonoBehaviour
|
||||
float rate;
|
||||
float time;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
time = 0f;
|
||||
rate = Random.Range(min, max);
|
||||
|
||||
target = FindFirstObjectByType<PlayerController>().transform;
|
||||
PlayerController player = FindFirstObjectByType<PlayerController>();
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
target = player.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("BulletSpawner: 플레이어를 찾을 수 없습니다! 씬에 PlayerController가 있는지 확인하세요.");
|
||||
}
|
||||
|
||||
if (GameManager.instance != null)
|
||||
{
|
||||
GameManager.instance.RegisterSpawner(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
time += Time.deltaTime;
|
||||
if (target == null) return;
|
||||
|
||||
time += Time.deltaTime;
|
||||
transform.LookAt(target);
|
||||
|
||||
if(time >= rate)
|
||||
if (time >= rate)
|
||||
{
|
||||
time = 0f;
|
||||
|
||||
rate = Random.Range(min, max);
|
||||
|
||||
GameObject obj = Instantiate(prefab, firePoint.transform.position, firePoint.transform.rotation);
|
||||
@@ -46,6 +58,20 @@ public class BulletSpawner : MonoBehaviour
|
||||
if (bulletScript != null)
|
||||
{
|
||||
bulletScript.speed = bulletSpeed;
|
||||
bulletScript.isPlayerBullet = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (GameManager.instance != null)
|
||||
{
|
||||
GameManager.instance.UnregisterSpawner(this);
|
||||
|
||||
if (!GameManager.instance.isGameover)
|
||||
{
|
||||
GameManager.instance.RequestRespawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+107
-20
@@ -1,4 +1,6 @@
|
||||
using NUnit.Framework.Constraints;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
@@ -11,36 +13,41 @@ public class GameManager : MonoBehaviour
|
||||
public Text recordText;
|
||||
|
||||
private float surviveTime;
|
||||
private bool isGameover;
|
||||
public bool isGameover;
|
||||
|
||||
public GameObject restartButton;
|
||||
|
||||
public void EndGame()
|
||||
public static GameManager instance;
|
||||
|
||||
public AudioSource leadAudio;
|
||||
public AudioSource deathAudio;
|
||||
|
||||
public List<BulletSpawner> activeSpawners = new List<BulletSpawner>();
|
||||
public Transform player;
|
||||
public SpawnZone spawnZone;
|
||||
public GameObject spawnerPrefab;
|
||||
|
||||
public void RegisterSpawner(BulletSpawner s) => activeSpawners.Add(s);
|
||||
public void UnregisterSpawner(BulletSpawner s) => activeSpawners.Remove(s);
|
||||
|
||||
public int maxSpawnerCount = 2;
|
||||
|
||||
public Transform rotationPlate;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
isGameover = true;
|
||||
gameoverText.SetActive(true);
|
||||
restartButton.SetActive(true);
|
||||
|
||||
float bestTime = PlayerPrefs.GetFloat("BestTime");
|
||||
if(surviveTime > bestTime)
|
||||
{
|
||||
bestTime = surviveTime;
|
||||
PlayerPrefs.SetFloat("BestTime", bestTime);
|
||||
}
|
||||
|
||||
recordText.text = "Best Time: " + (int)bestTime;
|
||||
|
||||
if (instance == null) instance = this;
|
||||
}
|
||||
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
surviveTime = 0;
|
||||
isGameover = false;
|
||||
|
||||
if (leadAudio != null) leadAudio.Play();
|
||||
if (deathAudio != null) deathAudio.Stop();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if(!isGameover)
|
||||
@@ -50,12 +57,10 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
// 1. PC: R키
|
||||
if (Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
RestartGame();
|
||||
}
|
||||
// 2. 모바일/PC: 클릭 또는 터치 (화면 아무데나 눌러도 재시작)
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
RestartGame();
|
||||
@@ -73,4 +78,86 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
UnityEngine.SceneManagement.SceneManager.LoadScene(1);
|
||||
}
|
||||
|
||||
public void PlayDeathMusic()
|
||||
{
|
||||
if (leadAudio != null) leadAudio.Stop();
|
||||
if (deathAudio != null) deathAudio.Play();
|
||||
}
|
||||
|
||||
public void EndGame()
|
||||
{
|
||||
isGameover = true;
|
||||
gameoverText.SetActive(true);
|
||||
restartButton.SetActive(true);
|
||||
|
||||
float bestTime = PlayerPrefs.GetFloat("BestTime");
|
||||
if (surviveTime > bestTime)
|
||||
{
|
||||
bestTime = surviveTime;
|
||||
PlayerPrefs.SetFloat("BestTime", bestTime);
|
||||
}
|
||||
|
||||
recordText.text = "Best Time: " + (int)bestTime;
|
||||
|
||||
}
|
||||
|
||||
public Vector3 GetValidSpawnPosition()
|
||||
{
|
||||
int maxAttempts = 10;
|
||||
for (int i = 0; i < maxAttempts; i++)
|
||||
{
|
||||
Vector3 candidate = spawnZone.GetRandomPosition();
|
||||
|
||||
|
||||
if (Vector3.Distance(candidate, player.position) < 5f) continue;
|
||||
|
||||
bool isOverlap = false;
|
||||
foreach (var spawner in activeSpawners)
|
||||
{
|
||||
if (Vector3.Distance(candidate, spawner.transform.position) < 3f)
|
||||
{
|
||||
isOverlap = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isOverlap) return candidate;
|
||||
}
|
||||
return spawnZone.GetRandomPosition();
|
||||
}
|
||||
|
||||
public void RequestRespawn()
|
||||
{
|
||||
StartCoroutine(RespawnRoutine());
|
||||
}
|
||||
|
||||
IEnumerator RespawnRoutine()
|
||||
{
|
||||
yield return new WaitForSeconds(3f);
|
||||
|
||||
Vector3 validPos = GetValidSpawnPosition();
|
||||
|
||||
GameObject newSpawner = Instantiate(spawnerPrefab, validPos, Quaternion.identity);
|
||||
|
||||
if (rotationPlate != null)
|
||||
{
|
||||
newSpawner.transform.SetParent(rotationPlate);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateMaxSpawnerCount(int newCount)
|
||||
{
|
||||
maxSpawnerCount = newCount;
|
||||
|
||||
int currentCount = activeSpawners.Count;
|
||||
if (currentCount < maxSpawnerCount)
|
||||
{
|
||||
int needed = maxSpawnerCount - currentCount;
|
||||
for (int i = 0; i < needed; i++)
|
||||
{
|
||||
RequestRespawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+24
-43
@@ -2,17 +2,21 @@ using UnityEngine;
|
||||
|
||||
public class NewMonoBehaviourScript : MonoBehaviour
|
||||
{
|
||||
public GameObject[] spawners;
|
||||
public Rotator rotator;
|
||||
|
||||
private GameManager gameManager;
|
||||
private int currentStep = 0;
|
||||
|
||||
private int lastMaxCount = 2;
|
||||
private int lastStep = -1;
|
||||
|
||||
void Start()
|
||||
{
|
||||
gameManager = FindFirstObjectByType<GameManager>();
|
||||
|
||||
InitializeDifficulty();
|
||||
gameManager.UpdateMaxSpawnerCount(2);
|
||||
|
||||
UpdateStep(0);
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -20,71 +24,48 @@ public class NewMonoBehaviourScript : MonoBehaviour
|
||||
if (gameManager == null) return;
|
||||
|
||||
float currentTime = gameManager.GetSurviveTime();
|
||||
int targetStep = 1;
|
||||
|
||||
if (currentTime > 30f) targetStep = 4;
|
||||
else if (currentTime > 20f) targetStep = 3;
|
||||
else if (currentTime > 10f) targetStep = 2;
|
||||
else targetStep = 1;
|
||||
int targetMax = 2;
|
||||
|
||||
if (currentStep != targetStep)
|
||||
if (currentTime > 10f)
|
||||
{
|
||||
UpdateStep(targetStep);
|
||||
targetMax = 2 + Mathf.FloorToInt((currentTime - 10f) / 4f);
|
||||
}
|
||||
}
|
||||
|
||||
if(targetMax != lastMaxCount)
|
||||
{
|
||||
lastMaxCount = targetMax;
|
||||
gameManager.UpdateMaxSpawnerCount(targetMax);
|
||||
}
|
||||
|
||||
void InitializeDifficulty()
|
||||
{
|
||||
foreach (var s in spawners) s.SetActive(false);
|
||||
if (rotator != null) rotator.enabled = false;
|
||||
|
||||
UpdateStep(1);
|
||||
int currentStep = (int)currentTime / 10;
|
||||
if (currentStep != lastStep)
|
||||
{
|
||||
lastStep = currentStep;
|
||||
UpdateStep(currentStep);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateStep(int step)
|
||||
{
|
||||
currentStep = step;
|
||||
switch (step)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
SetSpawnersActive(2);
|
||||
if (rotator != null) rotator.enabled = false;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
SetSpawnersActive(4);
|
||||
if (rotator != null) rotator.enabled = false;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
SetSpawnersActive(4);
|
||||
if (rotator != null) rotator.enabled = true;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
SetSpawnersActive(4);
|
||||
if (rotator != null) rotator.enabled = true;
|
||||
UpgradeBullSpeed(12f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetSpawnersActive(int count)
|
||||
{
|
||||
for(int i = 0; i < spawners.Length; i++)
|
||||
{
|
||||
spawners[i].SetActive(i < count);
|
||||
}
|
||||
}
|
||||
|
||||
void UpgradeBullSpeed(float newSpeed)
|
||||
{
|
||||
foreach (var obj in spawners)
|
||||
{
|
||||
if (obj == null) continue;
|
||||
BulletSpawner spawner = obj.GetComponent<BulletSpawner>();
|
||||
if (spawner != null) spawner.bulletSpeed = newSpeed;
|
||||
default:
|
||||
if (rotator != null) rotator.enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,16 @@ using UnityEngine;
|
||||
|
||||
public class PlatformUIHandler : MonoBehaviour
|
||||
{
|
||||
public GameObject joystickUI; // 모바일 조이스틱 오브젝트
|
||||
public GameObject buttonUI; // 가상 버튼 오브젝트
|
||||
public GameObject joystickUI;
|
||||
public GameObject buttonUI;
|
||||
public GameObject shootButtonUI;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// 아까 Intro에서 저장한 값을 확인
|
||||
bool isMobile = GameSettings.IsMobile;
|
||||
|
||||
// 모바일이면 켜고, 아니면 끔
|
||||
if (joystickUI != null) joystickUI.SetActive(isMobile);
|
||||
if (buttonUI != null) buttonUI.SetActive(isMobile);
|
||||
if (shootButtonUI != null) shootButtonUI.SetActive(isMobile);
|
||||
}
|
||||
}
|
||||
@@ -12,13 +12,28 @@ public class PlayerController : MonoBehaviour
|
||||
public int shieldCount = 3;
|
||||
private bool isShieldActive = false;
|
||||
public GameObject shieldVisual;
|
||||
public ShieldUIHandler shieldUI; // UI 전용 스크립트 참조
|
||||
public ShieldUIHandler shieldUI;
|
||||
|
||||
[Header("Shooting")]
|
||||
public GameObject bulletPrefab;
|
||||
public Transform firePoint;
|
||||
public int maxAmmo = 6;
|
||||
public float reloadTime = 1.5f;
|
||||
|
||||
private int currentAmmo;
|
||||
private bool isReloading = false;
|
||||
|
||||
public ShootButtonUI shootButtonUI;
|
||||
|
||||
private Vector3 lastMoveDirection = Vector3.forward;
|
||||
|
||||
void Start()
|
||||
{
|
||||
playerRigidbody = GetComponent<Rigidbody>();
|
||||
|
||||
// 초기 UI 상태 반영
|
||||
currentAmmo = maxAmmo;
|
||||
if (shootButtonUI != null) shootButtonUI.UpdateAmmoUI(currentAmmo, maxAmmo);
|
||||
|
||||
if (shieldUI != null) shieldUI.UpdateShieldUI(shieldCount);
|
||||
}
|
||||
|
||||
@@ -26,11 +41,15 @@ public class PlayerController : MonoBehaviour
|
||||
{
|
||||
HandleMovement();
|
||||
|
||||
// PC 입력 처리 (모바일 아닐 때만)
|
||||
if (!GameSettings.IsMobile && Input.GetKeyDown(KeyCode.Alpha1))
|
||||
{
|
||||
ActivateShieldLogic();
|
||||
}
|
||||
|
||||
if (!GameSettings.IsMobile && Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
Shoot();
|
||||
}
|
||||
}
|
||||
|
||||
void HandleMovement()
|
||||
@@ -40,7 +59,8 @@ public class PlayerController : MonoBehaviour
|
||||
if (GameSettings.IsMobile && joystick != null)
|
||||
{
|
||||
Vector2 input = joystick.GetInput();
|
||||
x = input.x; z = input.y;
|
||||
x = input.x;
|
||||
z = input.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -48,16 +68,16 @@ public class PlayerController : MonoBehaviour
|
||||
z = Input.GetAxis("Vertical");
|
||||
}
|
||||
|
||||
playerRigidbody.linearVelocity = new Vector3(x * speed, 0f, z * speed);
|
||||
playerRigidbody.linearVelocity = new Vector3(x * speed, playerRigidbody.linearVelocity.y, z * speed);
|
||||
|
||||
if (x != 0 || z != 0)
|
||||
if (Mathf.Abs(x) > 0.1f || Mathf.Abs(z) > 0.1f)
|
||||
{
|
||||
transform.rotation = Quaternion.LookRotation(new Vector3(x, 0f, z));
|
||||
lastMoveDirection = new Vector3(x, 0, z).normalized;
|
||||
}
|
||||
|
||||
// 애니메이션
|
||||
|
||||
Animator anim = GetComponentInChildren<Animator>();
|
||||
if (anim != null) anim.SetBool("isMoving", (x != 0 || z != 0));
|
||||
if (anim != null) anim.SetBool("isMoving", (Mathf.Abs(x) > 0.1f || Mathf.Abs(z) > 0.1f));
|
||||
}
|
||||
|
||||
public void ActivateShieldLogic()
|
||||
@@ -73,7 +93,6 @@ public class PlayerController : MonoBehaviour
|
||||
isShieldActive = true;
|
||||
shieldCount--;
|
||||
|
||||
// UI 업데이트 위임
|
||||
if (shieldUI != null) shieldUI.UpdateShieldUI(shieldCount);
|
||||
|
||||
if (shieldVisual != null) shieldVisual.SetActive(true);
|
||||
@@ -88,4 +107,76 @@ public class PlayerController : MonoBehaviour
|
||||
gameObject.SetActive(false);
|
||||
FindFirstObjectByType<GameManager>()?.EndGame();
|
||||
}
|
||||
|
||||
public void Shoot(Vector2? inputDirection = null)
|
||||
{
|
||||
// 리로드 중이거나 탄이 없으면 발사 불가
|
||||
if (isReloading || currentAmmo <= 0)
|
||||
return;
|
||||
|
||||
if (bulletPrefab == null || firePoint == null)
|
||||
return;
|
||||
|
||||
// 탄 차감
|
||||
currentAmmo--;
|
||||
if (shootButtonUI != null) shootButtonUI.UpdateAmmoUI(currentAmmo, maxAmmo);
|
||||
|
||||
// 방향 결정
|
||||
Vector3 lookDir;
|
||||
if (inputDirection.HasValue && inputDirection.Value.magnitude > 0.1f)
|
||||
{
|
||||
lookDir = new Vector3(inputDirection.Value.x, 0, inputDirection.Value.y).normalized;
|
||||
lastMoveDirection = lookDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
lookDir = lastMoveDirection;
|
||||
}
|
||||
|
||||
Quaternion bulletRotation = Quaternion.LookRotation(lookDir);
|
||||
GameObject bullet = Instantiate(bulletPrefab, firePoint.position, bulletRotation);
|
||||
bullet.transform.forward = lookDir;
|
||||
|
||||
Bullet bulletScript = bullet.GetComponent<Bullet>();
|
||||
if (bulletScript != null)
|
||||
{
|
||||
bulletScript.isPlayerBullet = true;
|
||||
bulletScript.speed = 8f;
|
||||
}
|
||||
|
||||
Collider bulletCollider = bullet.GetComponent<Collider>();
|
||||
Collider playerCollider = GetComponent<Collider>();
|
||||
if (bulletCollider != null && playerCollider != null)
|
||||
{
|
||||
Physics.IgnoreCollision(bulletCollider, playerCollider);
|
||||
}
|
||||
|
||||
// 마지막 탄을 쐈으면 자동 리로드 시작
|
||||
if (currentAmmo <= 0)
|
||||
{
|
||||
StartCoroutine(ReloadRoutine());
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator ReloadRoutine()
|
||||
{
|
||||
isReloading = true;
|
||||
if (shootButtonUI != null) shootButtonUI.SetReloading(true);
|
||||
|
||||
yield return new WaitForSeconds(reloadTime);
|
||||
|
||||
currentAmmo = maxAmmo;
|
||||
isReloading = false;
|
||||
|
||||
if (shootButtonUI != null)
|
||||
{
|
||||
shootButtonUI.SetReloading(false);
|
||||
shootButtonUI.UpdateAmmoUI(currentAmmo, maxAmmo);
|
||||
}
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
transform.rotation = Quaternion.LookRotation(lastMoveDirection);
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,10 @@ using TMPro;
|
||||
|
||||
public class RestartTextHandler : MonoBehaviour
|
||||
{
|
||||
// [SerializeField]를 쓰면 private이어도 인스펙터 창에 뜹니다!
|
||||
[SerializeField] private TextMeshProUGUI restartText;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
// 이제 null 체크를 할 필요도 거의 없습니다. (인스펙터에서 넣을 거니까요)
|
||||
if (restartText == null)
|
||||
{
|
||||
Debug.LogError("인스펙터에 텍스트 오브젝트를 할당해주세요!");
|
||||
|
||||
@@ -8,15 +8,5 @@ public class SceneChange : MonoBehaviour
|
||||
{
|
||||
SceneManager.LoadScene("Game");
|
||||
}
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ using UnityEngine.UI;
|
||||
|
||||
public class ShieldRelocator : MonoBehaviour
|
||||
{
|
||||
public Transform pcAnchor; // PC 화면 위치
|
||||
public Transform mobileAnchor; // 모바일 버튼 내부 위치
|
||||
public Transform pcAnchor;
|
||||
public Transform mobileAnchor;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
||||
@@ -7,19 +7,16 @@ public class ShieldUIHandler : MonoBehaviour
|
||||
[SerializeField] private Image shieldIcon;
|
||||
[SerializeField] private TextMeshProUGUI countText;
|
||||
|
||||
// UI 업데이트만 담당하는 함수
|
||||
public void UpdateShieldUI(int count)
|
||||
{
|
||||
if (countText != null)
|
||||
{
|
||||
countText.text = count.ToString();
|
||||
// 개수가 0이면 텍스트 숨기기
|
||||
countText.gameObject.SetActive(count > 0);
|
||||
}
|
||||
|
||||
if (shieldIcon != null)
|
||||
{
|
||||
// 색상 조절 로직
|
||||
shieldIcon.color = (count > 0) ? Color.white : new Color(0.2f, 0.2f, 0.2f, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class ShootButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
||||
{
|
||||
[SerializeField] private float rotationLimit = 40;
|
||||
[SerializeField] private float rotationSpeed = 15;
|
||||
private bool rotate = false;
|
||||
private bool isDisabled = false;
|
||||
|
||||
public PlayerController playerController;
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
float targetRotate = rotate ? rotationLimit : 0f;
|
||||
Quaternion target = Quaternion.Euler(targetRotate, 0, 0);
|
||||
transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * rotationSpeed);
|
||||
}
|
||||
|
||||
public void OnPointerDown(PointerEventData pointerEventData)
|
||||
{
|
||||
if (isDisabled) return;
|
||||
|
||||
rotate = true;
|
||||
|
||||
if (playerController != null)
|
||||
{
|
||||
Vector2? input = (GameSettings.IsMobile && playerController.joystick != null)
|
||||
? playerController.joystick.GetInput()
|
||||
: null;
|
||||
|
||||
playerController.Shoot(input);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData pointerEventData)
|
||||
{
|
||||
rotate = false;
|
||||
}
|
||||
|
||||
// 외부에서 호출
|
||||
public void SetDisabled(bool disabled)
|
||||
{
|
||||
isDisabled = disabled;
|
||||
if (disabled) rotate = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4de305db8999c874386cdb0baaa3eb61
|
||||
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
public class ShootButtonUI : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
public TMP_Text ammoText;
|
||||
|
||||
private ShootButton shootButton;
|
||||
private int lastCurrent;
|
||||
private int lastMax;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
shootButton = GetComponent<ShootButton>();
|
||||
}
|
||||
|
||||
public void UpdateAmmoUI(int current, int max)
|
||||
{
|
||||
lastCurrent = current;
|
||||
lastMax = max;
|
||||
|
||||
if (ammoText != null)
|
||||
ammoText.text = $"{current}/{max}";
|
||||
}
|
||||
|
||||
public void SetReloading(bool reloading)
|
||||
{
|
||||
if (ammoText != null)
|
||||
{
|
||||
if (reloading)
|
||||
ammoText.text = "Reload";
|
||||
else
|
||||
ammoText.text = $"{lastCurrent}/{lastMax}";
|
||||
}
|
||||
|
||||
// 버튼 입력 차단/해제
|
||||
if (shootButton != null)
|
||||
shootButton.SetDisabled(reloading);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5179a74c586a0c242bff159b71c9b794
|
||||
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SpawnZone : MonoBehaviour
|
||||
{
|
||||
public BoxCollider area;
|
||||
|
||||
public Vector3 GetRandomPosition()
|
||||
{
|
||||
Bounds bounds = area.bounds;
|
||||
return new Vector3(
|
||||
Random.Range(bounds.min.x, bounds.max.x),
|
||||
bounds.center.y,
|
||||
Random.Range(bounds.min.z, bounds.max.z)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28cbeb060fae10746bedde0296e2585c
|
||||
@@ -26,6 +26,8 @@ public class VirtualJoystick : MonoBehaviour, IPointerDownHandler, IPointerUpHan
|
||||
protected CanvasGroup bgCanvasGroup = null;
|
||||
protected Vector2 initialPosition = Vector2.zero;
|
||||
|
||||
private Vector2 lastDirection = Vector2.zero;
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
canvas = GetComponentInParent<Canvas>();
|
||||
@@ -115,9 +117,20 @@ public class VirtualJoystick : MonoBehaviour, IPointerDownHandler, IPointerUpHan
|
||||
|
||||
if (handle != null && movementRange != 0)
|
||||
{
|
||||
return handle.anchoredPosition / movementRange;
|
||||
Vector2 currentInput = handle.anchoredPosition / movementRange;
|
||||
|
||||
if (currentInput.magnitude > 0.1f)
|
||||
{
|
||||
lastDirection = currentInput;
|
||||
}
|
||||
|
||||
return currentInput;
|
||||
}
|
||||
return Vector2.zero;
|
||||
}
|
||||
|
||||
public Vector2 GetLastDirection()
|
||||
{
|
||||
return lastDirection;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user