Autotile animate

This commit is contained in:
oc committed 2018-10-31 22:59:46 +08:00
1 parent a87bd09c13
commit 82dcff123a
5 files changed
+25 -6

No files matched your search

+1 -1
View File
@@ -390,7 +390,7 @@ editor.prototype.drawInitData = function (icons) {
if (img == 'autotile') {
var autotiles = images[img];
for (var im in autotiles) {
dc.drawImage(autotiles[im], nowx, nowy);
dc.drawImage(autotiles[im], 0, 0, 96, 128, nowx, nowy, 96, 128);
nowy += autotiles[im].height;
}
nowx += 3 * 32;
+1 -1
View File
@@ -804,7 +804,7 @@ editor_mode = function (editor) {
appendConfirm.onclick = function () {
var confirmAutotile = function () {
if (sprite.width != 96 || sprite.height != 128) {
if (sprite.width % 96 !=0 || sprite.height != 128) {
printe("不合法的Autotile图片!");
return;
}