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"/> | |
| module bpt { | |
| // ------------------------------------------------------------------------ | |
| export class SpritePrefab extends Phaser.Sprite { |
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 Rope extends Phaser.Group { | |
| constructor(game, texture, points) { | |
| PIXI.Rope.call(this, texture, points); | |
| super(game); | |
| } | |
| } | |
| bpt.prefab.applyMixins_( Rope,[PIXI.Strip,PIXI.Rope] ); | |
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 ) { |
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 | |
| ///<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="../../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="./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/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
| (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
| (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; |