{"author_name":"Takachan","published":"2017-08-15 17:18:34","categories":["C++","Cocos2d-x"],"type":"rich","author_url":"https://blog.hatena.ne.jp/Takachan/","width":"100%","description":"Cocos2d-x\u306b\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u81ea\u4f53\u306b\u6a19\u6e96\u3067\u4e71\u6570\u3092\u53d6\u5f97\u3067\u304d\u308brandom\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002 \u81ea\u5206\u3067srand + rand \u3068\u304b\u3001mt19937\u3092\u81ea\u5206\u3067\u3057\u306a\u304f\u3066\u5927\u4e08\u592b\u3067\u3059\u3002\u4fbf\u5229\u306b\u4f7f\u3048\u308b\u3088\u3046\u306bUtility\u4f5c\u308b\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u4f7f\u3044\u65b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 // \u4f7f\u3044\u65b9 bool HelloWorld::init() { // ...\u7701\u7565... // 0\uff5eint\u6700\u5927\u5024\u307e\u3067\u306e\u4e71\u6570\u3092\u53d6\u5f97 int num = cocos2d::random(); // \u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u5185\u306e\u4e71\u6570\u3092\u53d6\u5f97 int scoped_num = cocos2d::random<int>(10, 20); } \u7bc4\u56f2\u6307\u5b9a\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u3067\u3001ra\u2026","title":"Cocos2d-x\u3067\u4e71\u6570\u3092\u53d6\u5f97\u3059\u308b","blog_url":"https://takap-tech.com/","provider_name":"Hatena Blog","blog_title":"PG\u65e5\u8a8c","height":"190","url":"https://takap-tech.com/entry/2017/08/15/171834","version":"1.0","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2017%2F08%2F15%2F171834\" title=\"Cocos2d-x\u3067\u4e71\u6570\u3092\u53d6\u5f97\u3059\u308b - PG\u65e5\u8a8c\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/T/Takachan/20170728/20170728135056.png"}