Permalink
Browse files

Consistent opening brace style.

  • Loading branch information...
1 parent 35df550 commit 500fb6b79fd5b10bf8aa65e636b3cea5c7fafd93 @jorgenpt committed Apr 21, 2012
Showing with 10 additions and 5 deletions.
  1. +10 −5 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,20 +86,23 @@ void ArrivedAtDestination ()
}
// Move to a given position.
- public void StartMovingTo (Vector3 position) {
+ public void StartMovingTo (Vector3 position)
+ {
if (shouldIgnoreHeightOfDestination)
position.y = transform.position.y;
GetComponent<Navigator> ().targetPosition = position;
}
// 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.");

0 comments on commit 500fb6b

Please sign in to comment.