【发布时间】:2016-08-31 05:56:24
【问题描述】:
我正在制作一个统一的俄罗斯方块游戏,但这段代码并没有产生我的俄罗斯方块。我已将我的游戏对象分配给 group[] 数组。
这是我的代码:
using UnityEngine;
using System.Collections;
public class Spawner1 : MonoBehaviour {
public GameObject[] group;
void start(){
SpawnNext ();
}
void SpawnNext(){
Instantiate(group[Random.Range(0,group.Length)],new Vector2(5.0f,10.0f),Quaternion.identity);
}
}
【问题讨论】:
-
对于明显拼写错误的问题,请在 Off Topic > Typo/Not Reproducible 的原因下投票关闭。