From df06dc62b7410b554d647214e4f363d42a1a042f Mon Sep 17 00:00:00 2001 From: Erin Gunn Date: Tue, 16 Aug 2016 11:58:37 -0500 Subject: [PATCH] Added missing member variables to Arcadeslopes class. Added type definitions for the Arcade.Body 'slopes' member variable. --- typescript/phaser-arcade-slopes.d.ts | 34 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/typescript/phaser-arcade-slopes.d.ts b/typescript/phaser-arcade-slopes.d.ts index 810ac5a..064a2f7 100644 --- a/typescript/phaser-arcade-slopes.d.ts +++ b/typescript/phaser-arcade-slopes.d.ts @@ -3,9 +3,11 @@ declare module Phaser { slopes:Phaser.Plugin.ArcadeSlopes; } - module Physics.Arcade { - interface Body { - slopes:Phaser.Plugin.ArcadeSlopes; + module Physics { + module Arcade { + interface Body { + slopes:Phaser.Plugin.ArcadeSlopes.BodySlopes; + } } } @@ -13,6 +15,11 @@ declare module Phaser { class ArcadeSlopes extends Phaser.Plugin { static SAT:string; static METROID:string; + + defaultSolver:string; + factory:Phaser.Plugin.ArcadeSlopes.TileSlopeFactory; + solvers:Object; + enable(obj:Phaser.Sprite | Phaser.Group):void; enableBody(body:Phaser.Physics.Arcade.Body):void; convertTilemap(map:Phaser.Tilemap, layer:number | string | Phaser.TilemapLayer, slopeMap:Object):Phaser.Tilemap; @@ -22,7 +29,6 @@ declare module Phaser { module ArcadeSlopes { - class Facade { factory:Phaser.Plugin.ArcadeSlopes.TileSlopeFactory; solvers:Object; @@ -171,6 +177,26 @@ declare module Phaser { createQuarterTopRightLow(type:number, tile:Phaser.Tile):Phaser.Plugin.ArcadeSlopes.TileSlope; createQuarterTopRightHigh(type:number, tile:Phaser.Tile):Phaser.Plugin.ArcadeSlopes.TileSlope; } + + class BodySlopes { + friction:Phaser.Point; + preferY:boolean; + pullUp:number; + pullDown:number; + pullLeft:number; + pullRight:number; + sat:Phaser.Plugin.ArcadeSlopes.BodySlopesSat; + skipFriction:boolean; + snapUp:number; + snapDown:number; + snapLeft:number; + snapRight:number; + velocity:SAT.Vector; + } + + class BodySlopesSat { + respone:SAT.Response; + } } } }