Commit 34a8216b authored by Ashley N Crouch's avatar Ashley N Crouch

Merge branch 'movingWater' into 'master'

Moving water

See merge request !23
parents 0d90c74c 016c357d
......@@ -18,7 +18,7 @@ public class HeroAttackController : MonoBehaviour {
switch (currentAbility)
{
case ability.fireball:
Debug.Log("fireball");
//Debug.Log("fireball");
break;
default:
Debug.Log("default");
......
......@@ -6,25 +6,18 @@ public class HeroMobility : MonoBehaviour {
private Rigidbody2D playerRB;
Animator anim;
// Use this for initialization
void Start () {
playerRB = GetComponent<Rigidbody2D> ();
anim = GetComponent<Animator> ();
}
// Update is called once per frame
void Update () {
void FixedUpdate () {
Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
playerMove (input);
}
void playerMove (Vector2 input){
//Controls hero movement in all 8 directions
playerRB.MovePosition((Vector2)transform.position + input*playerSpeed);
}
}
fileFormatVersion: 2
guid: 1da59afcee6825e45ba4c40317549cd6
timeCreated: 1477613638
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
m_EditorVersion: 5.3.2f1
m_StandardAssetsVersion: 0
m_EditorVersion: 5.3.5f1
m_StandardAssetsVersion: 0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment