@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
31 lines (28 loc) • 1.5 kB
TypeScript
import { UPDATE_PRIORITY } from 'pixi.js';
import { T as TickerBase, a as TickerArgsType } from '../TickerBase-3rLpDpmb.js';
import { TickerIdType } from '../types/TickerIdType.js';
import '../types/StorageElementType.js';
/**
* A dictionary that contains all tickers registered and avvailable to be used.
*/
declare const registeredTickers: {
[name: TickerIdType]: typeof TickerBase;
};
/**
* Is a decorator that register a ticker in the game.
* Is a required decorator for use the ticker in the game.
* Thanks to this decoration the game has the possibility of updating the tickers to the latest modification and saving the game.
* @param name is th identifier of the label, by default is the name of the class
* @returns
*/
declare function tickerDecorator(name?: TickerIdType): (target: typeof TickerBase<any>) => void;
/**
* Get a ticker instance by the id.
* @param tickerId The id of the ticker.
* @param args The arguments that you want to pass to the ticker.
* @param duration The duration of the ticker. If is undefined, the ticker will be called every frame.
* @param priority The priority of the ticker. If is undefined, the priority will be UPDATE_PRIORITY.NORMAL.
* @returns The instance of the ticker
*/
declare function geTickerInstanceById<TArgs extends TickerArgsType>(tickerId: TickerIdType, args: TArgs, duration?: number, priority?: UPDATE_PRIORITY): TickerBase<TArgs> | undefined;
export { tickerDecorator as default, geTickerInstanceById, registeredTickers };