第一个脚本: using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WallsTest : MonoBehaviour
{
public enum WallsInfo
{
Position, Length
};
我在下面的代码中只使用Quad创建滚动背景。我的问题是如何在一段时间后停止滚动背景。例如,我希望在我的滚动图像结束后,锁定最后一个可见部分作为关卡其余部分的背景。由于我的播放器速度不变,因此我想象了这样的事情:大概20秒后,停止滚动并保持图像成为可能。我对Unity非常陌生,我不确定如何去做,也没有找到一种可行的方法。我将不胜感激帮助! using System.Collections;
usi
“得分:”没有在统一ide.I上显示,我尝试了很多,似乎没有任何工作,没有得到预期的输出。Thankyou.Sry for bad English。 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class uiMana
我想将我的球员破坏怪物创建相同的游戏物体和我第一次摧毁一个怪物,我有以下错误: MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is nu
找到了如何做到这一点,但它为什么这么快?我怎样才能让它移动得慢很多?试图改变速度为0.3f,而不是20,但仍然太快。 也许不使用Vector3.Lerp,但翻译? 我希望能够控制从非常缓慢的速度,即使是0也不会像现在这样非常快地移动。 using System;
using System.Collections;
using System.Collections.Generic;
using
在脚本的顶部: public Vector3[] positionsList;
List<Vector3> positions = new List<Vector3>();
在更新:我更新列表中,但我也想更新数组,所以我可以在游戏运行过程中,检查人员看的Vector3位置。 var position = GenerateRandomPositions(objects[0]);