File tree 2 files changed +5
-10
lines changed
packages/examples/src/examples/whac-a-mole
2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,7 @@ export class MoleManager extends Renderable {
10
10
11
11
constructor ( ) {
12
12
// call the super constructor
13
- super ( 0 , 0 , {
14
- width : 10 ,
15
- height : 10 ,
16
- } ) ;
13
+ super ( 0 , 0 , 10 , 10 ) ;
17
14
18
15
this . moles = [ ] ;
19
16
this . timer = 0 ;
Original file line number Diff line number Diff line change @@ -83,9 +83,8 @@ export class MoleEntity extends Sprite {
83
83
*/
84
84
display ( ) {
85
85
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 } ) ;
89
88
this . displayTween . easing ( Tween . Easing . Quadratic . Out ) ;
90
89
this . displayTween . onComplete ( this . onDisplayed . bind ( this ) ) ;
91
90
this . displayTween . start ( ) ;
@@ -107,9 +106,8 @@ export class MoleEntity extends Sprite {
107
106
*/
108
107
hide ( ) {
109
108
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 } ) ;
113
111
this . displayTween . easing ( Tween . Easing . Quadratic . In ) ;
114
112
this . displayTween . onComplete ( this . onHidden . bind ( this ) ) ;
115
113
this . displayTween . start ( ) ;
You can’t perform that action at this time.
0 commit comments