Quantcast
Channel: Answers for "if statement for 6 ints help C#"
Viewing all articles
Browse latest Browse all 4

Answer by hbalint1

$
0
0
after you calculated all the 6 integers and need to change scene, you should put all the 6 integers in an array. You can get the max values of them with: http://docs.unity3d.com/ScriptReference/Mathf.Max.html Aftre you got the max, you can change the scene for whichever you like. Like: public class SceneChange : MonoBehaviour { void OnTriggerEnter(Collider col) { if (col.tag == "Player") { int[] array = new int[] { neutral, direct, personalResponsibility, nurturing, distracting, damaging }; int max = Mathf.Max(array); Application.LoadLevel(max); } } }

Viewing all articles
Browse latest Browse all 4

Trending Articles



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