Quantcast
Channel: Latest Questions by Abelabumba
Browsing index pages (6 articles)

Random.Range(0f, 10f) neither 5.5f, why/how?

while (winner == "no") { bool fighterPassed = false; bool plotPassed = false; if (Random.Range(0f, 10f) >= 5.5f) { Debug.Log("higher!"); winner = "CPU"; return winner; } else if (Random.Range(0f,...

View Article


How to access Instantiated GameObject's attached script's values?

I have a CrewSpawner.cs to instantiate crews available to hire, which works. crew = Instantiate(prefab) as GameObject; crew.name = "crew1"; The crews have a prefab with a component CrewStats.cs: using...

View Article


Which is better, lots of if-statements or seperate button scripts?

So I'm working on a minigame that is entirely UI driven, I use buttons with gameObject.SetActive to show and hide different menus. Currently those buttons all use the same ButtonScript with public void...

View Article

Random.Range(0f, 10f) neither 5.5f, why/how?

while (winner == "no") { bool fighterPassed = false; bool plotPassed = false; if (Random.Range(0f, 10f) >= 5.5f) { Debug.Log("higher!"); winner = "CPU"; return winner; } else if (Random.Range(0f,...

View Article

How to access Instantiated GameObject's attached script's values?

I have a CrewSpawner.cs to instantiate crews available to hire, which works. crew = Instantiate(prefab) as GameObject; crew.name = "crew1"; The crews have a prefab with a component CrewStats.cs: using...

View Article


Which is better, lots of if-statements or seperate button scripts?

So I'm working on a minigame that is entirely UI driven, I use buttons with gameObject.SetActive to show and hide different menus. Currently those buttons all use the same ButtonScript with public void...

View Article
Browsing index pages (6 articles)


Latest Images