remove Agent.animationFinished()
we can just put its logic in the finish callback we give to the animation state
This commit is contained in:
parent
20240215f9
commit
b50091c5fc
2 changed files with 1 additions and 8 deletions
|
@ -164,7 +164,7 @@ export class Agent {
|
|||
|
||||
// Create and start the animation state
|
||||
this.animState = new AgentAnimationState(this, animInfo.animationData, () => {
|
||||
this.animationFinished();
|
||||
this.animState = null;
|
||||
finishCallback();
|
||||
});
|
||||
this.animState.play();
|
||||
|
@ -175,10 +175,6 @@ export class Agent {
|
|||
if (index !== -1) this.playAnimation(index, finishCallback);
|
||||
}
|
||||
|
||||
animationFinished() {
|
||||
this.animState = null;
|
||||
}
|
||||
|
||||
show() {
|
||||
this.cnv.style.display = 'block';
|
||||
this.playAnimationByName('Show', () => {});
|
||||
|
|
|
@ -47,9 +47,6 @@ function agentCharacterParseACS(buffer: BufferStream): AcsData {
|
|||
return acsData;
|
||||
}
|
||||
|
||||
// TODO this will be the public API
|
||||
// Dunno about maintaining canvases. We can pass a div into agentInit and add a characterInit() which recieves it
|
||||
// (which we then mount characters and their wordballoons into?)
|
||||
export function agentCreateCharacter(data: Uint8Array): Agent {
|
||||
return new Agent(agentCharacterParseACS(new BufferStream(data)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue