Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interactiveGames_Level
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuxing@jiuaoedu.com
interactiveGames_Level
Commits
9be0e7d4
Commit
9be0e7d4
authored
Sep 29, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
魔法咒语好了1
parent
dca64066
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
MagicSpellsCtr.ts
...ts/sceneBundle/games/magicSpells/script/MagicSpellsCtr.ts
+12
-0
No files found.
assets/sceneBundle/games/magicSpells/script/MagicSpellsCtr.ts
View file @
9be0e7d4
...
@@ -5,6 +5,7 @@ import { AudioMgr } from '../../../../startFolder/script/common/AudioMgr';
...
@@ -5,6 +5,7 @@ import { AudioMgr } from '../../../../startFolder/script/common/AudioMgr';
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
import
{
VIEW_DEF
}
from
'../../../../startFolder/script/common/ViewDef'
;
import
{
VIEW_DEF
}
from
'../../../../startFolder/script/common/ViewDef'
;
import
{
viewMgr
,
VIEW_INDEX
}
from
'../../../../startFolder/script/common/ViewMgr'
;
import
{
viewMgr
,
VIEW_INDEX
}
from
'../../../../startFolder/script/common/ViewMgr'
;
import
{
BeginCountdownView
}
from
'../../commonView/script/BeginCountdownView'
;
import
{
ChallengeFailView
}
from
'../../commonView/script/ChallengeFailView'
;
import
{
ChallengeFailView
}
from
'../../commonView/script/ChallengeFailView'
;
import
{
ChallengeSuccView
}
from
'../../commonView/script/ChallengeSuccView'
;
import
{
ChallengeSuccView
}
from
'../../commonView/script/ChallengeSuccView'
;
import
{
SwitchErrorView
}
from
'../../commonView/script/SwitchErrorView'
;
import
{
SwitchErrorView
}
from
'../../commonView/script/SwitchErrorView'
;
...
@@ -90,6 +91,10 @@ export class MagicSpellsCtr extends Component {
...
@@ -90,6 +91,10 @@ export class MagicSpellsCtr extends Component {
director
.
on
(
"quesone_asw"
,
this
.
onAswOneCall
,
this
);
director
.
on
(
"quesone_asw"
,
this
.
onAswOneCall
,
this
);
director
.
on
(
"questwo_asw"
,
this
.
onAswTwoCall
,
this
);
director
.
on
(
"questwo_asw"
,
this
.
onAswTwoCall
,
this
);
director
.
on
(
"go_answer"
,
this
.
aswOneStart
,
this
);
director
.
on
(
"go_answer"
,
this
.
aswOneStart
,
this
);
director
.
on
(
"begin_countdown_end"
,
()
=>
{
//引导
this
.
gameState
=
GAME_STATE
.
QUES
;
},
this
);
this
.
gameStart
();
this
.
gameStart
();
}
}
...
@@ -100,11 +105,18 @@ export class MagicSpellsCtr extends Component {
...
@@ -100,11 +105,18 @@ export class MagicSpellsCtr extends Component {
}
}
gameStart
()
{
gameStart
()
{
viewMgr
.
closeView
(
VIEW_DEF
.
MgcSpQueView
);
viewMgr
.
closeView
(
VIEW_DEF
.
MgcSpAswOneView
);
viewMgr
.
closeView
(
VIEW_DEF
.
MgcSpAswTwoView
);
this
.
countdownLab
.
string
=
Utils
.
formatTime
(
Math
.
floor
(
this
.
totalTime
*
1000
));
this
.
countdownLab
.
string
=
Utils
.
formatTime
(
Math
.
floor
(
this
.
totalTime
*
1000
));
this
.
curScore
=
0
;
this
.
curScore
=
0
;
this
.
curScoreLab
.
string
=
"我的"
+
this
.
curScore
+
"分"
;
this
.
curScoreLab
.
string
=
"我的"
+
this
.
curScore
+
"分"
;
this
.
succScoreLab
.
string
=
"通关≥"
+
this
.
succScore
+
"分"
;
this
.
succScoreLab
.
string
=
"通关≥"
+
this
.
succScore
+
"分"
;
this
.
roundStart
(
false
);
this
.
roundStart
(
false
);
this
.
gameState
=
GAME_STATE
.
READY
;
viewMgr
.
openView
(
VIEW_DEF
.
BeginCountdownView
,
(
node
)
=>
{
node
.
getComponent
(
BeginCountdownView
)?.
init
();
},
VIEW_INDEX
.
UPPER
);
}
}
gameEnd
()
{
gameEnd
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment