Last active
June 6, 2017 15:19
-
-
Save muzudho/32307a3bc34cf6ec9f02de6f904815a5 to your computer and use it in GitHub Desktop.
Unity2Dでタイルマップを敷き詰めてスクロールさせようぜ ref: http://qiita.com/muzudho1/items/061944fdcc73008c822c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 多分こんな感じで 上に行く | |
transform.Translate( 0, 200f, 0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// スクリプトで コライダーを追加する例 | |
GameObject go = new GameObject("Cell0", typeof(SpriteRenderer), typeof(BoxCollider2D)); | |
BoxCollider2D col = go.GetComponent<BoxCollider2D>(); | |
col.size = new Vector2( 0.4f, 0.4f); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment