Commit 1b4e0236 authored by 18류지석's avatar 18류지석

테트리미노 낙하 간격 조정, 적과 아이템이 줄 낙하시 생기는 버그 수정, 아이템이 포탈보다 우선적으로 선택됨

parent bf86de63
...@@ -59,7 +59,7 @@ Transform: ...@@ -59,7 +59,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1623439448163086} m_GameObject: {fileID: 1623439448163086}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2, y: 1.8, z: 0} m_LocalPosition: {x: -5.64, y: 1.8, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 4710911479571038} - {fileID: 4710911479571038}
...@@ -327,6 +327,9 @@ MonoBehaviour: ...@@ -327,6 +327,9 @@ MonoBehaviour:
itemLayer: itemLayer:
serializedVersion: 2 serializedVersion: 2
m_Bits: 8192 m_Bits: 8192
portalLayer:
serializedVersion: 2
m_Bits: 262144
rayDistance: 1 rayDistance: 1
playerState: 0 playerState: 0
previousState: 0 previousState: 0
...@@ -341,7 +344,7 @@ MonoBehaviour: ...@@ -341,7 +344,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 64f948f7c7aacab409fe963a6f9e0d2a, type: 3} m_Script: {fileID: 11500000, guid: 64f948f7c7aacab409fe963a6f9e0d2a, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
damage: 0 damage: 2
knockBackMultiplier: 1 knockBackMultiplier: 1
debuffNum: 0 debuffNum: 0
debuffType: debuffType:
...@@ -368,9 +371,9 @@ MonoBehaviour: ...@@ -368,9 +371,9 @@ MonoBehaviour:
anim: {fileID: 95992411616135034} anim: {fileID: 95992411616135034}
aoc: {fileID: 0} aoc: {fileID: 0}
normalAttack: normalAttack:
- {fileID: 7400000, guid: e27c281d8654edd4cafc9f13a3ba66e1, type: 2} - {fileID: 7400000, guid: b1bf5cd583e214e448b83335f6c2d7a6, type: 2}
- {fileID: 7400000, guid: e27c281d8654edd4cafc9f13a3ba66e1, type: 2} - {fileID: 7400000, guid: b7ca0c87c2a73cb4e939b4d06abd4217, type: 2}
- {fileID: 7400000, guid: e27c281d8654edd4cafc9f13a3ba66e1, type: 2} - {fileID: 7400000, guid: 9133e696bcae7294c86f6702b20b4ae7, type: 2}
inventoryManager: {fileID: 0} inventoryManager: {fileID: 0}
lifeStoneManager: {fileID: 0} lifeStoneManager: {fileID: 0}
--- !u!114 &114906702720267008 --- !u!114 &114906702720267008
......
...@@ -56,7 +56,7 @@ MonoBehaviour: ...@@ -56,7 +56,7 @@ MonoBehaviour:
grid: {fileID: 0} grid: {fileID: 0}
initialFallSpeed: -0.1 initialFallSpeed: -0.1
gravity: 0.98 gravity: 0.98
timeToFallTetrimino: 100 timeToFallTetrimino: 30
tetriminoWaitedTime: 0 tetriminoWaitedTime: 0
tetriminoCreatedTime: 0 tetriminoCreatedTime: 0
collapseTime: 10 collapseTime: 10
...@@ -268,3 +268,92 @@ MonoBehaviour: ...@@ -268,3 +268,92 @@ MonoBehaviour:
- {fileID: 11400000, guid: 8053217ed4b04674990f6fd04049e6a4, type: 2} - {fileID: 11400000, guid: 8053217ed4b04674990f6fd04049e6a4, type: 2}
- {fileID: 11400000, guid: b5fcd2f2e4c67fc43a358769246cbc31, type: 2} - {fileID: 11400000, guid: b5fcd2f2e4c67fc43a358769246cbc31, type: 2}
- {fileID: 11400000, guid: 12c5767f0650c0c4a85c5a32a133eaf6, type: 2} - {fileID: 11400000, guid: 12c5767f0650c0c4a85c5a32a133eaf6, type: 2}
- {fileID: 11400000, guid: 25f7a0be713ce754d98b870dae1dae86, type: 2}
- {fileID: 11400000, guid: a3565f5943a1f284ab63d05dc8201a90, type: 2}
- {fileID: 11400000, guid: b88eb1e8a0c6c0f4ba5d4c976857b2e3, type: 2}
- {fileID: 11400000, guid: 2ce0095160fff404ea785fdf68604640, type: 2}
- {fileID: 11400000, guid: b9ba4f9f3abf6f342a582b0dcc4c0f8a, type: 2}
- {fileID: 11400000, guid: b28a24fa65d5e1b4388c4f2cbc398394, type: 2}
- {fileID: 11400000, guid: 84ea72088bd96144ca717d51216cd540, type: 2}
- {fileID: 11400000, guid: 4bb56e3a2353d8a47af4205cbde81e84, type: 2}
- {fileID: 11400000, guid: 336ca7e891aa6e94a9942cca40fb54bf, type: 2}
- {fileID: 11400000, guid: 13bfcf85821807d4ba5f429cdb37ea2f, type: 2}
- {fileID: 11400000, guid: b07bdfa465ab3af4b8fb14e505f120d3, type: 2}
- {fileID: 11400000, guid: 2d601a26291b65544b930241920c7279, type: 2}
- {fileID: 11400000, guid: 55921aae7db0c52468cb2a9de1d107bd, type: 2}
- {fileID: 11400000, guid: 98542b78b3cb085479eeb530bffbabf9, type: 2}
- {fileID: 11400000, guid: cd08c2a219db3db4698eeef5a5d71b47, type: 2}
- {fileID: 11400000, guid: 6e14247edb468424f8223461d16905d4, type: 2}
- {fileID: 11400000, guid: 9e71e2279417c3e459818ff17dc2aa6f, type: 2}
- {fileID: 11400000, guid: f9a5831fc493fda4e93cbac99e6c2989, type: 2}
- {fileID: 11400000, guid: 8e4e19774b53b3b479fa49ae4531846d, type: 2}
- {fileID: 11400000, guid: fa36548597559674ba8ede1df55ff446, type: 2}
- {fileID: 11400000, guid: f38eb44ce290981488b1f0a6650a1321, type: 2}
- {fileID: 11400000, guid: 74d06422771b0a74fad67f27f43ab99d, type: 2}
- {fileID: 11400000, guid: 4fe873ddde5d62540bf48b6a103c79f7, type: 2}
- {fileID: 11400000, guid: 2725f2e13258bfa408f04b5d4c938e91, type: 2}
- {fileID: 11400000, guid: 630f50efb34ebce4783e3ab8f181a083, type: 2}
- {fileID: 11400000, guid: 6a3814c0058eac04495b715af3003a24, type: 2}
- {fileID: 11400000, guid: 42712b4bca9b6cb49bda3a74bd6948d3, type: 2}
- {fileID: 11400000, guid: e86502c95a7831241aced30d4a3a82f2, type: 2}
- {fileID: 11400000, guid: 1872608f0bf4efb44b36692b5e975fe1, type: 2}
- {fileID: 11400000, guid: 188ebfda89309874f9e9128f85b06fae, type: 2}
- {fileID: 11400000, guid: 17dbc1d79be1e594c9c8facf6acdacdb, type: 2}
- {fileID: 11400000, guid: 3db2fff26124b244fb3e6c2d56ef10eb, type: 2}
- {fileID: 11400000, guid: e3816f98dc7c6124689d1d7f8723e1e2, type: 2}
- {fileID: 11400000, guid: 762413050f42cba4b88081572d544d18, type: 2}
- {fileID: 11400000, guid: c2911a57b16a6f14d84036fcdfcb04c4, type: 2}
- {fileID: 11400000, guid: 2e3f3560098fa51419a7da62888af969, type: 2}
- {fileID: 11400000, guid: 6707a07fee6c6cf4e882858320d39279, type: 2}
- {fileID: 11400000, guid: 324808ae11be1b241ae217fa3172234e, type: 2}
- {fileID: 11400000, guid: 5305e07fe8d06c140865424199e982e0, type: 2}
- {fileID: 11400000, guid: 9e5886bdd8a51524ba947edf8ea2f5ad, type: 2}
- {fileID: 11400000, guid: 8555aaa381c2b2f4aa573f694ba7f488, type: 2}
- {fileID: 11400000, guid: 792b18705550b3e40b878122da59c230, type: 2}
- {fileID: 11400000, guid: dd761cb3640c8fe4c87a3ebb84a16a50, type: 2}
- {fileID: 11400000, guid: ef11e0ad19026654184364362d72ac67, type: 2}
- {fileID: 11400000, guid: 2a426afc0b8585c4789c6ebac2986b3d, type: 2}
- {fileID: 11400000, guid: e7a9e1ec3854bc441a3baccbfe0ab88c, type: 2}
- {fileID: 11400000, guid: f28739c62eb7de7428c6a6bf536ee836, type: 2}
- {fileID: 11400000, guid: 09693fe24d6c1ef4c84eba09c68ab1e7, type: 2}
- {fileID: 11400000, guid: 4d99cea3393676849837d044c18df92e, type: 2}
- {fileID: 11400000, guid: b7e02c7a90dcb394891abe252e79fab7, type: 2}
- {fileID: 11400000, guid: 16a4ad4d15aa9a74f90ae19f1a5f3295, type: 2}
- {fileID: 11400000, guid: e708c99b2707b8f45996315fd5371a41, type: 2}
- {fileID: 11400000, guid: b32979c2652abc747876e31c8bb0009d, type: 2}
- {fileID: 11400000, guid: a0d815bc368d4a64ea57aa62df7bdc64, type: 2}
- {fileID: 11400000, guid: 6079275e8c19a3146b8b865ead8fd527, type: 2}
- {fileID: 11400000, guid: ccb5d401718ae9d44b10233cacb57ddf, type: 2}
- {fileID: 11400000, guid: 0f9ca3ad62ea2d545a7101caf12c70ca, type: 2}
- {fileID: 11400000, guid: dc5a3b3830fead44a8d79bc3edd0ec5e, type: 2}
- {fileID: 11400000, guid: 34e8ed462f131214b9750509a86703fe, type: 2}
- {fileID: 11400000, guid: 2e58242004d34d74c93659b526856796, type: 2}
- {fileID: 11400000, guid: 52cf89ed0e42c6a4fb43f16c734f632c, type: 2}
- {fileID: 11400000, guid: 212967ddd214852478334d4b69a3a9fb, type: 2}
- {fileID: 11400000, guid: df15488d88ede6c4bab042ebd4fbaaf0, type: 2}
- {fileID: 11400000, guid: d3a867064945f0046acb5d75504392ac, type: 2}
- {fileID: 11400000, guid: 72166967b05c45f439e8b605d567c407, type: 2}
- {fileID: 11400000, guid: 1e780abae2946384f8f6bd5ce1f0488e, type: 2}
- {fileID: 11400000, guid: ccb8d1320567c084b8b0208b5061a87d, type: 2}
- {fileID: 11400000, guid: 1535e1e10a1f97e4d96cade2d0f8feab, type: 2}
- {fileID: 11400000, guid: a9dcc5eec5e538d458a735716ede4643, type: 2}
- {fileID: 11400000, guid: 8f6ca474f85341c42b88ccf7c6657f44, type: 2}
- {fileID: 11400000, guid: 347bc010b36ab2c4b82c9c087a03a375, type: 2}
- {fileID: 11400000, guid: 4203bc5b13ae9dc4f8234a1802c06e2e, type: 2}
- {fileID: 11400000, guid: 43795a1cfbb56d747bfb7b9f48d840dd, type: 2}
- {fileID: 11400000, guid: 665befd42b770554a94ca09398c476e4, type: 2}
- {fileID: 11400000, guid: 908fdd01e68bee44ca9fc6dd6fef3cfc, type: 2}
- {fileID: 11400000, guid: 654be13ab88edc341bede805d55acc9b, type: 2}
- {fileID: 11400000, guid: 0b3fc46095ebdef4aa26788187d14595, type: 2}
- {fileID: 11400000, guid: b7e4767374acaf0488d1bfb93368da2d, type: 2}
- {fileID: 11400000, guid: b7c096a69a2784a4f96b5e2c58a5fe98, type: 2}
- {fileID: 11400000, guid: 17bb5b3519f06834884be7d1364eb91a, type: 2}
- {fileID: 11400000, guid: 15f97847515058943858159b714e7b24, type: 2}
- {fileID: 11400000, guid: 49d99cf3ed1225d40bf4f7e5fd2cd98b, type: 2}
- {fileID: 11400000, guid: 577eae29ba2df7246a03e3833cd8519d, type: 2}
- {fileID: 11400000, guid: 6a7c09dbc6e4192468be95cabeb26fbf, type: 2}
- {fileID: 11400000, guid: 3f98057d9994a2e4a8d0ec5440a90958, type: 2}
- {fileID: 11400000, guid: 91a64287c95a30148b2006752ae54704, type: 2}
- {fileID: 11400000, guid: 6c9bb38cfe5980245989e834385f7b2c, type: 2}
- {fileID: 11400000, guid: 16924b8ecf8bd1940902343766fc4cdc, type: 2}
- {fileID: 11400000, guid: b556ab3a4d3d2db4b89081d94cca006c, type: 2}
...@@ -57,6 +57,8 @@ public class PlayerController : MonoBehaviour ...@@ -57,6 +57,8 @@ public class PlayerController : MonoBehaviour
[SerializeField] [SerializeField]
private LayerMask itemLayer; private LayerMask itemLayer;
[SerializeField] [SerializeField]
private LayerMask portalLayer;
[SerializeField]
private float rayDistance; private float rayDistance;
[SerializeField] [SerializeField]
private IPlayerInteraction lastDropItem; private IPlayerInteraction lastDropItem;
...@@ -245,16 +247,29 @@ public class PlayerController : MonoBehaviour ...@@ -245,16 +247,29 @@ public class PlayerController : MonoBehaviour
bool GetItemRay() bool GetItemRay()
{ {
RaycastHit2D hit1 = Physics2D.Raycast(transform.position , Vector2.down, rayDistance, itemLayer); RaycastHit2D hit = Physics2D.Raycast(transform.position , Vector2.down, rayDistance, itemLayer);
Debug.DrawRay(transform.position , rayDistance * Vector2.down, Color.red);
if (hit1.collider != null) if (hit.collider != null)
{ {
IPlayerInteraction temp = hit1.collider.GetComponent<IPlayerInteraction>(); IPlayerInteraction temp = hit.collider.GetComponent<IPlayerInteraction>();
if (lastDropItem != null) lastDropItem.HighlightSwitch(false); if (lastDropItem != null) lastDropItem.HighlightSwitch(false);
if (temp != null) temp.HighlightSwitch(true); if (temp != null) temp.HighlightSwitch(true);
lastDropItem = temp; lastDropItem = temp;
} }
return hit1.collider != null; else
{
hit = Physics2D.Raycast(transform.position, Vector2.down, rayDistance, portalLayer);
if (hit.collider != null)
{
IPlayerInteraction temp = hit.collider.GetComponent<IPlayerInteraction>();
if (lastDropItem != null) lastDropItem.HighlightSwitch(false);
if (temp != null) temp.HighlightSwitch(true);
lastDropItem = temp;
}
}
return hit.collider != null;
} }
bool IsInRope() // Is player in rope? bool IsInRope() // Is player in rope?
{ {
......
...@@ -49,6 +49,7 @@ public class EnemyManager : Singleton<EnemyManager> ...@@ -49,6 +49,7 @@ public class EnemyManager : Singleton<EnemyManager>
{ {
GameObject clone = PickFromPool(enemy); GameObject clone = PickFromPool(enemy);
clone.transform.position = location.position; clone.transform.position = location.position;
clone.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
} }
} }
} }
......
...@@ -23,6 +23,8 @@ public class InventoryManager : MonoBehaviour { ...@@ -23,6 +23,8 @@ public class InventoryManager : MonoBehaviour {
SetPool(); SetPool();
ItemInstantiate("Dagger", player.transform.position, 0f);
StartCoroutine(TestCoroutine()); StartCoroutine(TestCoroutine());
} }
/// <summary> /// <summary>
...@@ -85,8 +87,6 @@ public class InventoryManager : MonoBehaviour { ...@@ -85,8 +87,6 @@ public class InventoryManager : MonoBehaviour {
IEnumerator TestCoroutine() IEnumerator TestCoroutine()
{ {
yield return null; yield return null;
yield return new WaitForSeconds(2.5f);
ItemInstantiate("Dagger", player.transform.position, 0f);
} }
...@@ -139,6 +139,7 @@ public class InventoryManager : MonoBehaviour { ...@@ -139,6 +139,7 @@ public class InventoryManager : MonoBehaviour {
{ {
GameObject tmpItem = Instantiate(droppedPrefab); GameObject tmpItem = Instantiate(droppedPrefab);
tmpItem.GetComponent<DroppedItem>().Init((Item)System.Activator.CreateInstance(System.Type.GetType(str)), pos); tmpItem.GetComponent<DroppedItem>().Init((Item)System.Activator.CreateInstance(System.Type.GetType(str)), pos);
tmpItem.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
PopoutGenerator(tmpItem, popoutStrength); PopoutGenerator(tmpItem, popoutStrength);
} }
/// <summary> /// <summary>
...@@ -150,6 +151,7 @@ public class InventoryManager : MonoBehaviour { ...@@ -150,6 +151,7 @@ public class InventoryManager : MonoBehaviour {
{ {
GameObject tmpItem = Instantiate(droppedPrefab); GameObject tmpItem = Instantiate(droppedPrefab);
tmpItem.GetComponent<DroppedItem>().Init(item, pos); tmpItem.GetComponent<DroppedItem>().Init(item, pos);
tmpItem.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
PopoutGenerator(tmpItem, popoutStrength); PopoutGenerator(tmpItem, popoutStrength);
} }
...@@ -175,6 +177,7 @@ public class InventoryManager : MonoBehaviour { ...@@ -175,6 +177,7 @@ public class InventoryManager : MonoBehaviour {
{ {
GameObject tmpItem = Instantiate(droppedPrefab); GameObject tmpItem = Instantiate(droppedPrefab);
tmpItem.GetComponent<DroppedItem>().Init((Addon)System.Activator.CreateInstance(System.Type.GetType(str)), pos); tmpItem.GetComponent<DroppedItem>().Init((Addon)System.Activator.CreateInstance(System.Type.GetType(str)), pos);
tmpItem.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
PopoutGenerator(tmpItem, popoutStrength); PopoutGenerator(tmpItem, popoutStrength);
} }
/// <summary> /// <summary>
...@@ -186,6 +189,7 @@ public class InventoryManager : MonoBehaviour { ...@@ -186,6 +189,7 @@ public class InventoryManager : MonoBehaviour {
{ {
GameObject tmpItem = Instantiate(droppedPrefab); GameObject tmpItem = Instantiate(droppedPrefab);
tmpItem.GetComponent<DroppedItem>().Init(addon, pos); tmpItem.GetComponent<DroppedItem>().Init(addon, pos);
tmpItem.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
PopoutGenerator(tmpItem, popoutStrength); PopoutGenerator(tmpItem, popoutStrength);
} }
......
...@@ -126,24 +126,28 @@ public class LifeStoneManager : MonoBehaviour { ...@@ -126,24 +126,28 @@ public class LifeStoneManager : MonoBehaviour {
public void InstantiateDroppedLifeStone(Vector2Int size, int num, float goldPer, int ameNum, Vector3 pos, float popoutStrength) public void InstantiateDroppedLifeStone(Vector2Int size, int num, float goldPer, int ameNum, Vector3 pos, float popoutStrength)
{ {
GameObject tmpObj = Instantiate(droppedLifeStonePrefab); GameObject tmpObj = Instantiate(droppedLifeStonePrefab);
tmpObj.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
tmpObj.GetComponent<DroppedLifeStone>().Init(CreateLifeStoneInfo(size, num, goldPer, ameNum), pos); tmpObj.GetComponent<DroppedLifeStone>().Init(CreateLifeStoneInfo(size, num, goldPer, ameNum), pos);
PopoutGenerator(tmpObj, popoutStrength); PopoutGenerator(tmpObj, popoutStrength);
} }
public void InstantiateDroppedLifeStone(Vector2Int size, float goldPer, int ameNum, Vector3 pos, float popoutStrength) public void InstantiateDroppedLifeStone(Vector2Int size, float goldPer, int ameNum, Vector3 pos, float popoutStrength)
{ {
GameObject tmpObj = Instantiate(droppedLifeStonePrefab); GameObject tmpObj = Instantiate(droppedLifeStonePrefab);
tmpObj.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
tmpObj.GetComponent<DroppedLifeStone>().Init(CreateLifeStoneInfo(size, goldPer, ameNum), pos); tmpObj.GetComponent<DroppedLifeStone>().Init(CreateLifeStoneInfo(size, goldPer, ameNum), pos);
PopoutGenerator(tmpObj, popoutStrength); PopoutGenerator(tmpObj, popoutStrength);
} }
public void InstantiateDroppedLifeStone(int num, float goldPer, int ameNum, Vector3 pos, float popoutStrength) public void InstantiateDroppedLifeStone(int num, float goldPer, int ameNum, Vector3 pos, float popoutStrength)
{ {
GameObject tmpObj = Instantiate(droppedLifeStonePrefab); GameObject tmpObj = Instantiate(droppedLifeStonePrefab);
tmpObj.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
tmpObj.GetComponent<DroppedLifeStone>().Init(CreateLifeStoneInfo(num, goldPer, ameNum), pos); tmpObj.GetComponent<DroppedLifeStone>().Init(CreateLifeStoneInfo(num, goldPer, ameNum), pos);
PopoutGenerator(tmpObj, popoutStrength); PopoutGenerator(tmpObj, popoutStrength);
} }
public void InstantiateDroppedLifeStone(LifeStoneInfo info, Vector3 pos, float popoutStrength) public void InstantiateDroppedLifeStone(LifeStoneInfo info, Vector3 pos, float popoutStrength)
{ {
GameObject tmpObj = Instantiate(droppedLifeStonePrefab); GameObject tmpObj = Instantiate(droppedLifeStonePrefab);
tmpObj.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
tmpObj.GetComponent<DroppedLifeStone>().Init(info, pos); tmpObj.GetComponent<DroppedLifeStone>().Init(info, pos);
PopoutGenerator(tmpObj, popoutStrength); PopoutGenerator(tmpObj, popoutStrength);
} }
......
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