File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,7 @@ var SceneTestLayer3 = cc.LayerColor.extend({
153
153
ctor :function ( ) {
154
154
this . _super ( ) ;
155
155
this . init ( cc . c4b ( 0 , 128 , 255 , 255 ) ) ;
156
-
157
- if ( 'touches' in sys . capabilities )
158
- this . setTouchEnabled ( true ) ;
159
- else if ( 'mouse' in sys . capabilities )
160
- this . setMouseEnabled ( true ) ;
161
-
156
+
162
157
var label = cc . LabelTTF . create ( "Touch to popScene" , "Arial" , 28 ) ;
163
158
this . addChild ( label ) ;
164
159
var s = director . getWinSize ( ) ;
@@ -172,6 +167,13 @@ var SceneTestLayer3 = cc.LayerColor.extend({
172
167
var repeat = cc . RepeatForever . create ( rotate ) ;
173
168
sprite . runAction ( repeat ) ;
174
169
} ,
170
+
171
+ onEnterTransitionDidFinish : function ( ) {
172
+ if ( 'touches' in sys . capabilities )
173
+ this . setTouchEnabled ( true ) ;
174
+ else if ( 'mouse' in sys . capabilities )
175
+ this . setMouseEnabled ( true ) ;
176
+ } ,
175
177
176
178
testDealloc :function ( dt ) {
177
179
You can’t perform that action at this time.
0 commit comments