Quantcast
Channel: Questions in topic: "invokerepeating"
Viewing all articles
Browse latest Browse all 220

SNAKE - How to change InvokeRepeating rate?

$
0
0
Hi this is the start function attached to my snake: void Start() { InvokeRepeating("Move", 0.3f, repeatRate); score = 0; SetScoreText(); textYouLose.text = ""; } i wish to change the repeat rate every 5 points (or every time the snake eats 5 pieces of food) I've tought something like if(score % 5 == 0) { repeatRate /= 2; } but it doen't work! Any idea? thanks

Viewing all articles
Browse latest Browse all 220

Latest Images

Trending Articles



Latest Images

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