Quantcast
Channel: Questions in topic: "temporary"
Viewing all articles
Browse latest Browse all 97

Bool Temporary Variable in Enum c#

$
0
0
Hi there! Iv came across a small issue with one of my scripts. I have made a random level manipulator however I wish to make it more random. I know the logic behind this: make the last chosen equal to the temp variable and if the new one is that then pick another. However my random selector uses a enum array and everything in side it are Booleans... Here is my code: variables : `enum Manipss { upsideDown = 1 , screenShrink = 2 , bottomRising = 3 , topFalling = 0 } Manipss randomManip;` Selecting new manip every 15 sec: `InvokeRepeating("ManipCountdown", 0.0f, 15.0f);` selecting random manip: `randomManip = (Manipss)Random.Range(0, 4);` Thanks for any help and ideas to the issue! :)

Viewing all articles
Browse latest Browse all 97

Trending Articles



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