Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

How do you stop using If statements?

$
0
0
Hey guys!

So I am kinda practicing C# now, and I wonder if there is any better way to use rather than using so many if statements? I use different classes, but my script mostly looks like this which I find annoying:
http://gyazo.com/eb756b787e3fab5fa65c68cce210da01

For example, I am making a player movement script and I cannot stop using if statements all over the place, and I really can not come up with something more unique than that. I'd really appreciate if you got any...

How do you stop using If statements?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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