Advertisement
Guest User

plsnobully

a guest
May 26th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict'
  2. class SimpleGame{
  3.         game:Phaser.Game
  4.         constructor(){
  5.             this.game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', {preload:this.preload,create:this.create})
  6.         }
  7.         preload(){
  8.             this.game.load.image('logo', 'assets/ds_logo.png')
  9.             this.game.stage.setBackgroundColor(0xB20059)
  10.         }
  11.         create(){
  12.             let logo = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'logo')
  13.             logo.anchor.setTo(0.5, 0.5)
  14.         }
  15.     }
  16.    
  17. window.onload = () => {
  18.     let game = new SimpleGame
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement