官术网_书友最值得收藏!

Challenge

As an added challenge, you can turn this into a die simulator. Try on your own to have the script display a random number from 1-6. You can, instead of displaying text, display an image of a die face. Also, see if you can display the image and store the random number corresponding to the die face for reference.

You can also try changing the seed to a number of your choice. If you play the scene with a constant number, you will get the same result every time. Try different numbers for different results. This is the benefit of the seed value; even though we are introducing a bit of randomness to our game, we have a way to control it. We will explore the seed value further in a later chapter.

主站蜘蛛池模板: 海南省| 金华市| 贡嘎县| 鄱阳县| 禹城市| 通许县| 平邑县| 论坛| 佛坪县| 新竹县| 双流县| 辽宁省| 衢州市| 崇阳县| 栾川县| 鹤岗市| 万山特区| 石棉县| 建德市| 眉山市| 牡丹江市| 盐边县| 宜兰县| 南召县| 晋州市| 福建省| 湘阴县| 木里| 池州市| 南部县| 水城县| 白玉县| 岳池县| 光山县| 德兴市| 大英县| 瓮安县| 吐鲁番市| 林口县| 广汉市| 大新县|