LoginSignup
4
3

More than 3 years have passed since last update.

Cocos Creator のチュートリアルをTypeScriptで書き直してみた

Posted at

概要

https://docs.cocos2d-x.org/creator/manual/en/getting-started/quick-start.html
Cocos Creatorのquick start(チュートリアル) は2019年5月3日時点でJSのしかないようだったので勉強がてらTypeScriptで書き直しながらやってみた。

手法

基本は本家の方を見た方がいいが英語が苦手な方は以下で日本語の翻訳されていたりするのでこちらもオススメです!
https://qiita.com/hirodragon/items/aa73490b52ec4ca7f5ec
ただし上記の記事よりCocos Creatoorのバージョンがあがっているため最新だと動かない部分があります。cc.random0To1などの乱数系が最新だと廃止されているので最新のチュートリアルだとMath.random()を使ったものに変わっています。

Cocos CreatorでのTypeScriptの使い方は下記の公式のものを見るのがオススメです。
https://docs.cocos2d-x.org/creator/manual/en/scripting/typescript.html

他書き方で迷うようなことがあれば以下のリポジトリに書き直したものをあげたのでご活用ください。
Cocos Creatorのバージョンは2.10.0 です。Cocos Creatorのバージョンがあがると動かなくなる可能性もあるのでご注意ください。
https://github.com/nmrtkhs/start_project

4
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3