Commit b079a9ae authored by Mitchie Maluschnig's avatar Mitchie Maluschnig
Browse files

character dance a little less obtrusive(just simple stuff for alpha)

parent 8503d4e3
......@@ -37,25 +37,33 @@ public class TriggerManager : MonoBehaviour
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
moveColliders((int)keys.left);
player.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 90f));
Vector3 newScale = player.transform.localScale;
newScale.x = -2;
player.transform.localScale = newScale;
checkLowestKey();
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
moveColliders((int)keys.right);
player.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 270f));
Vector3 newScale = player.transform.localScale;
newScale.x = 2;
player.transform.localScale = newScale;
checkLowestKey();
}
if (Input.GetKeyDown(KeyCode.UpArrow))
{
player.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 0f));
moveColliders((int)keys.up);
Vector3 newPos = player.transform.position;
newPos.y = -1;
player.transform.position = newPos;
checkLowestKey();
}
if (Input.GetKeyDown(KeyCode.DownArrow))
{
player.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 180f));
moveColliders((int)keys.down);
Vector3 newPos = player.transform.position;
newPos.y = -1.3f;
player.transform.position = newPos;
checkLowestKey();
}
......@@ -92,19 +100,27 @@ public class TriggerManager : MonoBehaviour
//Check which key the player presses
if (arrow == "Left")
{
mime.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 90f));
Vector3 newScale = mime.transform.localScale;
newScale.x = -2;
mime.transform.localScale = newScale;
}
if (arrow == "Right")
{
mime.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 270f));
Vector3 newScale = mime.transform.localScale;
newScale.x = 2;
mime.transform.localScale = newScale;
}
if (arrow == "Up")
{
mime.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 0f));
Vector3 newPos = mime.transform.position;
newPos.y = -0.6f;
mime.transform.position = newPos;
}
if (arrow == "Down")
{
mime.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 180f));
Vector3 newPos = mime.transform.position;
newPos.y = -0.9f;
mime.transform.position = newPos;
}
}
......
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