Complete 0.9 release

This commit is contained in:
Richard Davey 2013-04-18 16:49:08 +01:00
parent 64d57b8e05
commit a90606a28a
64 changed files with 1095 additions and 1210 deletions

View file

@ -5,6 +5,13 @@
/// <reference path="system/animation/Frame.ts" />
/// <reference path="system/animation/FrameData.ts" />
/**
* Phaser - AnimationManager
*
* Any Sprite that has animation contains an instance of the AnimationManager, which is used to add, play and update
* sprite specific animations.
*/
module Phaser {
export class AnimationManager {

View file

@ -1,16 +1,10 @@
/// <reference path="Game.ts" />
/**
* This is a useful "generic" object.
* Both <code>GameObject</code> and <code>Group</code> extend this class,
* as do the plugins. Has no size, position or graphical data.
*
* @author Adam Atomic
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Basic
*
* A useful "generic" object on which all GameObjects and Groups are based.
* It has no size, position or graphical data.
*/
module Phaser {

View file

@ -1,7 +1,10 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - Cache
*
* A game only has one instance of a Cache and it is used to store all externally loaded assets such
* as images, sounds and data files as a result of Loader calls. Cache items use string based keys for look-up.
*/
module Phaser {

View file

@ -1,11 +1,14 @@
/// <reference path="Game.ts" />
/// <reference path="system/Camera.ts" />
// TODO: If the Camera is larger than the Stage size then the rotation offset isn't correct
// TODO: Texture Repeat doesn't scroll, because it's part of the camera not the world, need to think about this more
/**
* Phaser
* Phaser - CameraManager
*
* Your game only has one CameraManager instance and it's responsible for looking after, creating and destroying
* all of the cameras in the world.
*
* TODO: If the Camera is larger than the Stage size then the rotation offset isn't correct
* TODO: Texture Repeat doesn't scroll, because it's part of the camera not the world, need to think about this more
*/
module Phaser {

View file

@ -7,7 +7,9 @@
/// <reference path="system/QuadTree.ts" />
/**
* Phaser - Collision
* Phaser - Collision
*
* A set of extremely useful collision and geometry intersection functions.
*/
module Phaser {

View file

@ -1,7 +1,12 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - DynamicTexture
*
* A DynamicTexture can be thought of as a mini canvas into which you can draw anything.
* Game Objects can be assigned a DynamicTexture, so when they render in the world they do so
* based on the contents of the texture at the time. This allows you to create powerful effects
* once and have them replicated across as many game objects as you like.
*/
module Phaser {

View file

@ -10,7 +10,7 @@
/// <reference path="Motion.ts" />
/// <reference path="Signal.ts" />
/// <reference path="SignalBinding.ts" />
/// <reference path="Sound.ts" />
/// <reference path="SoundManager.ts" />
/// <reference path="Stage.ts" />
/// <reference path="Time.ts" />
/// <reference path="TweenManager.ts" />
@ -30,10 +30,10 @@
/// <reference path="gameobjects/Tilemap.ts" />
/**
* Phaser
* Phaser - Game
*
* Richard Davey (@photonstorm)
* Adam Saltsman (@ADAMATOMIC) (original Flixel code)
* This is where the magic happens. The Game object is the heart of your game, providing quick access to common
* functions and handling the boot process.
*/
module Phaser {

View file

@ -1,14 +1,11 @@
/// <reference path="Game.ts" />
/**
* Phaser - GameMath
*
* @desc Adds a set of extra Math functions and extends a few commonly used ones.
* Includes methods written by Dylan Engelman and Adam Saltsman.
*
* @version 1.0 - 17th March 2013
* @author Richard Davey
*/
* Phaser - GameMath
*
* Adds a set of extra Math functions used through-out Phaser.
* Includes methods written by Dylan Engelman and Adam Saltsman.
*/
module Phaser {

View file

@ -2,16 +2,10 @@
/// <reference path="Game.ts" />
/**
* This is an organizational class that can update and render a bunch of <code>Basic</code>s.
* NOTE: Although <code>Group</code> extends <code>Basic</code>, it will not automatically
* add itself to the global collisions quad tree, it will only add its members.
*
* @author Adam Atomic
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Group
*
* This class is used for organising, updating and sorting game objects.
*
*/
module Phaser {

View file

@ -1,7 +1,10 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - Loader
*
* The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.
* It uses a combination of Image() loading and xhr and provides for progress and completion callbacks.
*/
module Phaser {

View file

@ -2,7 +2,9 @@
/// <reference path="gameobjects/GameObject.ts" />
/**
* Phaser - Motion
* Phaser - Motion
*
* The Motion class contains lots of useful functions for moving game objects around in world space.
*/
module Phaser {

View file

@ -106,6 +106,14 @@
<Content Include="geom\Rectangle.js">
<DependentUpon>Rectangle.ts</DependentUpon>
</Content>
<Content Include="SoundManager.js">
<DependentUpon>SoundManager.ts</DependentUpon>
</Content>
<Content Include="system\Sound.js">
<DependentUpon>Sound.ts</DependentUpon>
</Content>
<TypeScriptCompile Include="system\Sound.ts" />
<TypeScriptCompile Include="SoundManager.ts" />
<Content Include="system\animation\Animation.js">
<DependentUpon>Animation.ts</DependentUpon>
</Content>
@ -255,9 +263,6 @@
<Content Include="SignalBinding.js">
<DependentUpon>SignalBinding.ts</DependentUpon>
</Content>
<Content Include="Sound.js">
<DependentUpon>Sound.ts</DependentUpon>
</Content>
<Content Include="Stage.js">
<DependentUpon>Stage.ts</DependentUpon>
</Content>
@ -278,7 +283,6 @@
<TypeScriptCompile Include="Time.ts" />
<TypeScriptCompile Include="State.ts" />
<TypeScriptCompile Include="Stage.ts" />
<TypeScriptCompile Include="Sound.ts" />
<TypeScriptCompile Include="SignalBinding.ts" />
<TypeScriptCompile Include="Signal.ts" />
<TypeScriptCompile Include="Phaser.ts" />

View file

@ -1,16 +1,17 @@
/**
* Phaser
* Phaser
*
* v0.9 - April 18th 2013
* v0.9 - April 18th 2013
*
* A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi.
* A small and feature-packed 2D canvas game framework born from the firey pits of Flixel and Kiwi.
*
* Richard Davey (@photonstorm)
* Adam Saltsman (@ADAMATOMIC) (original Flixel code)
* Richard Davey (@photonstorm)
*
* "If you want your children to be intelligent, read them fairy tales."
* "If you want them to be more intelligent, read them more fairy tales."
* -- Albert Einstein
* Many thanks to Adam Saltsman (@ADAMATOMIC) for the original Flixel AS3 code on which Phaser is based.
*
* "If you want your children to be intelligent, read them fairy tales."
* "If you want them to be more intelligent, read them more fairy tales."
* -- Albert Einstein
*/
module Phaser {

View file

@ -1,29 +1,12 @@
/// <reference path="SignalBinding.ts" />
/*
* Signal
*
* @desc A TypeScript conversion of JS Signals by Miller Medeiros
* Released under the MIT license
* http://millermedeiros.github.com/js-signals/
*
* @version 1. - 7th March 2013
*
* @author Richard Davey, TypeScript conversion
* @author Miller Medeiros, JS Signals
*
*/
/**
* Custom event broadcaster
* <br />- inspired by Robert Penner's AS3 Signals.
* @name Signal
* @author Miller Medeiros
* @constructor
*/
/**
* Phaser
* Phaser - Signal
*
* A Signal is used for object communication via a custom broadcaster instead of Events.
* Based on JS Signals by Miller Medeiros. Converted by TypeScript by Richard Davey.
* Released under the MIT license
* http://millermedeiros.github.com/js-signals/
*/
module Phaser {

View file

@ -1,21 +1,12 @@
/// <reference path="Signal.ts" />
/*
* SignalBinding
*
* @desc An object that represents a binding between a Signal and a listener function.
* Released under the MIT license
* http://millermedeiros.github.com/js-signals/
*
* @version 1. - 7th March 2013
*
* @author Richard Davey, TypeScript conversion
* @author Miller Medeiros, JS Signals
*
*/
/**
* Phaser
* Phaser - SignalBinding
*
* An object that represents a binding between a Signal and a listener function.
* Based on JS Signals by Miller Medeiros. Converted by TypeScript by Richard Davey.
* Released under the MIT license
* http://millermedeiros.github.com/js-signals/
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - SoundManager
*
* This is an embroyonic web audio sound management class. There is a lot of work still to do here.
*/
module Phaser {
@ -119,115 +121,3 @@ module Phaser {
}
}
module Phaser {
export class Sound {
constructor(context, gainNode, data, volume?: number = 1, loop?: bool = false) {
this._context = context;
this._gainNode = gainNode;
this._buffer = data;
this._volume = volume;
this.loop = loop;
// Local volume control
if (this._context !== null)
{
this._localGainNode = this._context.createGainNode();
this._localGainNode.connect(this._gainNode);
this._localGainNode.gain.value = this._volume;
}
if (this._buffer === null)
{
this.isDecoding = true;
}
else
{
this.play();
}
}
private _context;
private _gainNode;
private _localGainNode;
private _buffer;
private _volume: number;
private _sound;
loop: bool = false;
duration: number;
isPlaying: bool = false;
isDecoding: bool = false;
public setDecodedBuffer(data) {
this._buffer = data;
this.isDecoding = false;
this.play();
}
public play() {
if (this._buffer === null || this.isDecoding === true)
{
return;
}
this._sound = this._context.createBufferSource();
this._sound.buffer = this._buffer;
this._sound.connect(this._localGainNode);
if (this.loop)
{
this._sound.loop = true;
}
this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it
this.duration = this._sound.buffer.duration;
this.isPlaying = true;
}
public stop() {
if (this.isPlaying === true)
{
this.isPlaying = false;
this._sound.noteOff(0);
}
}
public mute() {
this._localGainNode.gain.value = 0;
}
public unmute() {
this._localGainNode.gain.value = this._volume;
}
public set volume(value: number) {
this._volume = value;
this._localGainNode.gain.value = this._volume;
}
public get volume(): number {
return this._volume;
}
}
}

View file

@ -3,7 +3,10 @@
/// <reference path="system/StageScaleMode.ts" />
/**
* Phaser
* Phaser - Stage
*
* The Stage is the canvas on which everything is displayed. This class handles display within the web browser, focus handling,
* resizing, scaling and pause/boot screens.
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - State
*
* This is a base State class which can be extended if you are creating your game using TypeScript.
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - Time
*
* This is the game clock and it manages elapsed time and calculation of delta values, used for game object motion.
*/
module Phaser {

View file

@ -2,27 +2,14 @@
/// <reference path="system/Tween.ts" />
/**
* Phaser - Tween Manager
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js) converted to TypeScript, patched and integrated into Phaser
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration
* @author sole / http://soledadpenades.com
* @author mrdoob / http://mrdoob.com
* @author Robert Eisele / http://www.xarg.org
* @author Philippe / http://philippe.elsass.me
* @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
* @author Paul Lewis / http://www.aerotwist.com/
* @author lechecacharro
* @author Josh Faul / http://jocafa.com/
* @author egraether / http://egraether.com/
*
* @todo
* 1) Allow for tweening direct numeric values, not just object properties
* 2) YoYo support
*/
* Phaser - TweenManager
*
* The Game has a single instance of the TweenManager through which all Tween objects are created and updated.
* Tweens are hooked into the game clock and pause system, adjusting based on the game state.
* TweenManager is based heavily on tween.js by sole (http://soledadpenades.com).
* I converted it to TypeScript, swapped the callbacks for signals and patched a few issues with regard
* to properties and completion errors. Please see https://github.com/sole/tween.js for a full list of contributors.
*/
module Phaser {

View file

@ -1,7 +1,11 @@
/// <reference path="Game.ts" />
/**
* Phaser
* Phaser - World
*
* A game has only one world. The world is an abstract place in which all game objects live. It is not bound
* by stage limits and can be any size or dimension. You look into the world via cameras and all game objects
* live within the world at world-based coordinates. By default a world is created the same size as your Stage.
*/
module Phaser {

View file

@ -2,21 +2,11 @@
/// <reference path="../Group.ts" />
/**
* <code>Emitter</code> is a lightweight particle emitter.
* It can be used for one-time explosions or for
* continuous fx like rain and fire. <code>Emitter</code>
* is not optimized or anything; all it does is launch
* <code>Particle</code> objects out at set intervals
* by setting their positions and velocities accordingly.
* It is easy to use and relatively efficient,
* relying on <code>Group</code>'s RECYCLE POWERS.
*
* @author Adam Atomic
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Emitter
*
* Emitter is a lightweight particle emitter. It can be used for one-time explosions or for
* continuous effects like rain and fire. All it really does is launch Particle objects out
* at set intervals, and fixes their positions and velocities accorindgly.
*/
module Phaser {

View file

@ -3,7 +3,10 @@
/// <reference path="../Signal.ts" />
/**
* Phaser
* Phaser - GameObject
*
* This is the base GameObject on which all other game objects are derived. It contains all the logic required for position,
* motion, size, collision and input.
*/
module Phaser {

View file

@ -1,7 +1,11 @@
/// <reference path="../Game.ts" />
/**
* Phaser
* Phaser - GeomSprite
*
* A GeomSprite is a special kind of GameObject that contains a base geometry class (Circle, Line, Point, Rectangle).
* They can be rendered in the game and used for collision just like any other game object. Display of them is controlled
* via the lineWidth / lineColor / fillColor and renderOutline / renderFill properties.
*/
module Phaser {

View file

@ -2,19 +2,10 @@
/// <reference path="Sprite.ts" />
/**
* This is a simple particle class that extends the default behavior
* of <code>Sprite</code> to have slightly more specialized behavior
* common to many game scenarios. You can override and extend this class
* just like you would <code>Sprite</code>. While <code>Emitter</code>
* used to work with just any old sprite, it now requires a
* <code>Particle</code> based class.
*
* @author Adam Atomic
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Particle
*
* This is a simple particle class that extends a Sprite to have a slightly more
* specialised behaviour. It is used exclusively by the Emitter class and can be extended as required.
*/
module Phaser {

View file

@ -3,7 +3,10 @@
/// <reference path="GameObject.ts" />
/**
* Phaser
* Phaser - Sprite
*
* The Sprite GameObject is an extension of the core GameObject that includes support for animation and dynamic textures.
* It's probably the most used GameObject of all.
*/
module Phaser {

View file

@ -4,7 +4,10 @@
/// <reference path="../system/TilemapBuffer.ts" />
/**
* Phaser
* Phaser - Tilemap
*
* This GameObject allows for the display of a tilemap within the game world. Tile maps consist of an image, tile data and a size.
* Internally it creates a TilemapBuffer for each camera in the world.
*/
module Phaser {

View file

@ -1,13 +1,10 @@
/// <reference path="../Game.ts" />
/**
* Phaser - Geom - Circle
*
* @desc A Circle object is an area defined by its position, as indicated by its center point (x,y) and diameter.
*
* @version 1.1 - 11th October 2012
* @author Richard Davey
*/
* Phaser - Circle
*
* A Circle object is an area defined by its position, as indicated by its center point (x,y) and diameter.
*/
module Phaser {

View file

@ -1,13 +1,10 @@
/// <reference path="../Game.ts" />
/**
* Phaser - Geom - IntersectResult
*
* @desc A light-weight result object to hold the results of an intersection
*
* @version 1.0 - 15th October 2012
* @author Richard Davey
*/
* Phaser - IntersectResult
*
* A light-weight result object to hold the results of an intersection. For when you need more than just true/false.
*/
module Phaser {

View file

@ -1,14 +1,10 @@
/// <reference path="../Game.ts" />
/**
* Phaser - Geom - Line
*
* @desc A Line object is an infinte line through space. The two sets of x/y coordinates define the Line Segment.
*
* @version 1.0 - 11th October 2012
* @author Ross Kettle
* @author Richard Davey
*/
* Phaser - Line
*
* A Line object is an infinte line through space. The two sets of x/y coordinates define the Line Segment.
*/
module Phaser {

View file

@ -1,17 +1,9 @@
/// <reference path="../Game.ts" />
/**
* Point
*
* @desc The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
*
* @version 1.2 - 27th February 2013
* @author Richard Davey
* @todo polar, interpolate
*/
/**
* Phaser
* Phaser - Point
*
* The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
*/
module Phaser {

View file

@ -1,16 +1,9 @@
/// <reference path="../Game.ts" />
/**
* Rectangle
*
* @desc A Rectangle object is an area defined by its position, as indicated by its top-left corner (x,y) and width and height.
*
* @version 1.2 - 15th October 2012
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Rectangle
*
* A Rectangle object is an area defined by its position, as indicated by its top-left corner (x,y) and width and height.
*/
module Phaser {

View file

@ -2,7 +2,11 @@
/// <reference path="../Game.ts" />
/**
* Phaser
* Phaser - Camera
*
* A Camera is your view into the game world. It has a position, size, scale and rotation and renders only those objects
* within its field of view. The game automatically creates a single Stage sized camera on boot, but it can be changed and
* additional cameras created via the CameraManager.
*/
module Phaser {

View file

@ -1,19 +1,10 @@
/// <reference path="../Game.ts" />
/**
* Device
*
* @desc Detects device support capabilities. Using some elements from System.js by MrDoob and Modernizr
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/audio.js
*
* @version 1.0 - March 5th 2013
* @author Richard Davey
* @author mrdoob
* @author Modernizr team
*/
/**
* Phaser
* Phaser - Device
*
* Detects device support capabilities. Using some elements from System.js by MrDoob and Modernizr
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/audio.js
*/
module Phaser {

View file

@ -1,13 +1,9 @@
/// <reference path="../Game.ts" />
/**
* A miniature linked list class.
* Useful for optimizing time-critical or highly repetitive tasks!
* See <code>QuadTree</code> for how to use it, IF YOU DARE.
*/
/**
* Phaser
* Phaser - LinkedList
*
* A miniature linked list class. Useful for optimizing time-critical or highly repetitive tasks!
*/
module Phaser {

View file

@ -2,15 +2,11 @@
/// <reference path="LinkedList.ts" />
/**
* A fairly generic quad tree structure for rapid overlap checks.
* QuadTree is also configured for single or dual list operation.
* You can add items either to its A list or its B list.
* When you do an overlap check, you can compare the A list to itself,
* or the A list against the B list. Handy for different things!
*/
/**
* Phaser
* Phaser - QuadTree
*
* A fairly generic quad tree structure for rapid overlap checks. QuadTree is also configured for single or dual list operation.
* You can add items either to its A list or its B list. When you do an overlap check, you can compare the A list to itself,
* or the A list against the B list. Handy for different things!
*/
module Phaser {

View file

@ -1,19 +1,11 @@
/// <reference path="../Game.ts" />
/**
* Repeatable Random Data Generator
*
* @desc Manages the creation of unique internal game IDs
* Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense
* Random number generator from http://baagoe.org/en/wiki/Better_random_numbers_for_javascript
*
* @version 1.1 - 1st March 2013
* @author Josh Faul
* @author Richard Davey, TypeScript conversion and additional methods
*/
/**
* Phaser
* Phaser - RandomDataGenerator
*
* An extremely useful repeatable random data generator. Access it via Game.rnd
* Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense
* Random number generator from http://baagoe.org/en/wiki/Better_random_numbers_for_javascript
*/
module Phaser {

View file

@ -1,16 +1,9 @@
/// <reference path="../Game.ts" />
/**
* RequestAnimationFrame
*
* @desc Abstracts away the use of RAF or setTimeOut for the core game update loop. The callback can be re-mapped on the fly.
*
* @version 0.3 - 15th October 2012
* @author Richard Davey
*/
/**
* Phaser
* Phaser - RequestAnimationFrame
*
* Abstracts away the use of RAF or setTimeOut for the core game update loop. The callback can be re-mapped on the fly.
*/
module Phaser {

120
Phaser/system/Sound.ts Normal file
View file

@ -0,0 +1,120 @@
/// <reference path="../Game.ts" />
/// <reference path="../SoundManager.ts" />
/**
* Phaser - Sound
*
* A Sound file, used by the Game.SoundManager for playback.
*/
module Phaser {
export class Sound {
constructor(context, gainNode, data, volume?: number = 1, loop?: bool = false) {
this._context = context;
this._gainNode = gainNode;
this._buffer = data;
this._volume = volume;
this.loop = loop;
// Local volume control
if (this._context !== null)
{
this._localGainNode = this._context.createGainNode();
this._localGainNode.connect(this._gainNode);
this._localGainNode.gain.value = this._volume;
}
if (this._buffer === null)
{
this.isDecoding = true;
}
else
{
this.play();
}
}
private _context;
private _gainNode;
private _localGainNode;
private _buffer;
private _volume: number;
private _sound;
loop: bool = false;
duration: number;
isPlaying: bool = false;
isDecoding: bool = false;
public setDecodedBuffer(data) {
this._buffer = data;
this.isDecoding = false;
this.play();
}
public play() {
if (this._buffer === null || this.isDecoding === true)
{
return;
}
this._sound = this._context.createBufferSource();
this._sound.buffer = this._buffer;
this._sound.connect(this._localGainNode);
if (this.loop)
{
this._sound.loop = true;
}
this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it
this.duration = this._sound.buffer.duration;
this.isPlaying = true;
}
public stop() {
if (this.isPlaying === true)
{
this.isPlaying = false;
this._sound.noteOff(0);
}
}
public mute() {
this._localGainNode.gain.value = 0;
}
public unmute() {
this._localGainNode.gain.value = this._volume;
}
public set volume(value: number) {
this._volume = value;
this._localGainNode.gain.value = this._volume;
}
public get volume(): number {
return this._volume;
}
}
}

View file

@ -1,16 +1,11 @@
/// <reference path="../Game.ts" />
/*
* Based on code from Viewporter v2.0
* http://github.com/zynga/viewporter
*
* Copyright 2011, Zynga Inc.
* Licensed under the MIT License.
* https://raw.github.com/zynga/viewporter/master/MIT-LICENSE.txt
*/
/**
* Phaser
* Phaser - StageScaleMode
*
* This class controls the scaling of your game. On mobile devices it will also remove the URL bar and allow
* you to maintain proportion and aspect ratio.
* It is based on a technique taken from Viewporter v2.0 by Zynga Inc. http://github.com/zynga/viewporter
*/
module Phaser {

View file

@ -1,16 +1,9 @@
/// <reference path="../Game.ts" />
/**
* A simple helper object for <code>Tilemap</code> that helps expand collision opportunities and control.
* You can use <code>Tilemap.setTileProperties()</code> to alter the collision properties and
* callback functions and filters for this object to do things like one-way tiles or whatever.
*
* @author Adam Atomic
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Tile
*
* A simple helper object for <code>Tilemap</code> that helps expand collision opportunities and control.
*/
module Phaser {

View file

@ -1,9 +1,9 @@
/// <reference path="../Game.ts" />
/**
* A Tilemap Buffer
*
* @author Richard Davey
* Phaser - TilemapBuffer
*
* Responsible for rendering a portion of a tilemap to the given Camera.
*/
module Phaser {

View file

@ -12,14 +12,10 @@
/// <reference path="easing/Sinusoidal.ts" />
/**
* Phaser - Tween
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js) converted to TypeScript and integrated into Phaser
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Tween
*
* Based heavily on tween.js by sole (https://github.com/sole/tween.js) converted to TypeScript and integrated into Phaser
*/
module Phaser {

View file

@ -1,16 +1,9 @@
/// <reference path="../../Game.ts" />
/**
* Animation
*
* @desc Loads Sprite Sheets and Texture Atlas formats into a unified FrameData object
*
* @version 1.0 - 22nd March 2013
* @author Richard Davey
*/
/**
* Phaser
* Phaser - Animation
*
* An Animation is a single animation. It is created by the AnimationManager and belongs to Sprite objects.
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="../../Game.ts" />
/**
* Phaser
* Phaser - AnimationLoader
*
* Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="../../Game.ts" />
/**
* Phaser
* Phaser - Frame
*
* A Frame is a single frame of an animation and is part of a FrameData collection.
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="../../Game.ts" />
/**
* Phaser
* Phaser - FrameData
*
* FrameData is a container for Frame objects, the internal representation of animation data in Phaser.
*/
module Phaser {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Back
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Bounce
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Circular
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Cubic
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Elastic
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Exponential
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Linear
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Quadratic
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Quartic
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Quintic
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,14 +1,10 @@
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing
*
* @desc Based heavily on tween.js by sole (https://github.com/sole/tween.js)
*
* @version 1.0 - 11th January 2013
*
* @author Richard Davey, TypeScript conversion and Phaser integration. See Phaser.TweenManager for the full tween.js author list
*/
* Phaser - Easing - Sinusoidal
*
* For use with Phaser.Tween
*/
module Phaser.Easing {

View file

@ -1,18 +1,9 @@
/// <reference path="../../Game.ts" />
/**
* Input - Finger
*
* @desc A Finger object used by the Touch manager
*
* @version 1.1 - 27th February 2013
* @author Richard Davey
*
* @todo Lots
*/
/**
* Phaser
* Phaser - Finger
*
* A Finger object is used by the Touch manager and represents a single finger on the touch screen.
*/
module Phaser {

View file

@ -2,7 +2,9 @@
/// <reference path="../../Signal.ts" />
/**
* Phaser
* Phaser - Input
*
* A game specific Input manager that looks after the mouse, keyboard and touch objects. This is updated by the core game loop.
*/
module Phaser {

View file

@ -1,7 +1,11 @@
/// <reference path="../../Game.ts" />
/**
* Phaser
* Phaser - Keyboard
*
* The Keyboard class handles keyboard interactions with the game and the resulting events.
* The avoid stealing all browser input we don't use event.preventDefault. If you would like to trap a specific key however
* then use the addKeyCapture() method.
*/
module Phaser {

View file

@ -1,7 +1,9 @@
/// <reference path="../../Game.ts" />
/**
* Phaser
* Phaser - Mouse
*
* The Mouse class handles mouse interactions with the game and the resulting events.
*/
module Phaser {

View file

@ -2,25 +2,19 @@
/// <reference path="Finger.ts" />
/**
* Input - Touch
*
* @desc http://www.w3.org/TR/touch-events/
* https://developer.mozilla.org/en-US/docs/DOM/TouchList
* http://www.html5rocks.com/en/mobile/touchandmouse/
* Android 2.x only supports 1 touch event at once, no multi-touch
*
* @version 1.1 - 27th February 2013
* @author Richard Davey
*
* @todo Try and resolve update lag in Chrome/Android
* Gestures (pinch, zoom, swipe)
* GameObject Touch
* Touch point within GameObject
* Input Zones (mouse and touch) - lock entities within them + axis aligned drags
*/
/**
* Phaser
* Phaser - Touch
*
* The Touch class handles touch interactions with the game and the resulting Finger objects.
* http://www.w3.org/TR/touch-events/
* https://developer.mozilla.org/en-US/docs/DOM/TouchList
* http://www.html5rocks.com/en/mobile/touchandmouse/
* Note: Android 2.x only supports 1 touch event at once, no multi-touch
*
* @todo Try and resolve update lag in Chrome/Android
* Gestures (pinch, zoom, swipe)
* GameObject Touch
* Touch point within GameObject
* Input Zones (mouse and touch) - lock entities within them + axis aligned drags
*/
module Phaser {

File diff suppressed because it is too large Load diff