var CreditsScene = tine._scene({ initialize: function() { this.addLayer('background'); this.addLayer('screen'); 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; this.addObject(game.create.bitmap('img_stars'), 'background'); var sky = game.create.shape({regX:-wh, regY:-hh, alpha:0.7}); sky.graphics .rf(["#1D3A58", "#000"], [0, 1], wh, hh, 0, wh, hh, Math.max(w, h)) .r(0, 0, w, h) this.addObject(sky, 'background'); this.addObject(game.create.bitmap('img_dirt'), 'screen'); this.addObject(game.create.bitmap('img_frame'), 'screen'); this.addObject(game.create.bitmap('img_lens'), 'screen'); var self = this; var button = new Button('Back', function() { self.goMenu() }); button.x = w-125; button.y = h-70; this.addObject(button, 'ui'); logo = game.create.text('Democracy', { font: '72px aero', textAlign: 'center', color: '#E0E0E0', x: wh, y: 70, }); this.addObject(logo, 'ui'); logo = game.create.text( '\n\n'+ 'This game was made in 48 hours for ludum dare #32,\n'+ '"unconventional weapon". Democracy is a humble tribute\n'+ 'to Heinlein’s novel - and the Verhoeven’s movie:\n\n'+ ' Starship Troopers\n\n'+ 'Made by Renato de Pontes Pereira\n\n\n'+ 'Would you like to know more?\n' // ' DO YOUR PART!\n' , { font: '18px nasa', textAlign: 'justify', color: '#E0E0E0', x: 45, y: 250, }); this.addObject(logo, 'ui'); }, update: function() { }, exit: function() { this.alpha = 1; }, goMenu: function() { game.director.replace('menu', new tine.transitions.FadeOut(null, 300)); }, })