mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 09:16:03 +00:00
myster-encounter-intro.ts improve types and documentation
This commit is contained in:
parent
d9ea676a92
commit
81112eeabe
@ -2,19 +2,48 @@ import { GameObjects } from "phaser";
|
|||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
import MysteryEncounter from "../data/mystery-encounters/mystery-encounter";
|
import MysteryEncounter from "../data/mystery-encounters/mystery-encounter";
|
||||||
|
|
||||||
type KnownFileRoot = "trainer" | "pokemon" | "arenas" | "battle_anims" | "cg" | "character" | "effect" | "egg" | "events" | "inputs" | "items" | "mystery-encounters" | "pokeball" | "pokemon" | "statuses" | "trainer" | "ui";
|
type KnownFileRoot =
|
||||||
|
| "trainer"
|
||||||
|
| "pokemon"
|
||||||
|
| "arenas"
|
||||||
|
| "battle_anims"
|
||||||
|
| "cg"
|
||||||
|
| "character"
|
||||||
|
| "effect"
|
||||||
|
| "egg"
|
||||||
|
| "events"
|
||||||
|
| "inputs"
|
||||||
|
| "items"
|
||||||
|
| "mystery-encounters"
|
||||||
|
| "pokeball"
|
||||||
|
| "pokemon"
|
||||||
|
| "statuses"
|
||||||
|
| "trainer"
|
||||||
|
| "ui";
|
||||||
|
|
||||||
export class MysteryEncounterSpriteConfig {
|
export class MysteryEncounterSpriteConfig {
|
||||||
spriteKey: string; // e.g. "ace_trainer_f"
|
/** The sprite key (which is the image file name). e.g. "ace_trainer_f" */
|
||||||
fileRoot: KnownFileRoot & string; // Refer to /public/images directory for the folder name
|
spriteKey: string;
|
||||||
hasShadow?: boolean = false; // Spawns shadow underneath sprite
|
/** Refer to [/public/images](../../public/images) directorty for all folder names */
|
||||||
disableAnimation?: boolean = false; // Animates frames or not
|
fileRoot: KnownFileRoot & string;
|
||||||
repeat?: boolean = false; // Cycles animation
|
/** Enable shadow. Defaults to `false` */
|
||||||
|
hasShadow?: boolean = false;
|
||||||
|
/** Disable animation. Defaults to `false` */
|
||||||
|
disableAnimation?: boolean = false;
|
||||||
|
/** Depeat the animation. Defaults to `false` */
|
||||||
|
repeat?: boolean = false;
|
||||||
|
/** Tint color. `0` - `1`. Higher means darker tint. */
|
||||||
tint?: number;
|
tint?: number;
|
||||||
x?: number; // X offset
|
/** X offset */
|
||||||
y?: number; // Y offset
|
x?: number;
|
||||||
|
/** Y offset */
|
||||||
|
y?: number;
|
||||||
|
/** Sprite scale. `0` - `n` */
|
||||||
scale?: number;
|
scale?: number;
|
||||||
isItem?: boolean; // For item sprites, set to true
|
/** If you are using an item sprite, set to `true` */
|
||||||
|
isItem?: boolean;
|
||||||
|
/** The sprites alpha. `0` - `1` The lower the number, the more transparent */
|
||||||
|
alpha?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user