2018 ソフトウェア設計及び演習用の班Wiki

18::gr11::staffroll

EndRoll (StaffRoll)モジュール

enchant();

const END_LEMON_BGM = "lemon.mp3"; const END_BG = "picture/a001.jpg";

window.onload = function() { var core = new Core(1280, 800); //core.preload('HND.png'); core.fps = 10;

core.preload(END_BG, END_LEMON_BGM);

core.onload = function() { EndRoll();

}; core.start(); };

EndRoll = function() { let end_labels = []; let i = 0; let core = enchant.Core.instance;

core.assets[END_LEMON_BGM].play(); Others.Background.create(END_BG);

let array = ["Group 11", "Menber", "Project Leader", "Takuya Hanada", "Novel Module", "Takuma Nishioka", "MiniGame", "Taiki Mikami", "EndRoll", "Ryosei Sato", "Map Module", "Mitsuo Moriyama", "Character", "Tetsuya Saito", "先生", "Kota Ito", "God", "Mr. Nagamine", "aaa", "HND", ];

let create_label = function(text) { let label = new Label(); label.x = 80; label.y = 800; label.color = "black"; label.font = "40px 'Arial'"; label.text = text; label.on("enterframe", function() { label.y -= 5; }); return label; };

for (i = 0; i < array.length; i++) { end_labels[i] = create_label(array[i]); };

core.on("enterframe", function() { //1 if (core.frame > 40) { end_labels[0].color = "red"; end_labels[0].font = "80px 'Arial'"; core.currentScene.addChild(end_labels[0]); }; //2 if (core.frame > 70) { core.currentScene.addChild(end_labels[1]); }; //3 if (core.frame > 120) { core.currentScene.addChild(end_labels[2]); }; //4 if (core.frame > 140) { core.currentScene.addChild(end_labels[3]); }; //5 if (core.frame > 200) { core.currentScene.addChild(end_labels[4]); }; //6 if (core.frame > 220) { core.currentScene.addChild(end_labels[5]); }; //7 if (core.frame > 280) { core.currentScene.addChild(end_labels[6]); }; //8 if (core.frame > 300) { core.currentScene.addChild(end_labels[7]); }; //9 if (core.frame > 360) { core.currentScene.addChild(end_labels[8]); }; //10 if (core.frame > 380) { core.currentScene.addChild(end_labels[9]); }; //11 if (core.frame > 440) { core.currentScene.addChild(end_labels[10]); }; //12 if (core.frame > 460) { core.currentScene.addChild(end_labels[11]); }; //13 if (core.frame > 520) { core.currentScene.addChild(end_labels[12]); }; //14 if (core.frame > 540) { core.currentScene.addChild(end_labels[13]); }; //15 if (core.frame > 600) { core.currentScene.addChild(end_labels[14]); }; //16 if (core.frame > 620) { core.currentScene.addChild(end_labels[15]); }; //17 if (core.frame > 680) { core.currentScene.addChild(end_labels[16]); }; //18 if (core.frame > 700) { core.currentScene.addChild(end_labels[17]); }; //19 if (core.frame > 760) { core.currentScene.addChild(end_labels[18]); }; //20 if (core.frame > 850) { core.currentScene.addChild(end_labels[19]); }; }); };

プログラミングをもっと綺麗に書けるところが多々あるが、完成させることに注力したため汚い形での完成となってしまった。


最終更新日:2018/08/03 12:45:26