Commit d12b1be8 authored by 18손재민's avatar 18손재민

고스트 구현 완료

parent de53a70f
fileFormatVersion: 2
guid: 81b03ac01e8050c489b82c9d83d38ca9
folderAsset: yes
DefaultImporter:
externalObjects: {}
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: 1312529591873478}
m_IsPrefabAsset: 1
--- !u!1 &1312529591873478
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4120551927955160}
- component: {fileID: 114458326850872552}
m_Layer: 0
m_Name: GhostBoss
m_TagString: Tetrimino
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1392094499396834
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4379492925354834}
- component: {fileID: 212529282815869948}
- component: {fileID: 114210848111338228}
m_Layer: 0
m_Name: Room1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4120551927955160
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1312529591873478}
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_Children:
- {fileID: 4379492925354834}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4379492925354834
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1392094499396834}
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_Children: []
m_Father: {fileID: 4120551927955160}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114210848111338228
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1392094499396834}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f935789f55ec07f4ca6b334fba78ddb1, type: 3}
m_Name:
m_EditorClassIdentifier:
mapCoord: {x: 0, y: 0, z: 0}
doorInfo:
stage: 0
roomConcept: 0
itemRoomType: 0
specialRoomType: 0
--- !u!114 &114458326850872552
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1312529591873478}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fd1dc16b46613744db6b1b22af43a6d0, type: 3}
m_Name:
m_EditorClassIdentifier:
mapCoord: {x: 0, y: 0, z: 0}
stage: 0
roomConcept: 0
isBossTetrimino: 1
tetriminoType: 7
rooms:
- {fileID: 114210848111338228}
rotatedAngle: 0
rotatedPosition: 00000000000000000000000000000000
--- !u!212 &212529282815869948
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1392094499396834}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 09a55c7c9744ba04084ee582402b5c0f, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 0.39215687}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
fileFormatVersion: 2
guid: e494db59dc163164da23ae1ad850f540
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 4422a70761bf0ac4884c66372948586e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: d5817275e3767a64781b72bcebb0ef8a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 47e8f93d4209f34478b17a16248c8d0b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 8344e57989c72184ab94ae0131761045
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: c9c06793c7ca051448105a02e6071c28
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 325dd059e71f73542b872ad9735499c9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 818f089e5ff4b8a4aa2cbb5570f5f36e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 00a3cc75c0f86a5429975c059b71c269
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
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: 1479393782590012}
m_IsPrefabAsset: 1
--- !u!1 &1479393782590012
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4587451013871630}
- component: {fileID: 212994579511024370}
- component: {fileID: 114797574393229602}
m_Layer: 0
m_Name: Ghost
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4587451013871630
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1479393782590012}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2, y: 3.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114797574393229602
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1479393782590012}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f935789f55ec07f4ca6b334fba78ddb1, type: 3}
m_Name:
m_EditorClassIdentifier:
mapCoord: {x: 0, y: 0, z: 0}
doorInfo:
stage: 0
roomConcept: 0
itemRoomType: 0
specialRoomType: 5
--- !u!212 &212994579511024370
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1479393782590012}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: eb608082843dfe247954bc3ccbbe4b2b, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 0.39215687}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
fileFormatVersion: 2
guid: a60932c06704df540adaf84e1482c1d6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
...@@ -9,17 +9,18 @@ Prefab: ...@@ -9,17 +9,18 @@ Prefab:
m_Modifications: [] m_Modifications: []
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 0} m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1021307993235698} m_RootGameObject: {fileID: 1585104202151660}
m_IsPrefabAsset: 1 m_IsPrefabAsset: 1
--- !u!1 &1021307993235698 --- !u!1 &1585104202151660
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 4652729564059434} - component: {fileID: 4999051134920984}
- component: {fileID: 114042324736415526} - component: {fileID: 212869044712785006}
- component: {fileID: 114296766588409176}
m_Layer: 0 m_Layer: 0
m_Name: Room m_Name: Room
m_TagString: Untagged m_TagString: Untagged
...@@ -27,27 +28,79 @@ GameObject: ...@@ -27,27 +28,79 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!4 &4652729564059434 --- !u!4 &4999051134920984
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1021307993235698} m_GameObject: {fileID: 1585104202151660}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114042324736415526 --- !u!114 &114296766588409176
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1021307993235698} m_GameObject: {fileID: 1585104202151660}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f935789f55ec07f4ca6b334fba78ddb1, type: 3} m_Script: {fileID: 11500000, guid: f935789f55ec07f4ca6b334fba78ddb1, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapCoord: {x: 0, y: 0, z: 0}
doorInfo:
stage: 0
roomConcept: 0
itemRoomType: 0
specialRoomType: 5
--- !u!212 &212869044712785006
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1585104202151660}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: eb608082843dfe247954bc3ccbbe4b2b, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
fileFormatVersion: 2 fileFormatVersion: 2
guid: 550ebad07a64bef4f8fac7a12941a8e5 guid: 753bff13f4681a1409c96a1726be8907
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 100100000 mainObjectFileID: 100100000
......
...@@ -60,3 +60,5 @@ MonoBehaviour: ...@@ -60,3 +60,5 @@ MonoBehaviour:
- {fileID: 114813872723638092, guid: dfde2a88976e71b45b094b126823a49f, type: 2} - {fileID: 114813872723638092, guid: dfde2a88976e71b45b094b126823a49f, type: 2}
- {fileID: 114116348516849362, guid: 40858eb0c94aa6c45be70d235179724b, type: 2} - {fileID: 114116348516849362, guid: 40858eb0c94aa6c45be70d235179724b, type: 2}
- {fileID: 114953302277862202, guid: bd086e7cd95d6774583cbacdf6d8e445, type: 2} - {fileID: 114953302277862202, guid: bd086e7cd95d6774583cbacdf6d8e445, type: 2}
ghostRoom: {fileID: 114797574393229602, guid: a60932c06704df540adaf84e1482c1d6,
type: 2}
...@@ -19,7 +19,7 @@ public class GameManager : MonoBehaviour { ...@@ -19,7 +19,7 @@ public class GameManager : MonoBehaviour {
TS.MakeInitialTetrimino(); TS.MakeInitialTetrimino();
Vector2 coord = GameObject.Find("MapManager").GetComponent<MapManager>().startRoom.transform.position; Vector2 coord = GameObject.Find("MapManager").GetComponent<MapManager>().startRoom.transform.position;
GameObject.Find("Player").transform.position = new Vector2(coord.x, coord.y) + new Vector2(3, 3); //GameObject.Find("Player").transform.position = new Vector2(coord.x, coord.y) + new Vector2(3, 3);
} }
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GhostManager : MonoBehaviour {
MapManager MM;
public bool IsRightGhost(Tetrimino te)
{
for (int i = 0; i < te.rooms.Length; i++)
{
if (te.rooms[i].mapCoord.y < 0)
return false;
else if (MapManager.mapGrid[(int)te.rooms[i].mapCoord.x, (int)te.rooms[i].mapCoord.y] != null)
return false;
}
return true;
}
public void GhostDown(Tetrimino ghost, Tetrimino te)
{
while (IsRightGhost(ghost))
{
MM.MoveTetriminoMapCoord(ghost, new Vector3(0, -1, 0));
}
MM.MoveTetriminoMapCoord(ghost, new Vector3(0, 1, 0));
}
private void Awake()
{
MM = GameObject.Find("MapManager").GetComponent<MapManager>();
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
MM.currentGhost.mapCoord = MM.currentTetrimino.mapCoord;
for (int i = 0; i < MM.currentGhost.rooms.Length; i++)
{
MM.currentGhost.rooms[i].mapCoord = MM.currentTetrimino.rooms[i].mapCoord;
MM.currentGhost.rooms[i].transform.position = (MM.currentGhost.rooms[i].mapCoord - MM.currentGhost.mapCoord) * MM.tetrisMapSize + MM.currentGhost.transform.position;
}
GhostDown(MM.currentGhost, MM.currentTetrimino);
}
}
fileFormatVersion: 2
guid: 925d029b76b3b254b81e73583f901369
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
...@@ -4,23 +4,26 @@ using UnityEngine; ...@@ -4,23 +4,26 @@ using UnityEngine;
public class Test : MonoBehaviour { public class Test : MonoBehaviour {
MapManager MM;
TetriminoSpawner TS;
public static Vector3 tetrisCameraCoord = new Vector3(180, 240, -1); public static Vector3 tetrisCameraCoord = new Vector3(180, 240, -1);
public static float tetrisMapSize = 300; public static float tetrisMapSize = 300;
public void ChangeTetrimino() public void ChangeTetrimino()
{ {
var MM = GameObject.Find("MapManager").GetComponent<MapManager>();
var TS = GameObject.Find("TetriminoSpawner").GetComponent<TetriminoSpawner>();
Destroy(MM.currentTetrimino.gameObject); Destroy(MM.currentTetrimino.gameObject);
TS.MakeTetrimino(); TS.MakeTetrimino();
} }
public void SpawnBossTetrimino() public void SpawnBossTetrimino()
{ {
var MM = GameObject.Find("MapManager").GetComponent<MapManager>();
MM.spawnBossTetrimino = true; MM.spawnBossTetrimino = true;
} }
private void Awake()
{
MM = GameObject.Find("MapManager").GetComponent<MapManager>();
TS = GameObject.Find("TetriminoSpawner").GetComponent<TetriminoSpawner>();
}
// Use this for initialization // Use this for initialization
void Start () { void Start () {
......
...@@ -48,7 +48,7 @@ public class Tetrimino : MonoBehaviour { ...@@ -48,7 +48,7 @@ public class Tetrimino : MonoBehaviour {
{ {
public int[] horizontalLength; public int[] horizontalLength;
} }
public static RotationInformation[] rotationInformation = new RotationInformation[7]; public static RotationInformation[] rotationInformation = new RotationInformation[8];
/* /*
* functions * functions
......
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