Constructor Summary
Public Constructor | ||
public |
constructor |
Method Summary
Public Methods | ||
public |
animate(elapsedTime: float): void animate message window |
|
public |
close(): void close message window (start animation) |
|
public |
drawBalloon(speakerX: float, speakerY: float, left: float, top: float, width: float, height: float): void draw balloon to given position |
|
public |
getCanvas(): HTMLCanvasElement get Canvas object |
|
public |
get context |
|
public |
getIcon(): HTMLImageElement get icon image |
|
public |
getMaxWidth(): int get max width |
|
public |
getMessage(): string get message text |
|
public |
get position offset |
|
public |
get screen offset |
|
public |
getState(): int get state of message window |
|
public |
open(): void open message window (start animation) |
|
public |
render(): void render message window |
|
public |
setCanvas(canvas: HTMLCanvasElement): void set Canvas object |
|
public |
setContext(context: CanvasRenderingContext2D): void set context |
|
public |
setIcon(icon: HTMLImageElement): void set icon image |
|
public |
setMaxWidth(maxWidth: int): void set max width |
|
public |
setMessage(message: string): void set message text |
|
public |
setOffset(x: float, y: float, z: float): void set position offset |
|
public |
setScreenOffset(x: float, y: float, z: float): void set screen offset |
|
public |
setupBalloonContext(): void set up balloon context |
|
public |
setupTextContext(): void set up text context |
Inherited Summary
From class DH2DObject | ||
public |
animate(elapsedTime: float): void animate object |
|
public |
move(elapsedTime: float): void move object |
|
public |
render(): void render object |
Public Constructors
Public Methods
public animate(elapsedTime: float): void source
animate message window
Override:
DH2DObject#animateParams:
Name | Type | Attribute | Description |
elapsedTime | float | elapsed time (seconds) from previous frame |
Return:
void |
public drawBalloon(speakerX: float, speakerY: float, left: float, top: float, width: float, height: float): void source
draw balloon to given position
Params:
Name | Type | Attribute | Description |
speakerX | float | ||
speakerY | float | ||
left | float | ||
top | float | ||
width | float | ||
height | float |
Return:
void |
public getCanvas(): HTMLCanvasElement source
get Canvas object
Return:
HTMLCanvasElement | Canvas object |
public getState(): int source
get state of message window
Return:
int | 0: ready, 1: opening, 2: show string, 3: waiting, 4: closing |
public setCanvas(canvas: HTMLCanvasElement): void source
set Canvas object
Params:
Name | Type | Attribute | Description |
canvas | HTMLCanvasElement | canvas object |
Return:
void |
public setContext(context: CanvasRenderingContext2D): void source
set context
Params:
Name | Type | Attribute | Description |
context | CanvasRenderingContext2D |
Return:
void |
public setIcon(icon: HTMLImageElement): void source
set icon image
Params:
Name | Type | Attribute | Description |
icon | HTMLImageElement | icon image |
Return:
void |
public setMaxWidth(maxWidth: int): void source
set max width
Params:
Name | Type | Attribute | Description |
maxWidth | int |
Return:
void |
public setMessage(message: string): void source
set message text
Params:
Name | Type | Attribute | Description |
message | string | text to show |
Return:
void |
public setOffset(x: float, y: float, z: float): void source
set position offset
Params:
Name | Type | Attribute | Description |
x | float | X value |
|
y | float | Y value |
|
z | float | Z value |
Return:
void |
public setScreenOffset(x: float, y: float, z: float): void source
set screen offset
Params:
Name | Type | Attribute | Description |
x | float | X value |
|
y | float | Y value |
|
z | float | Z value |
Return:
void |