Quantcast
Channel: Latest Questions by Abelabumba
Browsing all 6 articles
Browse latest View live

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


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


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

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

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


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
Browsing all 6 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>