Skip to content

Commit

Permalink
Tiny tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaythakkar committed Oct 30, 2014
1 parent 70f4b4f commit e7d86a1
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 27 deletions.
9 changes: 5 additions & 4 deletions jollyplatformer/Assets/Editor/JollyDebugInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
using UnityEngine;
using Jolly;

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor {

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor
{

public override void OnInspectorGUI()
{
JollyDebug jollyDebug = (JollyDebug)this.target;
Expand All @@ -31,7 +32,7 @@ private void DisplayExpressions (JollyDebug jollyDebug)
}
}
}

public override bool RequiresConstantRepaint ()
{
return true;
Expand Down
5 changes: 3 additions & 2 deletions jollyplatformer/Assets/Scripts/Hero.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ void Start ()
{
this.HeroController = this.GetComponent<HeroController>();

JollyDebug.Watch (this, "FacingRight", delegate () {
JollyDebug.Watch (this, "FacingRight", delegate ()
{
return this.FacingRight;
});
}

void Update ()
{
bool grounded = Physics2D.Linecast(this.transform.position, this.GroundDetector.transform.position, 1 << LayerMask.NameToLayer ("Ground"));
Expand Down
3 changes: 2 additions & 1 deletion jollyplatformer/Assets/Scripts/ParallaxEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ void Start ()
this.OriginalPosition = this.transform.position;
}

private Vector3 LerpToParallaxFactorUnclamped (Vector3 from, Vector3 to) {
private Vector3 LerpToParallaxFactorUnclamped (Vector3 from, Vector3 to)
{
float value = this.ParallaxFactor;
return (1.0f - value)*from + value*to;
}
Expand Down
9 changes: 5 additions & 4 deletions jollytopdown/Assets/Editor/JollyDebugInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
using UnityEngine;
using Jolly;

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor {

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor
{

public override void OnInspectorGUI()
{
JollyDebug jollyDebug = (JollyDebug)this.target;
Expand All @@ -31,7 +32,7 @@ private void DisplayExpressions (JollyDebug jollyDebug)
}
}
}

public override bool RequiresConstantRepaint ()
{
return true;
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions jollytopdown/Assets/Scripts/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ void Start ()
{
this.PlayerController = this.GetComponent<PlayerController>();

JollyDebug.Watch (this, "IsOnGround", delegate () {
JollyDebug.Watch (this, "IsOnGround", delegate ()
{
return this.IsOnGround;
});
}

void Update ()
{
Ray ray = new Ray(this.transform.position, Vector3.down);
Expand All @@ -50,7 +51,7 @@ void FixedUpdate ()
if (Mathf.Abs(this.rigidbody.velocity.x) > maxSpeedX)
{
this.rigidbody.velocity = new Vector3(Mathf.Sign (this.rigidbody.velocity.x) * maxSpeedX, this.rigidbody.velocity.y, this.rigidbody.velocity.z);
}
}

float maxSpeedZ = Mathf.Abs (this.MaxSpeed * v);
if (Mathf.Abs(this.rigidbody.velocity.z) > maxSpeedZ)
Expand Down
9 changes: 5 additions & 4 deletions jollytouch/Assets/Editor/JollyDebugInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
using UnityEngine;
using Jolly;

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor {

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor
{

public override void OnInspectorGUI()
{
JollyDebug jollyDebug = (JollyDebug)this.target;
Expand All @@ -31,7 +32,7 @@ private void DisplayExpressions (JollyDebug jollyDebug)
}
}
}

public override bool RequiresConstantRepaint ()
{
return true;
Expand Down
7 changes: 3 additions & 4 deletions jollytouch/Assets/Scripts/TouchInputDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

public class TouchInputDispatcher : MonoBehaviour
{
void Start ()
{

// Use this for initialization
void Start () {

}

void Update ()
{
foreach (Touch touch in Input.touches)
Expand Down
9 changes: 5 additions & 4 deletions template/Assets/Editor/JollyDebugInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
using UnityEngine;
using Jolly;

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor {

[CustomEditor(typeof(JollyDebug))]
public class JollyDebugInspector : Editor
{

public override void OnInspectorGUI()
{
JollyDebug jollyDebug = (JollyDebug)this.target;
Expand All @@ -31,7 +32,7 @@ private void DisplayExpressions (JollyDebug jollyDebug)
}
}
}

public override bool RequiresConstantRepaint ()
{
return true;
Expand Down
3 changes: 2 additions & 1 deletion template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Example of a 'pull'-type watch:
```
void Start ()
{
JollyDebug.Watch (this, "Location", delegate () {
JollyDebug.Watch (this, "Location", delegate ()
{
return this.gameObject.transform.position.ToString();
});
}
Expand Down

0 comments on commit e7d86a1

Please sign in to comment.