Skip to content

Commit 3944671

Browse files
committed
more example TS fix
1 parent f1a9fed commit 3944671

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

packages/examples/src/examples/whac-a-mole/manager.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ export class MoleManager extends Renderable {
1010

1111
constructor() {
1212
// call the super constructor
13-
super(0, 0, {
14-
width: 10,
15-
height: 10,
16-
});
13+
super(0, 0, 10, 10);
1714

1815
this.moles = [];
1916
this.timer = 0;

packages/examples/src/examples/whac-a-mole/mole.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ export class MoleEntity extends Sprite {
8383
*/
8484
display() {
8585
const finalpos = this.initialPos - 140;
86-
this.displayTween = pool
87-
.pull("me.Tween", this.pos)
88-
.to({ y: finalpos }, { duration: 200 });
86+
this.displayTween = pool.pull("me.Tween", this.pos) as Tween;
87+
this.displayTween.to({ y: finalpos }, { duration: 200 });
8988
this.displayTween.easing(Tween.Easing.Quadratic.Out);
9089
this.displayTween.onComplete(this.onDisplayed.bind(this));
9190
this.displayTween.start();
@@ -107,9 +106,8 @@ export class MoleEntity extends Sprite {
107106
*/
108107
hide() {
109108
const finalpos = this.initialPos;
110-
this.displayTween = pool
111-
.pull("me.Tween", this.pos)
112-
.to({ y: finalpos }, { duration: 200 });
109+
this.displayTween = pool.pull("me.Tween", this.pos) as Tween;
110+
this.displayTween.to({ y: finalpos }, { duration: 200 });
113111
this.displayTween.easing(Tween.Easing.Quadratic.In);
114112
this.displayTween.onComplete(this.onHidden.bind(this));
115113
this.displayTween.start();

0 commit comments

Comments
 (0)