You don't need to use another method call to get an integer, you can use the string "0" as the argument for ToString(), ie ToString("0"). If you want one decimal place you'd use "0.0" and so on. You don't really want to use RoundToInt() in your case as it will be awarding distance half a foot before they get there. eg It will display 3ft when they really only have 2.5ft. Other example ways you could achieve a correct score are casting to integer, and your right side becomes ((int)distance).ToString(), or using the floor function via Mathf.FloorToInt(distance).ToString() Also, 15:03 I highly recommend keeping gameScript as a property in your class rather than scriptObject so that you can access it directly on line 20, as you don't want to be calling GetComponent() every frame since it's an expensive function, plus I'm not sure why you're using another expensive function Find() when you could just assign scriptObject by hand in the editor like you did for the rest Great job man keep up the good work! :)
TNT Logo! 0:06
0:38 Madison Is Like Why Am I Here?
I like It but cars Is my favorate movie! :-)
Ini lah tirui oleh movie cars tu
goofy Gif
There is no reason to do this, and your jump is terrible, if youre a beginner please don't make tutorials
Why don't You use collider to do this?
You don't need to use another method call to get an integer, you can use the string "0" as the argument for ToString(), ie ToString("0"). If you want one decimal place you'd use "0.0" and so on. You don't really want to use RoundToInt() in your case as it will be awarding distance half a foot before they get there. eg It will display 3ft when they really only have 2.5ft. Other example ways you could achieve a correct score are casting to integer, and your right side becomes ((int)distance).ToString(), or using the floor function via Mathf.FloorToInt(distance).ToString() Also, 15:03 I highly recommend keeping gameScript as a property in your class rather than scriptObject so that you can access it directly on line 20, as you don't want to be calling GetComponent() every frame since it's an expensive function, plus I'm not sure why you're using another expensive function Find() when you could just assign scriptObject by hand in the editor like you did for the rest Great job man keep up the good work! :)
Cool
Anthony sounds good
Mista cworban
Awesome
YOU HAVE SLANDERED THE NAME OF MINECRAFT STEVE. SHAME ON YOU.