子弹飞行-unity

2020-06-26  本文已影响0人  _Pman
    public int damage=50;
    public float speed = 40;
    private Transform target;

    public void SetTarget(Transform _target)
    {
        this.target = _target;
    }
    private void Update()
    {
        transform.LookAt(target);
        transform.Translate(Vector3.forward * Time.deltaTime * speed);
    }
上一篇 下一篇

猜你喜欢

热点阅读