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

Merge remote-tracking branch 'tetra-tower/inter' into LifeStone

parents 54f42ad9 8509e01b
...@@ -14,13 +14,13 @@ public class Player : MonoBehaviour { ...@@ -14,13 +14,13 @@ public class Player : MonoBehaviour {
// Use this for initialization // Use this for initialization
void Start () { void Start () {
ttx = (int)(transform.position.x / 24f); ttx = (int)(transform.position.x / 24f);
tty = (int)(transform.position.y / 24f); tty = (int)(transform.position.y-0.9f / 24f);
} }
// Update is called once per frame // Update is called once per frame
void Update () { void Update () {
tx = (int)(transform.position.x / 24f); tx = (int)(transform.position.x / 24f);
ty = (int)(transform.position.y / 24f); ty = (int)(transform.position.y-0.9f / 24f);
if ((ttx != tx || tty != ty) && MapManager.isRoomFalling != true) if ((ttx != tx || tty != ty) && MapManager.isRoomFalling != true)
{ {
MapManager.tempRoom = MapManager.mapGrid[tx, ty]; MapManager.tempRoom = MapManager.mapGrid[tx, ty];
......
...@@ -96,11 +96,20 @@ public class PlayerController : MonoBehaviour ...@@ -96,11 +96,20 @@ public class PlayerController : MonoBehaviour
rb.gravityScale = rbAttackGravityScale; rb.gravityScale = rbAttackGravityScale;
return; return;
} }
if (GetItemRay() == false && lastDropItem!=null) if (GetItemRay() == false )
{ {
lastDropItem.HighlightSwitch(false); if (lastDropItem != null)
lastDropItem = null; {
lastDropItem.HighlightSwitch(false);
lastDropItem = null;
}
if (lastLifeStone != null)
{
lastLifeStone.HighlightSwitch(false);
lastLifeStone = null;
}
} }
if (interaction != 1f) interactionCoolDown = true; if (interaction != 1f) interactionCoolDown = true;
if (lastDropItem!=null && interaction == 1f &&interactionCoolDown) if (lastDropItem!=null && interaction == 1f &&interactionCoolDown)
{ {
...@@ -284,7 +293,6 @@ public class PlayerController : MonoBehaviour ...@@ -284,7 +293,6 @@ public class PlayerController : MonoBehaviour
if (lastLifeStone != null) if (lastLifeStone != null)
{ {
lastLifeStone.HighlightSwitch(false); lastLifeStone.HighlightSwitch(false);
} }
lastLifeStone = stoneTemp; lastLifeStone = stoneTemp;
stoneTemp.HighlightSwitch(true); stoneTemp.HighlightSwitch(true);
...@@ -296,7 +304,6 @@ public class PlayerController : MonoBehaviour ...@@ -296,7 +304,6 @@ public class PlayerController : MonoBehaviour
if (lastDropItem != null) if (lastDropItem != null)
{ {
lastDropItem.HighlightSwitch(false); lastDropItem.HighlightSwitch(false);
} }
lastDropItem = temp; lastDropItem = temp;
temp.HighlightSwitch(true); temp.HighlightSwitch(true);
...@@ -334,7 +341,7 @@ public class PlayerController : MonoBehaviour ...@@ -334,7 +341,7 @@ public class PlayerController : MonoBehaviour
} }
}*/ }*/
return hit1.collider != null ; return hit1.collider != null;
} }
bool IsInRope() // Is player in rope? bool IsInRope() // Is player in rope?
{ {
......
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