csharp 9F3D4C02-FAB3-4F23-B478-741C01816893

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 9F3D4C02-FAB3-4F23-B478-741C01816893相关的知识,希望对你有一定的参考价值。

using UnityEngine;
using Zenject;

public class GameRunner : ITickable
{
    [Inject] private Ship.Factory ship_factory;

    private Vector3 last_ship_position;

    public void Tick()
    {
        if (!Input.GetKeyDown(KeyCode.Space)) return;

        var ship = this.ship_factory.Create();

        this.last_ship_position += Vector3.forward * 2;
        ship.transform.position = this.last_ship_position;
    }
}

以上是关于csharp 9F3D4C02-FAB3-4F23-B478-741C01816893的主要内容,如果未能解决你的问题,请参考以下文章

csharp 3E4EE67A-10A0-451F-9F78-F3FE446527E7

csharp D156D8FF-410E-4C4D,95D0-6341388191F9

csharp 536E8763-3198-483B-8EDE-991EB783B4C2

csharp 431CAA3C-9F87-44B9-BB45-085F62ECFD81

csharp 86737ED4-320E-419F-9F3C-F8EED00BFD5B

csharp 79C13846-EE97-4580-A34A-35B2065F4C16