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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 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;
        }
    }
}

以上是关于csharp 0AAAA477-56B3-449B-A843-22AE469982AC的主要内容,如果未能解决你的问题,请参考以下文章