Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (control.AbilityWorld(player))
     {
         //if(!world.isRotating()) {
         world.rotateToAngle(control.Slope(player));
         //}
     }
     if (control.AbilityGravity(player))
     {
         //if(!world.isGravitating()) {
         float   angle   = (control.Slope(player) * 2 * Mathf.PI) / 360;
         Vector3 gravity = new Vector3(Mathf.Sin(angle), -Mathf.Cos(angle), 0);
         world.gravitateToAngle(gravity);
         //}
     }
 }