【发布时间】:2019-01-29 22:11:53
【问题描述】:
我正在制作一个关于一条鱼游到学校的小型无尽奔跑游戏,我想包含一个粒子系统,它可以复制气泡并指示它何时加速。为了让鱼游过障碍,他不断地往前走。但是,当我尝试通过脚本向前移动粒子生成器时,它不起作用。谁能告诉我为什么?
这是我的代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class motion : MonoBehaviour {
public float motionSpeed = 1f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Translate(motionSpeed / 10, 0, 0);
motionSpeed += motionSpeed / 7200;
}
}
【问题讨论】: