title: 2D Movement for 4 directions only working left/right
body: <p>I have problem I want to make my player move in 4 directions: UP,DOWN,LEFT AND RIGHT ... here is my script </p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class MovingPlayer : MonoBehaviour {
  
  float speed = 4f;
  
  // Update is called once per frame
  void Update () {
  
      if (Input.GetKey (KeyCode.A)) {
          transform.Translate(Vector2.right * speed * Time.deltaTime);    
      }
      else if (Input.GetKey (KeyCode.D)) {
          transform.Translate(-Vector2.right * speed * Time.deltaTime);   
      }
      else if (Input.GetKey (KeyCode.W)) {
          transform.Translate(Vector2.up * speed * Time.deltaTime);
      }
      else if (Input.GetKey (KeyCode.S)) {
          transform.Translate(-Vector2.up * speed * Time.deltaTime);  
      }
    }
  }
  </code></pre>
  
  <p>And it is working just for left and right , not up and down !? </p>