• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,540
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
13
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Javascript e os jogos no browser por
  • 2. ■ ■ ■
  • 3. ■ ■ ■
  • 4. ■ ■ ■ ■
  • 5. 1 ig.module('game.entities.hud') 2 .requires('impact.entity') 3 .defines(function () { 4 EntityHud = ig.Entity.extend({ 5 _wmIgnore: true, 6 animSheet: new ig.AnimationSheet('media/hud.png', 10, 10), 7 gravityFactor: 0, 8 zIndex: 2, 9 name: "hud", 10 piece_collected: false, 11 12 init: function (x, y, settings) { 13 this.parent(x, y, settings); 14 this.addAnim('empty', 1, [0]); 15 this.addAnim('full', 1, [1]); 16 }, 17 18 update: function () { 19 if( this.piece_collected ){ this.currentAnim = this.anims.full; } 20 this.parent(); 21 } 22 }); 23 });