Commit 290a18e7 authored by 18류지석's avatar 18류지석

파킨-

parent 0add0e64
......@@ -433,6 +433,8 @@ MonoBehaviour:
tty: 0
displayText: {fileID: 114495744039531298, guid: 457100d9937aef244b98ef4f67a0f218,
type: 2}
particlePrefab: {fileID: 1120403562358508, guid: e4d08affb61a63840a9cb9412fbe7b38,
type: 2}
--- !u!212 &212187280661781960
SpriteRenderer:
m_ObjectHideFlags: 1
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!62 &6200000
PhysicsMaterial2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: particle
friction: 0.4
bounciness: 0.8
fileFormatVersion: 2
guid: 8eb863c9985dc5b41b4c04efa93b6bad
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 6200000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1120403562358508}
m_IsPrefabAsset: 1
--- !u!1 &1120403562358508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4961056649420660}
- component: {fileID: 212525562428622492}
- component: {fileID: 50320821075488510}
- component: {fileID: 60824362284317310}
m_Layer: 0
m_Name: particle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4961056649420660
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1120403562358508}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.10124648, y: -0.1585421, z: 0}
m_LocalScale: {x: 1.5, y: 1.5, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!50 &50320821075488510
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1120403562358508}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 6200000, guid: 8eb863c9985dc5b41b4c04efa93b6bad, type: 2}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 1
m_Constraints: 0
--- !u!60 &60824362284317310
PolygonCollider2D:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1120403562358508}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 6200000, guid: 8eb863c9985dc5b41b4c04efa93b6bad, type: 2}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 0.09375, y: 0.09375}
newSize: {x: 0.09375, y: 0.09375}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 0.015850458, y: 0.04676413}
- {x: -0.015704429, y: 0.046965715}
- {x: -0.01560602, y: 0.031580765}
- {x: -0.031261414, y: 0.031526238}
- {x: -0.031180996, y: 0.016339913}
- {x: -0.04717206, y: 0.016206669}
- {x: -0.046856616, y: -0.01584689}
- {x: -0.03135604, y: -0.015454656}
- {x: -0.031499572, y: -0.03111196}
- {x: -0.015743466, y: -0.031173434}
- {x: -0.015640447, y: -0.046347085}
- {x: 0.015645683, y: -0.046696942}
- {x: 0.015327629, y: -0.00025501102}
- {x: 0.04655298, y: 0.0003018938}
- {x: 0.046568148, y: 0.015638411}
- {x: 0.031674653, y: 0.01564565}
- {x: 0.031250402, y: 0.031235235}
- {x: 0.015960451, y: 0.031578735}
--- !u!212 &212525562428622492
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1120403562358508}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: -2078941185
m_SortingLayer: 7
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: eb676d99ecaac0c42b288324bd919674, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.09375, y: 0.09375}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
fileFormatVersion: 2
guid: e4d08affb61a63840a9cb9412fbe7b38
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8577ae016a412764684fcba81af639cb
guid: f0e3b19ee969d4f429ee9d8430bb4a58
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
......
......@@ -10,6 +10,10 @@ public class Player : MonoBehaviour {
public int ttx;
public int tty;
public Text displayText;
public GameObject particlePrefab;
GameObject[] particles;
bool gameover;
public IEnumerator DisplayText(string _text)
{
......@@ -30,6 +34,15 @@ public class Player : MonoBehaviour {
ttx = (int)(transform.position.x / 24f);
tty = (int)(transform.position.y-0.9f / 24f);
lifeStoneManager = LifeStoneManager.Instance;
particles = new GameObject[40];
for(int i=0; i<particles.Length; i++)
{
particles[i] = Instantiate(particlePrefab,transform);
particles[i].SetActive(false);
}
gameover = false;
}
// Update is called once per frame
......@@ -58,7 +71,27 @@ public class Player : MonoBehaviour {
}
ttx = tx;
tty = ty;
if (lifeStoneManager.CountType() == 0)
GameManager.gameState = GameState.GameOver;
if (!gameover && lifeStoneManager.CountType() == 0)
{
gameover = true;
StartCoroutine(GameOverCoroutine());
}
}
IEnumerator GameOverCoroutine()
{
GetComponent<Rigidbody2D>().bodyType = RigidbodyType2D.Static;
GetComponent<Collider2D>().enabled = false;
GetComponent<SpriteRenderer>().enabled = false;
foreach(GameObject obj in particles)
{
obj.SetActive(true);
obj.transform.localPosition = Vector3.zero;
obj.GetComponent<Rigidbody2D>().velocity = Random.insideUnitCircle.normalized * 6f;
}
yield return new WaitForSeconds(3f);
GameManager.gameState = GameState.GameOver;
}
}
fileFormatVersion: 2
guid: eb676d99ecaac0c42b288324bd919674
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
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: 64
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5362a76a3c09bc1498232c85cf2329a1
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
......@@ -52,4 +52,4 @@ Physics2DSettings:
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
m_LayerCollisionMatrix: ffdffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9ffeffffdffffffffffffffedffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix: fedffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9ffeffffdffffffffffffffedffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment