Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

How to tell if an int is even

$
0
0
I am using playerprefs to check toggle input for an options menu. I want to tell if an int is even or odd. How would I do that? My script is: using System.Collections; public class test1 : MonoBehaviour { public int pp1; void Start () { //PlayerPrefs.DeleteAll (); PlayerPrefs.GetInt ("pplPref"); pp1 = PlayerPrefs.GetInt ("pplPref"); } void OnMouseDown() { { PlayerPrefs.SetInt ("pplPref", pp1 += 1); PlayerPrefs.GetInt ("pplPref"); pp1 = PlayerPrefs.GetInt ("pplPref"); } } } Thanks!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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