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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
/* | |
Pefab JSON configuration / layout format details | |
Every Prefab registered is automatically associated with an [OPTIONAL] .json file, the | |
members of this .json data blob if present are currently processed as follows. |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="./prefab.ts"/> | |
// TODO - support PIXI.Texture/BaseTexture/Atlas (if texture then use inner texture) | |
// TODO - error checking ? possibly correct bad snap requests (not multiple) | |
module bpt { | |
export class Scale9 extends Phaser.Group { |
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
(function(property) { | |
var local = new Phaser.Point(); | |
function askAncestors( child, pointer ) { | |
for ( var parent = child.parent; parent; parent = parent.parent ) { | |
var clip = parent[property]; | |
if ( !clip ) continue; | |
parent.game.input.getLocalPosition( parent, pointer, local); | |
var cx = local.x - clip.x, cy = local.y - clip.y; |
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
(function(property) { | |
Phaser.Input.prototype.getCapture = function() { | |
return this[property] && this[property].captor; | |
} | |
Phaser.Input.prototype.setCapture = function( inputHandlers ) { | |
this[property] = this[property] || {captor:undefined,inputStack:[]}; | |
if ( 0 !== this[property].inputStack.length ) {this.releaseCapture();} | |
this[property].inputStack.push( this.interactiveItems ); |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="../../DefinitelyTyped/scroller/scroller.d.ts"/> | |
///<reference path="./hvlayoutgroup.ts"/> | |
module bpt { | |
// ------------------------------------------------------------------------ | |
export class DragScrollerHelperSprite extends bpt.SpritePrefab { |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="./extendedgroup.ts"/> | |
module bpt { | |
export interface ILayoutController { | |
onlayoutChange:Phaser.Signal; | |
requestLayout(); | |
handleLayout(); |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="../../DefinitelyTyped/lodash/lodash.d.ts"/> | |
///<reference path="./prefab.ts"/> | |
///<reference path="./prefab_extras.ts"/> | |
module bpt.prefab { | |
// ------------------------------------------------------------------------ |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="../../DefinitelyTyped/lodash/lodash.d.ts"/> | |
///<reference path="./prefab.ts"/> | |
///<reference path="./basic.ts"/> | |
// this really should just be a collection of utils | |
module bpt.prefab { |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="./prefab.ts"/> | |
///<reference path="./basic.ts"/> | |
///<reference path="../libs/collections.ts"/> | |
///<reference path="../../DefinitelyTyped/async/async.d.ts"/> | |
///<reference path="../../DefinitelyTyped/lodash/lodash.d.ts"/> | |
module bpt { |
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
// Author Brad P. Taylor ([email protected]) license MIT | |
export class WidgetPartDef<T> { | |
constructor( public Type:T, public regex:RegExp, public required:boolean = true ) {} | |
} | |
export class Widget<T> extends Panel { | |
constructor(game, public parts:T ) { |
OlderNewer