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

싹다 머지함

parent 77b00431
......@@ -26,6 +26,7 @@ GameObject:
- component: {fileID: 114906702720267008}
- component: {fileID: 95992411616135034}
- component: {fileID: 114880704145925944}
- component: {fileID: 114574072693989902}
- component: {fileID: 82529156342294766}
m_Layer: 0
m_Name: Player
......@@ -59,7 +60,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1623439448163086}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.56, y: 0.08, z: 0}
m_LocalPosition: {x: -5.64, y: 1.8, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4710911479571038}
......@@ -361,6 +362,27 @@ MonoBehaviour:
serializedVersion: 2
m_Bits: 0
attackCombo:
--- !u!114 &114574072693989902
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1623439448163086}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a4458b2b5e7c3f842b29e2121f8400ea, type: 3}
m_Name:
m_EditorClassIdentifier:
spikeTile:
- {fileID: 11400000, guid: 7f2c5cb43ad7207499b22fb5e0acd41a, type: 2}
- {fileID: 11400000, guid: f411e29431b787c4ab84b5ff59ca5e6e, type: 2}
- {fileID: 11400000, guid: 85440e0dd81e48840947ce485614bab6, type: 2}
- {fileID: 11400000, guid: 7dbb7c55a3417f54fbd38fafb369478e, type: 2}
rb: {fileID: 0}
SpikeLayer: 10
spikeDamage: 5
spikeKnockBackx: 8
spikeKnockBacky: 8
--- !u!114 &114880704145925944
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -387,7 +409,6 @@ MonoBehaviour:
- {fileID: 7400000, guid: b1bf5cd583e214e448b83335f6c2d7a6, type: 2}
- {fileID: 7400000, guid: b7ca0c87c2a73cb4e939b4d06abd4217, type: 2}
- {fileID: 7400000, guid: 9133e696bcae7294c86f6702b20b4ae7, type: 2}
lifeStoneManager: {fileID: 0}
--- !u!114 &114906702720267008
MonoBehaviour:
m_ObjectHideFlags: 1
......
......@@ -132,7 +132,7 @@ MonoBehaviour:
- {fileID: 114453972306455548, guid: f6834170b7152ee4db0dc7e165dcca70, type: 2}
- {fileID: 114384035641513528, guid: a2dadbc92c7cc7e449233fae6430dee7, type: 2}
- {fileID: 114704192105535744, guid: a121f45347e4c3d4faf83b4e681c84f0, type: 2}
- {fileID: 114792926073732986, guid: 0443c2e9410bbe545bda40dc30fa6a63, type: 2}
- {fileID: 114792926073732986, guid: 7b5317162788b8d4daa13ea5c6dd368b, type: 2}
- {fileID: 114844722971494232, guid: 4643eac2d148bd146be89238dcdfa419, type: 2}
specialRoomList2:
- {fileID: 114330503780891850, guid: 7da800d1a4355fd4aa02e3518cd9e1fb, type: 2}
......@@ -143,7 +143,7 @@ MonoBehaviour:
- {fileID: 114453972306455548, guid: f6834170b7152ee4db0dc7e165dcca70, type: 2}
- {fileID: 114384035641513528, guid: a2dadbc92c7cc7e449233fae6430dee7, type: 2}
- {fileID: 114704192105535744, guid: a121f45347e4c3d4faf83b4e681c84f0, type: 2}
- {fileID: 114792926073732986, guid: 0443c2e9410bbe545bda40dc30fa6a63, type: 2}
- {fileID: 114792926073732986, guid: 7b5317162788b8d4daa13ea5c6dd368b, type: 2}
- {fileID: 114844722971494232, guid: 4643eac2d148bd146be89238dcdfa419, type: 2}
roomSurfaceSprite1:
- {fileID: 21300000, guid: 5e6d29c00a95b8140a33c81d93aac0b2, type: 3}
......
......@@ -11,51 +11,6 @@ Prefab:
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1915452461634262}
m_IsPrefabAsset: 1
--- !u!1 &1007840319863528
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4546795586742468}
m_Layer: 0
m_Name: enemy spot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1124637384100458
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4334623205686684}
m_Layer: 0
m_Name: Location
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1276568354572690
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4054145534218116}
m_Layer: 0
m_Name: Goblin
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1306147373330598
GameObject:
m_ObjectHideFlags: 0
......@@ -87,6 +42,7 @@ GameObject:
- component: {fileID: 8195094280011915956}
- component: {fileID: 3664157344941130292}
- component: {fileID: 50294503223574562}
- component: {fileID: 66378690533730962}
- component: {fileID: 2113883504902801176}
m_Layer: 9
m_Name: rope
......@@ -95,21 +51,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1646302870988242
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4372487440442684}
m_Layer: 0
m_Name: Location (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1657725642800636
GameObject:
m_ObjectHideFlags: 0
......@@ -183,21 +124,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4054145534218116
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1276568354572690}
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: 4334623205686684}
- {fileID: 4372487440442684}
m_Father: {fileID: 4546795586742468}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4152337674201398
Transform:
m_ObjectHideFlags: 1
......@@ -224,46 +150,6 @@ Transform:
m_Father: {fileID: 4874486600194970}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4334623205686684
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1124637384100458}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.5, y: 9, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4054145534218116}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4372487440442684
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1646302870988242}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.5, y: 17, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4054145534218116}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4546795586742468
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1007840319863528}
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: 4054145534218116}
m_Father: {fileID: 4874486600194970}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4557338679182532
Transform:
m_ObjectHideFlags: 1
......@@ -305,7 +191,6 @@ Transform:
- {fileID: 4925861857805118}
- {fileID: 4802276979595092}
- {fileID: 4152337674201398}
- {fileID: 4546795586742468}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -402,6 +287,76 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!66 &66378690533730962
CompositeCollider2D:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1432143927125218}
m_Enabled: 0
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_GeometryType: 0
m_GenerationType: 0
m_EdgeRadius: 0
m_ColliderPaths:
- m_Collider: {fileID: 2113883504902801176}
m_ColliderPaths:
- - X: 75937504
Y: 210000000
- X: 74062496
Y: 210000000
- X: 74062496
Y: 130000000
- X: 75937504
Y: 130000000
- - X: 165937504
Y: 210000000
- X: 164062496
Y: 210000000
- X: 164062496
Y: 130000000
- X: 165937504
Y: 130000000
- - X: 55937500
Y: 110000000
- X: 54062500
Y: 110000000
- X: 54062500
Y: 30000000
- X: 55937500
Y: 30000000
- - X: 185937504
Y: 110000000
- X: 184062496
Y: 110000000
- X: 184062496
Y: 30000000
- X: 185937504
Y: 30000000
m_CompositePaths:
m_Paths:
- - {x: 7.5937505, y: 21}
- {x: 7.4062495, y: 21}
- {x: 7.4062495, y: 13}
- {x: 7.5937505, y: 13}
- - {x: 16.59375, y: 21}
- {x: 16.40625, y: 21}
- {x: 16.40625, y: 13}
- {x: 16.59375, y: 13}
- - {x: 5.59375, y: 11}
- {x: 5.40625, y: 11}
- {x: 5.40625, y: 3}
- {x: 5.59375, y: 3}
- - {x: 18.59375, y: 11}
- {x: 18.40625, y: 11}
- {x: 18.40625, y: 3}
- {x: 18.59375, y: 3}
m_VertexDistance: 0.0005
--- !u!66 &66470208273812638
CompositeCollider2D:
m_ObjectHideFlags: 1
......@@ -668,7 +623,9 @@ CompositeCollider2D:
m_GeometryType: 0
m_GenerationType: 0
m_EdgeRadius: 0
m_ColliderPaths: []
m_ColliderPaths:
- m_Collider: {fileID: 2113883506471071274}
m_ColliderPaths: []
m_CompositePaths:
m_Paths: []
m_VertexDistance: 0.0005
......
......@@ -34,7 +34,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1704656476422024}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 72, y: 0, z: -2}
m_LocalPosition: {x: 0, y: 0, z: -2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
......
This diff is collapsed.
......@@ -32,7 +32,7 @@ public class CameraController : MonoBehaviour {
// Update is called once per frame
void LateUpdate()
{
if (GameManager.gameState == GameState.Tutorial || (GameManager.gameState == GameState.Ingame && MapManager.tempRoom == MapManager.currentRoom))
if (GameManager.gameState == GameState.Ingame)
{
FollowPlayer();
originPos = transform.position;
......@@ -166,22 +166,6 @@ public class CameraController : MonoBehaviour {
if (position.x + cameraXLimit >= MapManager.currentRoom.transform.position.x + MapManager.currentRoom.roomInGame.roomSize.x - 1)
return MapManager.currentRoom.transform.position.x + MapManager.currentRoom.roomInGame.roomSize.x - 1;
break;
/*case "Up":
if (position.y + cameraYLimit >= MapManager.Instance.tetrisYCoord[(int)MapManager.Instance.currentRoom.mapCoord.y] + 23f)
return MapManager.Instance.tetrisYCoord[(int)MapManager.Instance.currentRoom.mapCoord.y] + 23f;
break;
case "Down":
if (position.y - cameraYLimit <= MapManager.Instance.tetrisYCoord[(int)MapManager.Instance.currentRoom.mapCoord.y] + 1f)
return MapManager.Instance.tetrisYCoord[(int)MapManager.Instance.currentRoom.mapCoord.y] + 1f;
break;
case "Left":
if (position.x - cameraXLimit <= Player.tx * 24f + 1)
return Player.tx * 24f + 1;
break;
case "Right":
if (position.x + cameraXLimit >= (Player.tx + 1) * 24f - 1)
return (Player.tx + 1) * 24f - 1;
break;*/
}
return -1;
}
......
......@@ -77,16 +77,8 @@ public class Enemy : MonoBehaviour {
private void FixedUpdate()
{
bool wallTest = IsTouchingWall();
if (wallTest)
{
// Debug.Log("Touching wall");
}
bool cliffTest = IsAdvancingToCliff();
if (cliffTest)
{
// Debug.Log("Advancing to cliff");
}
PlayerDistance = Vector2.Distance(enemyManager.Player.transform.position, transform.parent.position);
CheckCliff(); CheckWall();
}
// Movement & Physics
......
......@@ -113,7 +113,7 @@ public class PlayerController : MonoBehaviour
}
isGrounded = tmp;
if (GameManager.gameState == GameState.Tutorial || GameManager.gameState == GameState.Ingame)
if (GameManager.gameState == GameState.Ingame)
{
if (playerState == PlayerState.Attack)
{
......
......@@ -61,7 +61,7 @@ public enum PlayerState { Idle, Walk, Run, GoingUp, GoingDown, Rope, Attack }
/// <summary>
/// Enum for game's state.
/// </summary>
public enum GameState { MainMenu, Ingame, Tutorial, Tetris, Portal, Inventory, Pause, GameOver }
public enum GameState { MainMenu, Ingame, Tetris, Portal, Inventory, Pause, GameOver }
/// <summary>
/// Enum for room types.
/// </summary>
......
......@@ -48,17 +48,19 @@ public class GameManager : Singleton<GameManager> {
void Awake()
{
}
// Use this for initialization
void Start () {
gameState = GameState.Tutorial;
gameState = GameState.Ingame;
minimap = GameObject.Find("Minimap");
minimap.SetActive(false);
MapManager.currentRoom = GameObject.Find("Room Tutorial").GetComponent<Room>();
MapManager.currentRoom.roomInGame.transform.Find("Portal").GetComponent<Portal>().isPortalTutorial = true;
GameObject.Find("Player").transform.position = MapManager.currentRoom.roomInGame.transform.Find("player spot").position + spawnPosition;
GameObject.Find("Main Camera").transform.position = GameObject.Find("Player").transform.position + new Vector3(0, 0, -1);
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
......
......@@ -22,7 +22,7 @@ public class CoollyPride : Addon
float[] varArray = new float[(int)EnemyDebuffCase.END_POINTER];
for (int i = 0; i < (int)EnemyDebuffCase.END_POINTER; i++) varArray[i] = 0f;
if (attackInfo.damage < 4) varArray[(int)EnemyDebuffCase.ice] = 2f;
if (attackInfo.damage < 4) varArray[(int)EnemyDebuffCase.Ice] = 2f;
return varArray;
}
......
......@@ -22,7 +22,7 @@ public class GlowingHerb : Addon
float[] varArray = new float[(int)EnemyDebuffCase.END_POINTER];
for (int i = 0; i < (int)EnemyDebuffCase.END_POINTER; i++) varArray[i] = 0f;
varArray[(int)EnemyDebuffCase.fire] = 3f;
varArray[(int)EnemyDebuffCase.Fire] = 3f;
return varArray;
}
......
......@@ -37,7 +37,7 @@ public class InventoryUI : MonoBehaviour {
public int selectedItem = -1;
string[] qualityString = new string[4] { "습작", "범작", "수작", "걸작" };
void Start () {
void Awake () {
items = new GameObject[9];
addons = new GameObject[9];
infoAddons = new GameObject[4];
......
......@@ -864,6 +864,8 @@ public class MapManager : Singleton<MapManager> {
else
room.GetComponent<SpriteRenderer>().sprite = roomSurfaceSpritesDistributed[room.stage][(int)room.specialRoomType - 1];
currentRoom = newRoom;
playerIcon.transform.parent = currentRoom.transform;
MapManager.Instance.playerIcon.transform.localPosition = new Vector3(0, 0, 0);
StartCoroutine(RoomFadeIn(newRoom));
}
/// <summary>
......@@ -1183,7 +1185,7 @@ public class MapManager : Singleton<MapManager> {
{
PortalControl();
}
playerIcon.transform.position = currentRoom.mapCoord * tetrisMapSize + new Vector3(0, 0, grid.transform.position.z - 2);
//playerIcon.transform.position = currentRoom.mapCoord * tetrisMapSize + new Vector3(0, 0, grid.transform.position.z - 2);
if (!currentRoom.isRoomCleared && (EnemyManager.Instance.IsClear() || (currentRoom.specialRoomType != RoomType.Normal && currentRoom.specialRoomType != RoomType.Boss)))
{
currentRoom.ClearRoom();
......
......@@ -4,17 +4,19 @@ using UnityEngine;
public class Portal : MonoBehaviour, IPlayerInteraction {
bool isPortalUsed;
public bool isPortalTutorial = false;
bool isPortalUsed = false;
public void Apply()
{
if (GameManager.gameState == GameState.Ingame)
StartCoroutine(GameObject.FindGameObjectWithTag("MainCamera").GetComponent<CameraController>().ChangeScene(GameState.Portal));
else if (GameManager.gameState == GameState.Tutorial && !isPortalUsed)
if (isPortalTutorial && !isPortalUsed)
{
StartCoroutine(GameManager.Instance.EndTutorial());
isPortalUsed = true;
}
else if (GameManager.gameState == GameState.Ingame && !isPortalTutorial)
StartCoroutine(GameObject.FindGameObjectWithTag("MainCamera").GetComponent<CameraController>().ChangeScene(GameState.Portal));
}
public void HighlightSwitch(bool enabled)
......
......@@ -101,10 +101,10 @@ public Tetrimino[] tetriminoes;
MapManager.Instance.UpdateMap(MapManager.currentTetrimino);
MapManager.Instance.CreateRoom(MapManager.currentTetrimino);
MapManager.currentRoom.fog.GetComponent<SpriteRenderer>().color = new Color(1, 1, 1, 0);
MapManager.Instance.playerIcon.transform.position = MapManager.currentRoom.mapCoord * MapManager.tetrisMapSize + new Vector3(0, 0, -2);
//MapManager.Instance.playerIcon.transform.position = MapManager.currentRoom.mapCoord * MapManager.tetrisMapSize + new Vector3(0, 0, -2);
MapManager.tempRoom = MapManager.currentRoom;
MapManager.Instance.playerIcon = Instantiate(MapManager.Instance.playerIcon, MapManager.currentRoom.mapCoord * MapManager.tetrisMapSize + new Vector3(0, 0, -2)
, Quaternion.identity, MapManager.Instance.grid);
MapManager.Instance.playerIcon = Instantiate(MapManager.Instance.playerIcon, new Vector3(0, 0, 0), Quaternion.identity, MapManager.currentRoom.transform);
MapManager.Instance.playerIcon.transform.localPosition = new Vector3(0, 0, 0);
MakeTetrimino();
}
}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class tiletest : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
fileFormatVersion: 2
guid: eb17c0dc633a1ef4c8337e5ffa1ffdae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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