2018 ソフトウェア設計及び演習用の班Wiki
gr02::高瀬::char
function char(){ const chara = "https://gitlab.cis.iwate-u.ac.jp/h28j028/Project_g_02/raw/master/work/picto/pictostand.png"; const punch = "https://gitlab.cis.iwate-u.ac.jp/h28j028/Project_g_02/raw/master/work/picto/picto_punch.png" const kick = "https://gitlab.cis.iwate-u.ac.jp/h28j028/Project_g_02/raw/master/work/picto/pictokick2.png" const jump = "https://gitlab.cis.iwate-u.ac.jp/h28j028/Project_g_02/raw/master/work/picto/pictostand.png"
var player_info = { id : "",
x : 0.1*WIDTH + Math.floor( Math.random() * (WIDTH*0.8) ), y : 0.1*HEIGHT + Math.floor( Math.random() * (HEIGHT*0.8) ),
};
var player = null; var playerid; var enemies = {};
socket.on('connect', function() { player_info.id = socket.id; if(playerid == undefined) { playerid = player_info.id; }
console.log('my id is ' + playerid); });
enchant();
function updatePos(unit) { unit.x ++; unit.y ++; };
App.main.Player = enchant.Class.create(enchant.Sprite, { initialize: function(posx, posy) { enchant.Sprite.call(this, 32);
this.gamecore = enchant.Core.instance; this.image = this.gamecore.assets[chara]; this.frame = 13;
this.x = posx; this.y = posy;
}}); attack(); damaged(); move(); };
最終更新日:2018/06/22 12:44:40