Cancelable companion resource
This commit is contained in:
parent
9696b0ab04
commit
4a9cc57d60
5 changed files with 16 additions and 8 deletions
|
@ -59,7 +59,7 @@ export abstract class Character extends Container implements OutlineableInterfac
|
|||
frame: string | number,
|
||||
isClickable: boolean,
|
||||
companion: string | null,
|
||||
companionTexturePromise?: Promise<string>
|
||||
companionTexturePromise?: CancelablePromise<string>
|
||||
) {
|
||||
super(scene, x, y /*, texture, frame*/);
|
||||
this.scene = scene;
|
||||
|
@ -179,7 +179,7 @@ export abstract class Character extends Container implements OutlineableInterfac
|
|||
});
|
||||
}
|
||||
|
||||
public addCompanion(name: string, texturePromise?: Promise<string>): void {
|
||||
public addCompanion(name: string, texturePromise?: CancelablePromise<string>): void {
|
||||
if (typeof texturePromise !== "undefined") {
|
||||
this.companion = new Companion(this.scene, this.x, this.y, name, texturePromise);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ export class RemotePlayer extends Character implements ActivatableInterface {
|
|||
moving: boolean,
|
||||
visitCardUrl: string | null,
|
||||
companion: string | null,
|
||||
companionTexturePromise?: Promise<string>,
|
||||
companionTexturePromise?: CancelablePromise<string>,
|
||||
activationRadius?: number
|
||||
) {
|
||||
super(Scene, x, y, texturesPromise, name, direction, moving, 1, true, companion, companionTexturePromise);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue