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
dca64066
Commit
dca64066
authored
Sep 29, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
魔法咒语好了
parent
c32713d5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
172 additions
and
20 deletions
+172
-20
MgcSpQueItem.prefab
.../sceneBundle/games/magicSpells/prefab/MgcSpQueItem.prefab
+3
-3
MagicSpells_1.scene
...s/sceneBundle/games/magicSpells/scene/MagicSpells_1.scene
+86
-8
MagicSpells_1.scene.meta
...neBundle/games/magicSpells/scene/MagicSpells_1.scene.meta
+0
-0
MagicSpellsCtr.ts
...ts/sceneBundle/games/magicSpells/script/MagicSpellsCtr.ts
+44
-5
QuickQuizCtr.ts
assets/sceneBundle/games/quickQuiz/script/QuickQuizCtr.ts
+12
-2
LevelCfg.ts
assets/startFolder/script/LevelCfg.ts
+18
-0
LevelHomeCtr.ts
assets/startFolder/script/LevelHomeCtr.ts
+2
-2
SceneDef.ts
assets/startFolder/script/common/SceneDef.ts
+7
-0
No files found.
assets/sceneBundle/games/magicSpells/prefab/MgcSpQueItem.prefab
View file @
dca64066
...
@@ -342,7 +342,7 @@
...
@@ -342,7 +342,7 @@
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 0,
"x": 0,
"y":
-114.222
,
"y":
0
,
"z": 0
"z": 0
},
},
"_lrot": {
"_lrot": {
...
@@ -380,8 +380,8 @@
...
@@ -380,8 +380,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
160
,
"width":
224
,
"height":
50
"height":
282
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
...
assets/sceneBundle/games/magicSpells/scene/MagicSpells.scene
→
assets/sceneBundle/games/magicSpells/scene/MagicSpells
_1
.scene
View file @
dca64066
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
},
},
{
{
"__type__": "cc.Scene",
"__type__": "cc.Scene",
"_name": "MagicSpells",
"_name": "MagicSpells
_1
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": null,
"_parent": null,
"_children": [
"_children": [
...
@@ -22,6 +22,9 @@
...
@@ -22,6 +22,9 @@
},
},
{
{
"__id__": 7
"__id__": 7
},
{
"__id__": 70
}
}
],
],
"_active": true,
"_active": true,
...
@@ -29,7 +32,7 @@
...
@@ -29,7 +32,7 @@
"_prefab": null,
"_prefab": null,
"autoReleaseAssets": false,
"autoReleaseAssets": false,
"_globals": {
"_globals": {
"__id__": 7
0
"__id__": 7
3
},
},
"_id": "31b6bf24-7062-4edc-ba09-5fd282192579"
"_id": "31b6bf24-7062-4edc-ba09-5fd282192579"
},
},
...
@@ -312,7 +315,7 @@
...
@@ -312,7 +315,7 @@
"_priority": 1073741824,
"_priority": 1073741824,
"_fov": 45,
"_fov": 45,
"_fovAxis": 0,
"_fovAxis": 0,
"_orthoHeight": 41
8.6192468619247
,
"_orthoHeight": 41
4.4124472573839
,
"_near": 1,
"_near": 1,
"_far": 2000,
"_far": 2000,
"_color": {
"_color": {
...
@@ -1722,7 +1725,7 @@
...
@@ -1722,7 +1725,7 @@
},
},
"_enabled": true,
"_enabled": true,
"__prefab": null,
"__prefab": null,
"totalTime":
30
0,
"totalTime":
6
0,
"oneScore": 10,
"oneScore": 10,
"succScore": 200,
"succScore": 200,
"curScoreLab": {
"curScoreLab": {
...
@@ -1751,19 +1754,94 @@
...
@@ -1751,19 +1754,94 @@
"quesIfoCount": 5,
"quesIfoCount": 5,
"_id": "78ClK1kytPYZ7ZnlrSEX1M"
"_id": "78ClK1kytPYZ7ZnlrSEX1M"
},
},
{
"__type__": "cc.Node",
"_name": "Audio",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 71
},
{
"__id__": 72
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "a6OA2wx3JNA6oiMyToEsyg"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
},
"_enabled": true,
"__prefab": null,
"_clip": null,
"_loop": false,
"_playOnAwake": true,
"_volume": 1,
"_id": "1dIRG4FkdDDK51rb37C3G3"
},
{
"__type__": "a46f84T2a1GlbP4xSghryjX",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
},
"_enabled": true,
"__prefab": null,
"audioSource": {
"__id__": 71
},
"_id": "acebgi7bZMsYJe6NAYG6Ez"
},
{
{
"__type__": "cc.SceneGlobals",
"__type__": "cc.SceneGlobals",
"ambient": {
"ambient": {
"__id__": 7
1
"__id__": 7
4
},
},
"shadows": {
"shadows": {
"__id__": 7
2
"__id__": 7
5
},
},
"_skybox": {
"_skybox": {
"__id__": 7
3
"__id__": 7
6
},
},
"fog": {
"fog": {
"__id__": 7
4
"__id__": 7
7
}
}
},
},
{
{
...
...
assets/sceneBundle/games/magicSpells/scene/MagicSpells.scene.meta
→
assets/sceneBundle/games/magicSpells/scene/MagicSpells
_1
.scene.meta
View file @
dca64066
File moved
assets/sceneBundle/games/magicSpells/script/MagicSpellsCtr.ts
View file @
dca64066
import
{
_decorator
,
Component
,
Node
,
director
,
CCInteger
,
Label
,
CCFloat
,
CCString
,
v3
}
from
'cc'
;
import
{
_decorator
,
Component
,
Node
,
director
,
CCInteger
,
Label
,
CCFloat
,
CCString
,
v3
}
from
'cc'
;
import
{
countdownMus
}
from
'../../../../startFolder/script/common/AudioDef'
;
import
{
countdownMus
,
failMus
,
rightMus
,
succMus
,
wrongMus
}
from
'../../../../startFolder/script/common/AudioDef'
;
import
{
AudioMgr
}
from
'../../../../startFolder/script/common/AudioMgr'
;
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
}
from
'../../../../startFolder/script/common/ViewMgr'
;
import
{
viewMgr
,
VIEW_INDEX
}
from
'../../../../startFolder/script/common/ViewMgr'
;
import
{
ChallengeFailView
}
from
'../../commonView/script/ChallengeFailView'
;
import
{
ChallengeSuccView
}
from
'../../commonView/script/ChallengeSuccView'
;
import
{
SwitchErrorView
}
from
'../../commonView/script/SwitchErrorView'
;
import
{
SwitchOkView
}
from
'../../commonView/script/SwitchOkView'
;
import
{
MgcSpAswOneView
}
from
'./MgcSpAswOneView'
;
import
{
MgcSpAswOneView
}
from
'./MgcSpAswOneView'
;
import
{
MgcSpAswTwoView
}
from
'./MgcSpAswTwoView'
;
import
{
MgcSpAswTwoView
}
from
'./MgcSpAswTwoView'
;
import
{
MgcSpQueView
}
from
'./MgcSpQueView'
;
import
{
MgcSpQueView
}
from
'./MgcSpQueView'
;
...
@@ -69,6 +73,16 @@ export class MagicSpellsCtr extends Component {
...
@@ -69,6 +73,16 @@ export class MagicSpellsCtr extends Component {
//@ts-ignore
//@ts-ignore
this
.
totalTime
=
resData
.
totalTime
;
this
.
totalTime
=
resData
.
totalTime
;
}
}
//@ts-ignore
if
(
resData
.
succScore
)
{
//@ts-ignore
this
.
succScore
=
resData
.
succScore
;
}
//@ts-ignore
if
(
resData
.
oneScore
)
{
//@ts-ignore
this
.
oneScore
=
resData
.
oneScore
;
}
}
}
start
()
{
start
()
{
...
@@ -95,7 +109,18 @@ export class MagicSpellsCtr extends Component {
...
@@ -95,7 +109,18 @@ export class MagicSpellsCtr extends Component {
gameEnd
()
{
gameEnd
()
{
this
.
gameState
=
GAME_STATE
.
END
;
this
.
gameState
=
GAME_STATE
.
END
;
if
(
this
.
curScore
>=
this
.
succScore
)
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
AudioMgr
.
playOneShot
(
succMus
);
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
}
else
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeFailView
,
(
view
)
=>
{
AudioMgr
.
playOneShot
(
failMus
);
view
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
}
}
roundStart
(
isDelay
:
boolean
)
{
roundStart
(
isDelay
:
boolean
)
{
...
@@ -145,9 +170,16 @@ export class MagicSpellsCtr extends Component {
...
@@ -145,9 +170,16 @@ export class MagicSpellsCtr extends Component {
if
(
this
.
gameState
!=
GAME_STATE
.
ASW_1
)
return
;
if
(
this
.
gameState
!=
GAME_STATE
.
ASW_1
)
return
;
if
(
this
.
isSameItemIfo
(
this
.
rightIfo
!
,
ifo
))
{
if
(
this
.
isSameItemIfo
(
this
.
rightIfo
!
,
ifo
))
{
this
.
curScore
+=
this
.
oneScore
;
this
.
curScore
+=
this
.
oneScore
;
AudioMgr
.
playOneShot
(
rightMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchOkView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchOkView
)?.
init
(
0.5
);
});
}
}
else
{
else
{
AudioMgr
.
playOneShot
(
wrongMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchErrorView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchErrorView
)?.
init
(
0.5
);
});
}
}
this
.
curScoreLab
.
string
=
"我的"
+
this
.
curScore
+
"分"
;
this
.
curScoreLab
.
string
=
"我的"
+
this
.
curScore
+
"分"
;
this
.
aswTwoStart
();
this
.
aswTwoStart
();
...
@@ -177,9 +209,16 @@ export class MagicSpellsCtr extends Component {
...
@@ -177,9 +209,16 @@ export class MagicSpellsCtr extends Component {
if
(
this
.
gameState
!=
GAME_STATE
.
ASW_2
)
return
;
if
(
this
.
gameState
!=
GAME_STATE
.
ASW_2
)
return
;
if
(
this
.
isSameItemIfo
(
this
.
rightIfo
!
,
ifo
))
{
if
(
this
.
isSameItemIfo
(
this
.
rightIfo
!
,
ifo
))
{
this
.
curScore
+=
this
.
oneScore
;
this
.
curScore
+=
this
.
oneScore
;
AudioMgr
.
playOneShot
(
rightMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchOkView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchOkView
)?.
init
(
0.5
);
});
}
}
else
{
else
{
AudioMgr
.
playOneShot
(
wrongMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchErrorView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchErrorView
)?.
init
(
0.5
);
});
}
}
this
.
curScoreLab
.
string
=
"我的"
+
this
.
curScore
+
"分"
;
this
.
curScoreLab
.
string
=
"我的"
+
this
.
curScore
+
"分"
;
viewMgr
.
getView
(
VIEW_DEF
.
MgcSpAswTwoView
).
getComponent
(
MgcSpAswTwoView
)?.
playDisappear
(()
=>
{
viewMgr
.
getView
(
VIEW_DEF
.
MgcSpAswTwoView
).
getComponent
(
MgcSpAswTwoView
)?.
playDisappear
(()
=>
{
...
...
assets/sceneBundle/games/quickQuiz/script/QuickQuizCtr.ts
View file @
dca64066
...
@@ -59,12 +59,22 @@ export class QuickQuizCtr extends Component {
...
@@ -59,12 +59,22 @@ export class QuickQuizCtr extends Component {
private
costTime
=
0
;
private
costTime
=
0
;
private
isPlayCountdownMus
=
false
;
private
isPlayCountdownMus
=
false
;
setGameData
(
resData
:
object
){
setGameData
(
resData
:
object
)
{
//@ts-ignore
//@ts-ignore
if
(
resData
.
totalTime
)
{
if
(
resData
.
totalTime
)
{
//@ts-ignore
//@ts-ignore
this
.
totalTime
=
resData
.
totalTime
;
this
.
totalTime
=
resData
.
totalTime
;
}
}
//@ts-ignore
if
(
resData
.
succScore
)
{
//@ts-ignore
this
.
succScore
=
resData
.
succScore
;
}
//@ts-ignore
if
(
resData
.
oneScore
)
{
//@ts-ignore
this
.
oneScore
=
resData
.
oneScore
;
}
}
}
start
()
{
start
()
{
...
...
assets/startFolder/script/LevelCfg.ts
View file @
dca64066
...
@@ -831,4 +831,21 @@ export const levelCfg: OneVarLevelItf[] = [
...
@@ -831,4 +831,21 @@ export const levelCfg: OneVarLevelItf[] = [
}
}
]
]
}
}
,
{
gameIdHead
:
120
,
title
:
"魔法咒语"
,
desc
:
"魔法咒语"
,
levelArr
:
[{
gameId
:
12001
,
sceneUnitIfo
:
SCENE_DEF
.
MagicSpells_1
,
comName
:
"MagicSpellsCtr"
,
level
:
1
,
resData
:
{
totalTime
:
120
,
succScore
:
60
,
oneScore
:
6
}
}
]
}
];
];
\ No newline at end of file
assets/startFolder/script/LevelHomeCtr.ts
View file @
dca64066
...
@@ -23,8 +23,8 @@ export class LevelHomeCtr extends Component {
...
@@ -23,8 +23,8 @@ export class LevelHomeCtr extends Component {
// [3]
// [3]
if
(
!
levelMgr
.
loadedOutData
)
{
if
(
!
levelMgr
.
loadedOutData
)
{
levelMgr
.
loadedOutData
=
true
;
levelMgr
.
loadedOutData
=
true
;
levelMgr
.
gameIdHead
=
10
;
levelMgr
.
gameIdHead
=
1
2
0
;
levelMgr
.
unLockCount
=
6
;
levelMgr
.
unLockCount
=
1
;
if
(
Utils
.
getValueFromHref
(
"gameIdHead"
)){
if
(
Utils
.
getValueFromHref
(
"gameIdHead"
)){
levelMgr
.
gameIdHead
=
Number
(
Utils
.
getValueFromHref
(
"gameIdHead"
));
levelMgr
.
gameIdHead
=
Number
(
Utils
.
getValueFromHref
(
"gameIdHead"
));
}
}
...
...
assets/startFolder/script/common/SceneDef.ts
View file @
dca64066
...
@@ -84,6 +84,8 @@ interface ScenePathItf {
...
@@ -84,6 +84,8 @@ interface ScenePathItf {
FoodForTheParty_2
:
ScenePathUnitItf
,
FoodForTheParty_2
:
ScenePathUnitItf
,
//快问快答
//快问快答
QuickQuiz_1
:
ScenePathUnitItf
,
QuickQuiz_1
:
ScenePathUnitItf
,
//魔法咒语
MagicSpells_1
:
ScenePathUnitItf
,
}
}
export
const
SCENE_DEF
:
ScenePathItf
=
{
export
const
SCENE_DEF
:
ScenePathItf
=
{
TestScene
:
{
TestScene
:
{
...
@@ -361,6 +363,11 @@ export const SCENE_DEF: ScenePathItf = {
...
@@ -361,6 +363,11 @@ export const SCENE_DEF: ScenePathItf = {
sceneName
:
"QuickQuiz_1"
,
sceneName
:
"QuickQuiz_1"
,
desc
:
"快问快答,第一个版本"
desc
:
"快问快答,第一个版本"
},
},
MagicSpells_1
:
{
bundleName
:
"sceneBundle"
,
sceneName
:
"MagicSpells_1"
,
desc
:
"魔法咒语,第一个版本"
},
}
}
/**
/**
* [1] Class member could be defined like this.
* [1] Class member could be defined like this.
...
...
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