UNPKG

warscript

Version:

A typescript library for Warcraft III using Warpack.

32 lines (31 loc) 1.34 kB
/** @noSelfInFile */ import { Handle, HandleDestructor } from "./handle"; import { Widget } from "./widget"; import { PlayerColor } from "./playerColor"; declare const enum EffectPropertyKey { COLOR = 100, PITCH = 101 } export type EffectParameters = { readonly scale?: number; readonly color?: PlayerColor; }; export declare class Effect extends Handle<jeffect> { private [EffectPropertyKey.COLOR]?; private [EffectPropertyKey.PITCH]?; protected onDestroy(): HandleDestructor; get color(): PlayerColor; set color(color: PlayerColor); get scale(): number; set scale(scale: number); get pitch(): number; set pitch(pitch: number); static create<T extends Effect>(this: typeof Effect & (new (handle: jeffect) => T), model: string, pos: Vec2): T; static createTarget<T extends Effect>(this: typeof Effect & (new (handle: jeffect) => T), model: string, target: Widget, attachPoint: string): T; static flash(modelPath: string, ...args: [ ...pointOrWidget: [x: number, y: number] | [widget: Widget, attachmentPoint: string], ...parametersOrDuration: [parameters?: EffectParameters] | [duration?: number, parameters?: EffectParameters] ]): void; static flashTarget(model: string, target: Widget, attachPoint: string, duration?: number): void; } export {};