This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Phaser from 'phaser'; | |
import { DoomWipePostFX } from './DoomWipePostFX'; | |
class Example extends Phaser.Scene | |
{ | |
constructor () | |
{ | |
super('Example'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
type: Phaser.AUTO, | |
parent: 'phaser-example', | |
backgroundColor: '#0072bc', | |
physics: { | |
default: 'arcade', | |
arcade: { | |
debug: true | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImageFileLoader extends Phaser.Events.EventEmitter | |
{ | |
constructor (scene, allowMultipleFiles = true) | |
{ | |
super(); | |
this.scene = scene; | |
this.textures = scene.sys.textures; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
type: Phaser.AUTO, | |
width: 800, | |
height: 600, | |
backgroundColor: '#2d2d2d', | |
parent: 'phaser-example', | |
scene: { | |
preload: preload, | |
create: create, | |
update: update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PointerMonitor | |
{ | |
constructor (scene, pointer, swipeThreshold = 100, swipeDuration = 500) | |
{ | |
// The current Scene | |
this.scene = scene; | |
// The Pointer we're monitoring for swipes | |
this.pointer = pointer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Basic Platofrmer Idea</title> | |
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-arcade-physics.min.js"></script> | |
</head> | |
<body> | |
<script> | |
var config = { | |
type: Phaser.AUTO, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// audio context | |
var ChiptuneAudioContext = window['AudioContext'] || window['webkitAudioContext']; | |
// config | |
var ChiptuneJsConfig = function (repeatCount, context) | |
{ | |
this.repeatCount = repeatCount; | |
this.context = context; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cocos2D - Scenes (and nodes) | |
Godot Engine - Scenes (and nodes) | |
CryEngine - Level | |
Torque3D - World and Level | |
Starling - nothing that I could find! In their tutorial 'Game' extends 'Sprite' :) | |
Urho3D - Scene (and Objects) | |
Atomic Game Engine - Scene (and nodes) | |
Monkey Engine - AppStates (short for Application States) | |
Banshee Engine - Level | |
Superpowers - Scenes (State is used too, to define entities changing states, Actors = Sprites) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var conf = { | |
width: 800, | |
height: 600, | |
renderer: Phaser.AUTO, | |
parent: 'phaser-example', | |
transparent: false, | |
antialias: false, | |
state: this, | |
scaleMode: Phaser.ScaleManager.EXACT_FIT | |
}; |
NewerOlder