File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
packages/examples/src/examples/whac-a-mole Expand file tree Collapse file tree 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 {
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 ;
Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments