Quantcast
Channel: Answers for "Mutator method to change multiple bool variables?"
Browsing all 4 articles
Browse latest View live

Answer by Mikea15

Hi. Can't you just pass it as a bool parameter?? public void changeBoolean( bool boolName ) { // if negative => sets to positive. vice versa. boolName = !boolName; }

View Article


Answer by Related Sloth

Sorry for the poorly explained question. The solution was very simple once I had another look at the unity manual. Simply globalStats.GetComponent().situation1 = true; No use of mutator methods...

View Article


Answer by Mikea15

Hi. Can't you just pass it as a bool parameter?? public void changeBoolean( bool boolName ) { // if negative => sets to positive. vice versa. boolName = !boolName; }

View Article

Answer by Related-Sloth

Sorry for the poorly explained question. The solution was very simple once I had another look at the unity manual. Simply globalStats.GetComponent().situation1 = true; No use of mutator methods...

View Article
Browsing all 4 articles
Browse latest View live


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