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 {
// 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 )
{
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)
{
......@@ -284,7 +293,6 @@ public class PlayerController : MonoBehaviour
if (lastLifeStone != null)
{
lastLifeStone.HighlightSwitch(false);
}
lastLifeStone = stoneTemp;
stoneTemp.HighlightSwitch(true);
......@@ -296,7 +304,6 @@ public class PlayerController : MonoBehaviour
if (lastDropItem != null)
{
lastDropItem.HighlightSwitch(false);
}
lastDropItem = temp;
temp.HighlightSwitch(true);
......@@ -334,7 +341,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