mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-29 21:19:18 +01:00
* Create battle-info directory and move battle-info.ts to it * Move player and enemy battle info to their own files * Move subclass specific parts of constructor to subclass constructor * Fixup mock gameobject methods to match phaser gameobject returns * Make statOrder specific to subclass * Create getShinyDescriptor function in utils * Move icon construction to its own function * Cleanup enemybattleinfo constructor to use chaining * Make flyout exclusive to EnemyBattleInfo * Move EnemyPokemon specific init Logic to its class * Break up initInfo into different methods * Remove hp bar segment dividers from base battle info * Move setMini to pokemoninfo * Breakup updateInfo into smaller parts * Remove hp info handling from base updateInfo * Use phaser object chaining methods * Add some docs * Add missing chain usage * Use getShinyDescriptor in pokemon-info-container * Minor cleanup of updatePokemonExp * Fixup setSizeToFrame mock * Ensure pokemon hp numbers are not visible during stat display * Update src/utils/common.ts Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com> * Make summary-ui-handler use new shinyDescriptor method * Remove `undefined` parameter pass Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> * Address kev's review comments Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Ensure hp number display fades in/out * Ensure ribbon and caught indicator fade with stat display * Update src/ui/battle-info/battle-info.ts Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Move construction of stats and type icons to their own methods * Make setPositionRelative return this * Improve doc comment on paddingX param * Fix mock sprite's setPositionRelative --------- Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
69 lines
1.7 KiB
TypeScript
69 lines
1.7 KiB
TypeScript
import "phaser";
|
|
|
|
declare module "phaser" {
|
|
namespace GameObjects {
|
|
interface GameObject {
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
originX: number;
|
|
|
|
originY: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
}
|
|
|
|
interface Container {
|
|
/**
|
|
* Sets this object's position relative to another object with a given offset
|
|
*/
|
|
setPositionRelative(guideObject: any, x: number, y: number): this;
|
|
}
|
|
interface Sprite {
|
|
/**
|
|
* Sets this object's position relative to another object with a given offset
|
|
*/
|
|
setPositionRelative(guideObject: any, x: number, y: number): this;
|
|
}
|
|
interface Image {
|
|
/**
|
|
* Sets this object's position relative to another object with a given offset
|
|
*/
|
|
setPositionRelative(guideObject: any, x: number, y: number): this;
|
|
}
|
|
interface NineSlice {
|
|
/**
|
|
* Sets this object's position relative to another object with a given offset
|
|
*/
|
|
setPositionRelative(guideObject: any, x: number, y: number): this;
|
|
}
|
|
interface Text {
|
|
/**
|
|
* Sets this object's position relative to another object with a given offset
|
|
*/
|
|
setPositionRelative(guideObject: any, x: number, y: number): this;
|
|
}
|
|
interface Rectangle {
|
|
/**
|
|
* Sets this object's position relative to another object with a given offset
|
|
*/
|
|
setPositionRelative(guideObject: any, x: number, y: number): this;
|
|
}
|
|
}
|
|
|
|
namespace Input {
|
|
namespace Gamepad {
|
|
interface GamepadPlugin {
|
|
/**
|
|
* Refreshes the list of connected Gamepads.
|
|
* This is called automatically when a gamepad is connected or disconnected, and during the update loop.
|
|
*/
|
|
refreshPads(): void;
|
|
}
|
|
}
|
|
}
|
|
}
|