Commit 8509e01b authored by abpo11's avatar abpo11

플레이어 방 좌표 및 생명석 하이라이트 고침

parent f3bc76e6
......@@ -14,13 +14,13 @@ public class Player : MonoBehaviour {
// Use this for initialization
void Start () {
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
void Update () {
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)
{
MapManager.tempRoom = MapManager.mapGrid[tx, ty];
......
......@@ -96,11 +96,20 @@ public class PlayerController : MonoBehaviour
rb.gravityScale = rbAttackGravityScale;
return;
}
if (GetItemRay() == false && lastDropItem!=null)
if (GetItemRay() == false )
{
lastDropItem.HighlightSwitch(false);
lastDropItem = null;
if (lastDropItem != null)
{
lastDropItem.HighlightSwitch(false);
lastDropItem = null;
}
if (lastLifeStone != null)
{
lastLifeStone.HighlightSwitch(false);
lastLifeStone = null;
}
}
if (interaction != 1f) interactionCoolDown = true;
if (lastDropItem!=null && interaction == 1f &&interactionCoolDown)
{
......@@ -288,7 +297,6 @@ public class PlayerController : MonoBehaviour
if (lastLifeStone != null)
{
lastLifeStone.HighlightSwitch(false);
}
lastLifeStone = stoneTemp;
stoneTemp.HighlightSwitch(true);
......@@ -300,7 +308,6 @@ public class PlayerController : MonoBehaviour
if (lastDropItem != null)
{
lastDropItem.HighlightSwitch(false);
}
lastDropItem = temp;
temp.HighlightSwitch(true);
......@@ -338,7 +345,7 @@ public class PlayerController : MonoBehaviour
}
}*/
return hit1.collider != null ;
return hit1.collider != null;
}
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