Skip to content

Commit

Permalink
Fixes for changes made in the API
Browse files Browse the repository at this point in the history
  • Loading branch information
reapazor committed Oct 3, 2014
1 parent 442f858 commit 350760a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Examples/Components/Input/Source/InputExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ void OnGUI ()
/// <param name="inputEvent">Event Type</param>
/// <param name="inputValue">The value associated with the event.</param>
/// <param name="inputTime">The duration value associated with the event.</param>
void OnRotate (Hydrogen.Peripherals.InputEvent inputEvent, float inputValue, float inputTime)
void OnRotate (Hydrogen.Peripherals.InputEvent inputEvent, Vector2 inputValue, float inputTime)
{
// Mouse X Axes are relative movements only.
// So we only turn the turret - never directly set the rotation.
TowerObject.transform.localRotation *= Quaternion.AngleAxis (inputValue * 180.0f * Time.deltaTime, Vector3.up);
TowerObject.transform.localRotation *= Quaternion.AngleAxis (inputValue.x * 180.0f * Time.deltaTime, Vector3.up);
}

/// <summary>
Expand All @@ -140,7 +140,7 @@ void OnRotate (Hydrogen.Peripherals.InputEvent inputEvent, float inputValue, flo
/// <param name="inputEvent">Event Type.</param>
/// <param name="inputValue">The value associated with the event.</param>
/// <param name="inputTime">The duration value associated with the event.</param>
void OnShoot (Hydrogen.Peripherals.InputEvent inputEvent, float inputValue, float inputTime)
void OnShoot (Hydrogen.Peripherals.InputEvent inputEvent, Vector2 inputValue, float inputTime)
{
// Only fire on release
if (inputEvent == Hydrogen.Peripherals.InputEvent.Released) {
Expand All @@ -161,12 +161,12 @@ _prefabIDs [Random.Range (0, _prefabIDs.Length)],
/// <param name="inputEvent">Event Type.</param>
/// <param name="inputValue">The value associated with the event.</param>
/// <param name="inputTime">The duration value associated with the event.</param>
void OnMove (Hydrogen.Peripherals.InputEvent inputEvent, float inputValue, float inputTime)
void OnMove (Hydrogen.Peripherals.InputEvent inputEvent, Vector2 inputValue, float inputTime)
{
// Vertical Axes give it's state of absolute values of -1.0, 1.0 only.
// So this is used to move the box along it's looking direction (horizontal). This will handle forward
// and backward movement in one go.
transform.transform.position += (transform.TransformDirection (Vector3.left) * inputValue * 10.0f) * Time.deltaTime;
transform.transform.position += (transform.TransformDirection (Vector3.left) * inputValue.y * 10.0f) * Time.deltaTime;
}

/// <summary>
Expand All @@ -175,11 +175,11 @@ void OnMove (Hydrogen.Peripherals.InputEvent inputEvent, float inputValue, float
/// <param name="inputEvent">Event Type.</param>
/// <param name="inputValue">The value associated with the event.</param>
/// <param name="inputTime">The duration value associated with the event.</param>
void OnTurn (Hydrogen.Peripherals.InputEvent inputEvent, float inputValue, float inputTime)
void OnTurn (Hydrogen.Peripherals.InputEvent inputEvent, Vector2 inputValue, float inputTime)
{
// Horizontal Axes give it's state of absolute values of -1.0, 1.0 only.
// We normalised this to a steering range, then use this to turn the tank.
transform.transform.localRotation *= Quaternion.AngleAxis (inputValue * 90.0f * Time.deltaTime, Vector3.up);
transform.transform.localRotation *= Quaternion.AngleAxis (inputValue.x * 90.0f * Time.deltaTime, Vector3.up);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Examples/Components/Web Pool/Source/MailChimpExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class MailChimpExample : MonoBehaviour
/// <param name="hash">Call Hash.</param>
/// <param name="responseHeaders">Web Response Haders.</param>
/// <param name="responseText">Web Response Payload.</param>
public void MailChimpCallback (int hash, Hashtable responseHeaders, string responseText)
public void MailChimpCallback (int hash, System.Collections.Generic.Dictionary<string, string> responseHeaders, string responseText)
{
// Look we got something back, better say something in the console.
hDebug.Log ("Return from WebCall (" + hash + ") ... ");
Expand Down

0 comments on commit 350760a

Please sign in to comment.