Created
June 15, 2017 08:18
-
-
Save vivit-jc/6ea8a70db6bd8aaf3ce90b8374cd16bd to your computer and use it in GitHub Desktop.
DXRubyサンプル
This file contains hidden or 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
map_images = [ | |
Image.load( "aa.png" ), | |
Image.load( "bb.png" ), | |
Image.load( "cc.png" ) | |
] | |
map = [ | |
[0,0,0,0,0], | |
[0,0,0,0,0], | |
[0,0,0,2,0], | |
[0,0,2,2,2], | |
[1,1,1,1,1] | |
] | |
sprites = [] | |
5.times do |i| | |
5.times do |j| | |
sprites << Sprite.new(j*20, i*20, map_images[map[i][j]]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment