Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TNGD_CaveCruiser
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
TNGD_CaveCruiser
Commits
e0897562
Commit
e0897562
authored
Aug 14, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改
parent
9a57c5d1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
175 additions
and
24 deletions
+175
-24
NoPrizePanel.ts
assets/Scripts/Panels/NoPrizePanel.ts
+1
-0
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+7
-1
GuideLayer.ts
assets/Scripts/Scenes/MainGame/GuideLayer.ts
+7
-2
WebNet.ts
assets/Scripts/Utils/WebNet/WebNet.ts
+1
-0
HomeScene.scene
assets/resources/HomeScene/HomeScene.scene
+158
-20
index.do.json
preview-template/mock/game/index.do.json
+1
-1
No files found.
assets/Scripts/Panels/NoPrizePanel.ts
View file @
e0897562
...
...
@@ -36,6 +36,7 @@ export default class NoPrizePanel extends Panel {
clickAgain
=
async
()
=>
{
this
.
hidePanel
();
if
(
store
.
homeInfo
.
leftTimes
<=
0
)
{
changeScene
(
HomeScene
);
showToast
(
"没次数啦,明天再来吧!"
);
}
else
{
await
GameMgr
.
ins
.
start
();
...
...
assets/Scripts/Scenes/HomeScene.ts
View file @
e0897562
...
...
@@ -28,6 +28,9 @@ export class HomeScene extends Scene {
@
property
(
Node
)
ruleBtn
:
Node
=
null
;
@
property
(
Label
)
leftTime
:
Label
=
null
;
onLoad
()
{
this
.
startBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickStart
,
this
);
this
.
prizeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickPrize
,
this
);
...
...
@@ -40,7 +43,10 @@ export class HomeScene extends Scene {
@
render
render
()
{
const
{}
=
store
.
homeInfo
||
{};
const
{
leftTimes
}
=
store
.
homeInfo
||
{};
this
.
leftTime
.
node
.
active
=
leftTimes
<=
10
;
this
.
leftTime
.
string
=
`剩余游戏次数:
${
leftTimes
}
`
;
}
...
...
assets/Scripts/Scenes/MainGame/GuideLayer.ts
View file @
e0897562
import
{
_decorator
,
Component
,
Node
}
from
'cc'
;
import
{
sendWebNetWithToken
,
WebNetName
}
from
"../../Utils/WebNet/WebNet"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -17,16 +18,20 @@ export class GuideLayer extends Component {
this
.
node
.
on
(
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
sendWebNetWithToken
(
WebNetName
.
guide
,
{
flag
:
1
,
},
null
,
null
,
false
);
}
index
=
0
;
onTouchEnd
()
{
this
.
index
++
;
if
(
this
.
index
==
1
)
{
if
(
this
.
index
==
1
)
{
this
.
guide1
.
active
=
false
;
this
.
guide2
.
active
=
true
;
}
else
{
}
else
{
this
.
node
.
active
=
false
;
}
...
...
assets/Scripts/Utils/WebNet/WebNet.ts
View file @
e0897562
...
...
@@ -84,6 +84,7 @@ export const ERR_MESSAGE = {
"100001"
:
"登录过期啦,请重新登录哦~"
,
"5001033"
:
"该局使用该道具次数已达上限"
,
"5001041"
:
"网络异常,请稍后再试"
,
"100018"
:
"网络异常,刷新一下再试"
,
// "300001": "您的积分不足\n快去获取积分参与游戏吧~",
// "400001": "系统维护中,请稍后尝试",
// "400004": "您的积分不足\n快去获取积分参与游戏吧~",
...
...
assets/resources/HomeScene/HomeScene.scene
View file @
e0897562
...
...
@@ -52,7 +52,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 3
0
"__id__": 3
3
},
"_id": "04224ebd-adcd-4112-8010-da14ed5ea48a"
},
...
...
@@ -84,22 +84,22 @@
"_active": true,
"_components": [
{
"__id__": 2
6
"__id__": 2
9
},
{
"__id__":
27
"__id__":
30
},
{
"__id__":
28
"__id__":
31
},
{
"__id__":
29
"__id__":
32
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 37
4.99999999999994
,
"x": 37
5
,
"y": 812,
"z": 0
},
...
...
@@ -386,7 +386,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 34
0.99999999999994
,
"x": 34
1
,
"y": 278.7106,
"z": 0
},
...
...
@@ -581,7 +581,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 34
0.99999999999994
,
"x": 34
1
,
"y": 147.8918,
"z": 0
},
...
...
@@ -760,15 +760,18 @@
"_children": [
{
"__id__": 20
},
{
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 2
4
"__id__": 2
7
},
{
"__id__": 2
5
"__id__": 2
8
}
],
"_prefab": null,
...
...
@@ -965,6 +968,138 @@
},
"_id": "9aqrJdPU1GQKK/syjygRNs"
},
{
"__type__": "cc.Node",
"_name": "leftTime",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 19
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 25
},
{
"__id__": 26
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -80.672,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "ecHnEil4dGhJ9au181todZ"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 24
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 205.34765625,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "0eMGIdwidC074aO5RU5n58"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 24
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_string": "剩余游戏次数:0次",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 24,
"_fontSize": 24,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "0dMUlB43tMzZLKN2wRRyTK"
},
{
"__type__": "cc.UITransform",
"_name": "",
...
...
@@ -977,7 +1112,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 7
49.9999999999999
,
"width": 7
50
,
"height": 0
},
"_anchorPoint": {
...
...
@@ -1029,7 +1164,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 7
49.9999999999999
,
"width": 7
50
,
"height": 1624
},
"_anchorPoint": {
...
...
@@ -1105,33 +1240,36 @@
"ruleBtn": {
"__id__": 9
},
"leftTime": {
"__id__": 26
},
"_id": "30ywpmE6RNsozfsd/NXO0o"
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 3
1
"__id__": 3
4
},
"shadows": {
"__id__": 3
2
"__id__": 3
5
},
"_skybox": {
"__id__": 3
3
"__id__": 3
6
},
"fog": {
"__id__": 3
4
"__id__": 3
7
},
"octree": {
"__id__": 3
5
"__id__": 3
8
},
"skin": {
"__id__": 3
6
"__id__": 3
9
},
"lightProbeInfo": {
"__id__":
37
"__id__":
40
},
"postSettings": {
"__id__":
38
"__id__":
41
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
...
...
preview-template/mock/game/index.do.json
View file @
e0897562
...
...
@@ -7,7 +7,7 @@
"actEndTimestamp"
:
1735660799000
,
"currentTimestamp"
:
1723000150448
,
"addDailyFreeTimes"
:
30
,
"leftTimes"
:
3
0
,
"leftTimes"
:
1
0
,
"newGuideFlag"
:
0
}
}
\ No newline at end of file
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