var IntroScene = tine._scene({ initialize: function() { this.addLayer('background'); this.addLayer('screen'); this.addLayer('objects'); this.addLayer('ui'); var w = game.canvas.width; var h = game.canvas.height; var wh = game.canvas.width/2; var hh = game.canvas.height/2; var bg = game.create.shape(); bg.graphics.f('#000').r(0, 0, game.canvas.width, game.canvas.height); this.addObject(bg, 'background'); this.poster1 = game.create.bitmap('img_poster1', {alpha:0}); this.addObject(this.poster1, 'background'); this.poster2 = game.create.bitmap('img_poster2', {alpha:0}); this.addObject(this.poster2, 'background'); this.poster3 = game.create.bitmap('img_poster3', {alpha:0, regX:'center', regY:'center', x:wh, y:hh}); this.addObject(this.poster3, 'background'); var commona = {font:'16px nasa', color:'white', alpha:0}; var commonb = {font:'14px nasa', color:'#969596', alpha:0}; this.texts = [ game.create.text('Democracy is what make us free', commona), game.create.text('Are you against freedom?', commonb), game.create.text('It is our duty to spread democracy through the galaxy', commona), game.create.text('Move towards progress!', commonb), game.create.text('However, bugs are a threat to our progress!', commona), game.create.text('Are you against progress?', commonb), game.create.text('But we know how to eliminate bugs and spread democracy', commona), game.create.text('A good bug is a dead bug!', commonb), game.create.text('Their weakness is their natural resources', commona), game.create.text('Take the resources and the bugs are dead!', commonb), game.create.text('Without their resource, they can\'t stop the progress', commona), game.create.text('Enlist today!', commonb), game.create.text('Would you like to know more?', commona), game.create.text('Service guarantees citizenship', commonb), ] var spacing = 35; for (var i=0; i', function() { self.goSkip(); }); this.skipButton.x = w-50; this.skipButton.y = h-50; this.addObject(this.skipButton, 'ui'); }, beforeEnter: function() { this.poster1.alpha = 0; this.poster2.alpha = 0; this.skipButton.alpha = 0; for (var i=0; i