2018 ソフトウェア設計及び演習用の班Wiki
18::gr02::高瀬::attack
enchant();
var IMG = "http://wiki.cis.iwate-u.ac.jp/~wiki/csd/js/images/chara1.png";
window.onload = function() { var game = new Game(320, 320); game.fps = 30; game.preload(IMG);
game.onload = function() { var item-a = item(); var char = new Sprite(32, 32); char.image = game.assets[IMG]; char.frame = 1; char.x = 100; char.y = 100; game.rootScene.addChild(char); game.keybind(90,'z'); game.keybind(88,'x');
char.addEventListener('enterframe', function(ev){
if(game.input.z) { char.frame = 4; if(this.intersect(enemy)){ if(item-a == 1) damaged(i1); else {damaged(z)};
}; };
if(game.input.x) { char.frame = 4; if(this.intersect(enemy)){ if(item-a == 2) damaged(i2); else {damaged(x)};
}; }; } }
game.start(); }
最終更新日:2018/07/06 16:20:14