2018 ソフトウェア設計及び演習用の班Wiki
18::gr02::加賀隼::work
enchant();
window.onload = function(){ var core = new Core(1000,700);
core.keybind(32,'SPC');
core.onload = function(){
var startsign1 = new Label('よ〜〜〜〜〜い'); startsign1.x = 0; // 表示位置x座標 startsign1.y = 300; // 表示位置y座標 startsign1.color = '#FF7E00'; // 表示色 startsign1.font = '50px sans-serif'; // 表示フォント startsign1.addEventListener('enterframe',function(){ this.x+=20; }) core.rootScene.addChild(startsign1);
var startsign2 = new Label('どん'); startsign2.x = 1200; startsign2.y = 100; startsign2.color = '#FF0000' startsign2.opacity = 0; startsign2.font = '50px sans-serif'; startsign2.addEventListener('enterframe',function(){ if((core.frame/core.fps)>2){ this.opacity = 1; this.scale(1.1,1.1); } }) core.rootScene.addChild(startsign2);
var endsign = new Label('おしまい'); endsign.x = 400; endsign.y = 300; endsign.color = '#00FFFF' endsign.opacity = 0; endsign.font = '80px sans-serif'; endsign.addEventListener('enterframe',function(){ if(core.input.SPC){ this.opacity = 1; core.rootScene.backgroundColor = "#000000"; core.stop(); } }) core.rootScene.addChild(endsign);
} core.start(); }
最終更新日:2018/06/14 14:33:53