100coding
3/30/2017 - 12:32 PM

0AAAA477-56B3-449B-A843-22AE469982AC

0AAAA477-56B3-449B-A843-22AE469982AC

using UnityEngine;
using Zenject;

public class ShipInputHandler : MonoBehaviour
{
    [Inject] private float speed;

    public void Update()
    {
        if (Input.GetKey(KeyCode.UpArrow))
        {
            transform.position += Vector3.forward * this.speed * Time.deltaTime;
        }

        if (Input.GetKey(KeyCode.DownArrow))
        {
            transform.position -= Vector3.forward * this.speed * Time.deltaTime;
        }
    }
}