This file contains 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
/** | |
* A Notifications object | |
* | |
* http://caniuse.com/notifications | |
* Currently supported only in Firefox 22+, Chrome 22+, and Safari 6+ (on Mac OSX 10.8+). | |
* | |
* Note: requestPermission() MUST be called from a user gesture event in Chrome | |
* to be valid. It will fail silently otherwise! | |
* | |
* Note: Firefox and Safari will close notifications themselves |
This file contains 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
/** | |
* A Fullscreen object | |
* | |
* Current support (http://caniuse.com/#feat=fullscreen) | |
* is limited to Firefox 22+ (moz), Chrome 28+, Safari 6.0+, Opera 16.0+ (webkit), | |
* and IE11+ (ms) | |
* | |
* @property {boolean} supported If fullscreen support exists in the current context | |
* @property {boolean} isFullscreen If an element is currently fullscreen or not | |
*/ |
This file contains 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
/** | |
* A Visibility object using the Page Visibility API with fallback to | |
* the the 'focus' and 'blur' events. | |
* | |
* The result of visibilityState() returns one of the possible following strings: | |
* "visible" : is visible to the user | |
* "hidden" : is not visible to the user | |
* "prerender" : (Limited support) is not visible to the user, but has been loaded in memory | |
* "unloaded" : (Limited support) the page itself is currently being unloaded from memory | |
* |
This file contains 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
/** | |
* A Vibrate object for detecting and using the window.navigator.vibrate | |
* function. | |
* | |
* Code borrows from David Walsh's work | |
* http://davidwalsh.name/vibration-api | |
* | |
* @property {boolean} supported If vibrate is supported in the current context | |
*/ |
This file contains 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
/** | |
* An accelerometer object for detecting device orientation | |
* and motion (if supported) | |
* | |
* Chrome 7+, Firefox 6+, IE11+, iOS Safari 4.0+, Android Browser 3.0, Blackberry 10.0 | |
* http://caniuse.com/#feat=deviceorientation | |
* | |
* The DeviceOrientationEvent.alpha value represents the motion of the device around the z axis, | |
* represented in degrees with values ranging from 0 to 360. | |
* |
This file contains 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
/** | |
* (Note: Depends on window.requestAnimationFrame for polling.) | |
* | |
* An experimental Gamepad object for detecting | |
* and parsing gamepad input. | |
* | |
* Current code borrows heavily from Marcin Wichary's work: | |
* http://www.html5rocks.com/en/tutorials/doodles/gamepad/ | |
* | |
* Also uses deadzone values from |
This file contains 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
package | |
{ | |
import org.flixel.*; | |
public class PlayState extends FlxState | |
{ | |
private var hud:FlxGroup; | |
private var world:FlxTilemap; | |
private var player:PlayerSprite; | |
// |
This file contains 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
package | |
{ | |
/** | |
* ... | |
* @author Dan Cox | |
*/ | |
import org.flixel.*; | |
public class MapGroup extends FlxGroup |
This file contains 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
package | |
{ | |
/** | |
* ... | |
* @author Dan Cox | |
*/ | |
import org.flixel.*; | |
import org.flixel.system.FlxTile; | |
This file contains 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
package | |
{ | |
/** | |
* ... | |
* @author Dan Cox | |
*/ | |
public class Assets | |
{ | |
[Embed(source="data/houseTiles.png")] | |
public static var houseTilesPng:Class; |