import { EightBittr } from "../../EightBittr"; import { Actor } from "../../types"; import { Section } from "../Section"; /** * Adds and removes visual classes for Actors. */ export declare class Classes extends Section { /** * Sets the class of an Actor, sets the new sprite for it, and marks it as * having changed appearance. The class is stored in the Actor's internal * .className attribute. * * @param actor * @param className A new .className for the Actor. */ setClass(actor: Actor, className: string): void; /** * A version of setClass to be used before the Actor's sprite attributes * have been set. This just sets the internal .className. * * @param actor * @param className A new .className for the Actor. */ setClassInitial(actor: Actor, className: string): void; /** * Adds a string to an Actor's class after a " ", updates the Actor's * sprite, and marks it as having changed appearance. * * @param actor * @param className A class to add to the Actor. */ addClass(actor: Actor, className: string): void; /** * Adds multiple strings to an Actor's class after a " ", updates the Actor's * sprite, and marks it as having changed appearance. Strings may be given * as Arrays or Strings; Strings will be split on " ". Any number of * additional arguments may be given. * * @param actor * @param classes Any number of classes to add to the Actor. */ addClasses(actor: Actor, ...classes: (string | string[])[]): void; /** * Removes a string from an Actor's class, updates the Actor's sprite, and * marks it as having changed appearance. * * @param actor * @param className A class to remove from the Actor. */ removeClass(actor: Actor, className: string): void; /** * Removes multiple strings from an Actor's class, updates the Actor's * sprite, and marks it as having changed appearance. Strings may be given * as Arrays or Strings; Strings will be split on " ". Any number of * additional arguments may be given. * * @param actor * @param classes Any number of classes to remove from the Actor. */ removeClasses(actor: Actor, ...classes: (string | string[])[]): void; /** * @param actor * @param className A class to check for in the Actor. * @returns Whether the Actor's class contains the class. */ hasClass(actor: Actor, className: string): boolean; /** * Removes the first class from an Actor and adds the second. All typical * sprite updates are called. * * @param actor * @param classNameOut A class to remove from the Actor. * @param classNameIn A class to add to the actor. */ switchClass(actor: Actor, classNameOut: string, classNameIn: string): void; } //# sourceMappingURL=Classes.d.ts.map