diff --git a/Assets/CableJointsAlgorithm.cs b/Assets/CableJointsAlgorithm.cs index a4a76a6..dfdc365 100644 --- a/Assets/CableJointsAlgorithm.cs +++ b/Assets/CableJointsAlgorithm.cs @@ -25,11 +25,11 @@ public static class CableJointsAlgorithm { totalDist += dist.distance; - Debug.Log(go.name+": l: +"+left+" r: -"+right); + //Debug.Log(go.name+": l: +"+left+" r: -"+right); } } - Debug.Log("Total distance for cable: "+totalDist); + //Debug.Log("Total distance for cable: "+totalDist); } } @@ -139,7 +139,7 @@ public static class CableJointsAlgorithm { var dist = circumference * delta; - Debug.Log(c.name+": angle1: "+angle1+" angle2: "+angle2+" -> delta: "+delta+" circumferecne: "+circumference+" dist: "+dist); + //Debug.Log(c.name+": angle1: "+angle1+" angle2: "+angle2+" -> delta: "+delta+" circumferecne: "+circumference+" dist: "+dist); return (float) dist; } } \ No newline at end of file diff --git a/Assets/Controller.cs b/Assets/Controller.cs index e77b94a..65c8a0e 100644 --- a/Assets/Controller.cs +++ b/Assets/Controller.cs @@ -126,6 +126,15 @@ public class Controller : MonoBehaviour { private float waitedFrames = 0; // Update is called once per frame void Update() { + if (Input.GetKeyDown(KeyCode.T)) { + foreach (var go in FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None)) { + if (go.GetComponent() != null && go.GetComponent().movement == RollerProperties.RotationType.Powered) { + go.GetComponent().useMotor = !go.GetComponent().useMotor; + Debug.Log("TOGGLED ALL MOTORS"); + } + } + } + if (waitedFrames++ > -1) { CableJointsAlgorithm.TimeStep(cables); waitedFrames = 0;