0
所以我有函數產生隨機的例子,但我需要這個函數也是隨機的。在此先感謝;)隨機函數
public void generateExample()
{
x = Random.Range(0, 10);
y = Random.Range(0, 10 - x);
_text.GetComponent<TextMesh>().text = x.ToString() + " + " + y.ToString() + " =";
resultNum = x + y;
}
public void generateExample2()
{
x = Random.Range(0, 10);
y = Random.Range(0, x);
_text.GetComponent<TextMesh>().text = x.ToString() + " - " + y.ToString() + " =";
resultNum = x - y;
}
ü要隨機撥打這兩個功能?請calarify –
這有可能幫助你嗎? http://stackoverflow.com/questions/1785744/how-do-i-seed-a-random-class-to-avoid-getting-duplicate-random-values – Tal
是的,我想這兩個函數是隨機的 – SoManyQuestions