Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Consistent opening brace style.

  • Loading branch information...
commit 500fb6b79fd5b10bf8aa65e636b3cea5c7fafd93 1 parent 35df550
@jorgenpt authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 PathMoveable/PathMoveable.cs
View
15 PathMoveable/PathMoveable.cs
@@ -26,7 +26,8 @@
[RequireComponent (typeof (CharacterController))]
[RequireComponent (typeof (Navigator))]
-public class PathMoveable : MonoBehaviour {
+public class PathMoveable : MonoBehaviour
+{
// Units per second.
public float speed = 10f;
@@ -41,7 +42,8 @@ public class PathMoveable : MonoBehaviour {
Waypoint currentWaypoint;
Vector3 currentDestination;
- void Update () {
+ void Update ()
+ {
if (currentPath != null)
{
Vector3 toDestination = (currentDestination - transform.position);
@@ -84,7 +86,8 @@ void ArrivedAtDestination ()
}
// Move to a given position.
- public void StartMovingTo (Vector3 position) {
+ public void StartMovingTo (Vector3 position)
+ {
if (shouldIgnoreHeightOfDestination)
position.y = transform.position.y;
@@ -92,12 +95,14 @@ void ArrivedAtDestination ()
}
// Stop moving completely.
- public void StopMoving () {
+ public void StopMoving ()
+ {
GetComponent<Navigator> ().targetPosition = transform.position;
currentPath = null;
}
- void OnNewPath (Path path) {
+ void OnNewPath (Path path)
+ {
if (path == null)
{
Debug.Log ("OnNewPath(null), stopping movement.");
Please sign in to comment.
Something went wrong with that request. Please try again.