HTML5 游戏引擎:Traffic Cone
jopen
11年前
Trafficcone 是 2D 和 2.5D(等距) 的 HTML5 游戏引擎,可以制作复杂的精灵动画和基于砖面的场景。
//create a sprite var ryu = new Sprite("ryu"); var ryu.setup(ga); //tell traffic cone what the dimensions var attack = []; attack.push(new Frame(0, 0, 105, 127, fastAction)); attack.push(new Frame(0, 1, 105, 127, fastAction)); attack.push(new Frame(0, 2, 105, 127, fastAction)); attack.push(new Frame(1, 0, 105, 127, fastAction)); attack.push(new Frame(1, 1, 105, 127, fastAction)); attack.push(new Frame(1, 2, 105, 127, fastAction)); attack.push(new Frame(2, 0, 105, 127, fastAction)); attack.push(new Frame(2, 1, 105, 127, fastAction)); ryu.defineSequence("attack", "../../assets/ryu/RYU_PUNCH1.png", attack, 1);