Commit 0bf5fc3c authored by astatham's avatar astatham
Browse files

Implemented pie limit

parent 76355526
......@@ -12,16 +12,20 @@ public class Needle : MonoBehaviour {
void Update()
{
if (PieManager.pieCount > 0)
{
if (Input.GetKeyDown("space"))
{
finalAngle = currentAngle;
angleChangeSpeed = 0;
PowerBar.previousPos = -9f;
} else if (!Input.GetKey("space")){
}
else if (!Input.GetKey("space"))
{
MoveNeedle();
}
}
}
public void MoveNeedle()
{
......
......@@ -10,8 +10,8 @@ public class PieManager : MonoBehaviour {
private void Update()
{
/*if (pieCount > 0 && !pieInScene && !start){
Needle.ResetAngles();
}*/
if(pieCount == 0){
return;
}
}
}
......@@ -39,7 +39,7 @@ public class PowerBar : MonoBehaviour {
currentPos += (posChangeSpeed * Time.deltaTime);
}
if (Input.GetKeyUp("space"))
if (Input.GetKeyUp("space") && PieManager.pieCount > 0)
{
finalPos = currentPos;
previousPos = currentPos;
......
Supports Markdown
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