Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
MingSnake_241120
Commits
80a8d9b2
Commit
80a8d9b2
authored
Dec 06, 2024
by
王杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 写一点签到
parent
25c8262c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
564 additions
and
406 deletions
+564
-406
HomeScene.scene
assets/Bundles/HomeScene/HomeScene.scene
+21
-12
signPanel.prefab
assets/Bundles/SignPanel/signPanel.prefab
+481
-393
signPanel.prefab.meta
assets/Bundles/SignPanel/signPanel.prefab.meta
+1
-1
SignPanel.ts
assets/Scripts/Panels/SignPanel.ts
+54
-0
SignPanel.ts.meta
assets/Scripts/Panels/SignPanel.ts.meta
+1
-0
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+6
-0
No files found.
assets/Bundles/HomeScene/HomeScene.scene
View file @
80a8d9b2
...
@@ -478,7 +478,7 @@
...
@@ -478,7 +478,7 @@
"y": -180,
"y": -180,
"z": -12.000012657215834
"z": -12.000012657215834
},
},
"_id": "
e5yCjA/fBHQqB0Ynz3XmQ/
"
"_id": "
3fu71OSfxPJ7IxiKyTYODi
"
},
},
{
{
"__type__": "cc.UITransform",
"__type__": "cc.UITransform",
...
@@ -500,7 +500,7 @@
...
@@ -500,7 +500,7 @@
"x": 0,
"x": 0,
"y": 1
"y": 1
},
},
"_id": "
aep5EZeoFDNKlALem7PtqZ
"
"_id": "
edohtEawFLU4tTs8OP2lnf
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -536,7 +536,7 @@
...
@@ -536,7 +536,7 @@
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_useGrayscale": false,
"_atlas": null,
"_atlas": null,
"_id": "
56XdQn5DNLpru3gZCxTHuC
"
"_id": "
12HnYSKllPbZ9GnTHbpDB4
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -584,7 +584,7 @@
...
@@ -584,7 +584,7 @@
"y": -180,
"y": -180,
"z": -11.00000220913452
"z": -11.00000220913452
},
},
"_id": "
95Epc+aRNJtbk++8rW293G
"
"_id": "
33iKf63r1KeKrZHITTo9nE
"
},
},
{
{
"__type__": "cc.UITransform",
"__type__": "cc.UITransform",
...
@@ -606,7 +606,7 @@
...
@@ -606,7 +606,7 @@
"x": 0,
"x": 0,
"y": 1
"y": 1
},
},
"_id": "
f3nohNwk9CYrezNbl/59VD
"
"_id": "
08Gx9l259Hn4Ew0vcDHeGN
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -642,7 +642,7 @@
...
@@ -642,7 +642,7 @@
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_useGrayscale": false,
"_atlas": null,
"_atlas": null,
"_id": "
90lPl+nVdDSabEAZTXBAFV
"
"_id": "
5c2kpPSYdM17nukHt2zoSs
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -690,7 +690,7 @@
...
@@ -690,7 +690,7 @@
"y": -180,
"y": -180,
"z": -64.00000614258742
"z": -64.00000614258742
},
},
"_id": "
fciGIB1udHUJxd72cAVPWE
"
"_id": "
7bw8zf+TxJ2oP2XKsSQbuZ
"
},
},
{
{
"__type__": "cc.UITransform",
"__type__": "cc.UITransform",
...
@@ -712,7 +712,7 @@
...
@@ -712,7 +712,7 @@
"x": 0,
"x": 0,
"y": 1
"y": 1
},
},
"_id": "
eehDHpEM5G5agLMWMA5Sre
"
"_id": "
a8iAl9DkJHf65f4gflY9N8
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -748,7 +748,7 @@
...
@@ -748,7 +748,7 @@
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_useGrayscale": false,
"_atlas": null,
"_atlas": null,
"_id": "
b0qGl0MRpIG5c302aFTvy
K"
"_id": "
dfxIBu3hpE8KNGF8Od1vB
K"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -796,7 +796,7 @@
...
@@ -796,7 +796,7 @@
"y": 180,
"y": 180,
"z": 25.99999385741257
"z": 25.99999385741257
},
},
"_id": "
feimniHO9HoYMwQId7pwTr
"
"_id": "
9dd9iWlqlGXZ993HKNVVNZ
"
},
},
{
{
"__type__": "cc.UITransform",
"__type__": "cc.UITransform",
...
@@ -818,7 +818,7 @@
...
@@ -818,7 +818,7 @@
"x": 0,
"x": 0,
"y": 1
"y": 1
},
},
"_id": "
760O/SJ79HwreRPPbJXhlu
"
"_id": "
3fJB8xsOBBl5OV7G8au6B6
"
},
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
...
@@ -854,7 +854,7 @@
...
@@ -854,7 +854,7 @@
"_isTrimmedMode": true,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_useGrayscale": false,
"_atlas": null,
"_atlas": null,
"_id": "
daRP4utA1MzaBacM0BhGFz
"
"_id": "
cdche52+ZBboXFzn9zIxd/
"
},
},
{
{
"__type__": "cc.UITransform",
"__type__": "cc.UITransform",
...
@@ -5253,6 +5253,15 @@
...
@@ -5253,6 +5253,15 @@
"rankBtn": {
"rankBtn": {
"__id__": 25
"__id__": 25
},
},
"blessBagBtn": {
"__id__": 123
},
"PropBtn": {
"__id__": 108
},
"signBtn": {
"__id__": 114
},
"userName": {
"userName": {
"__id__": 70
"__id__": 70
},
},
...
...
assets/Bundles/SignPanel/signPanel.prefab
View file @
80a8d9b2
This diff is collapsed.
Click to expand it.
assets/Bundles/SignPanel/signPanel.prefab.meta
View file @
80a8d9b2
...
@@ -8,6 +8,6 @@
...
@@ -8,6 +8,6 @@
],
],
"subMetas": {},
"subMetas": {},
"userData": {
"userData": {
"syncNodeName": "
s
ignPanel"
"syncNodeName": "
S
ignPanel"
}
}
}
}
assets/Scripts/Panels/SignPanel.ts
0 → 100644
View file @
80a8d9b2
import
Panel
from
"../../Module/Panel"
;
import
{
_decorator
,
Button
,
Node
,}
from
"cc"
;
import
store
from
"../store/store"
;
import
{
observer
,
render
}
from
"../store/decorators"
;
const
{
ccclass
,
property
}
=
_decorator
;
import
{
HTMLRichText
}
from
"../../Component/HTMLRichText/HTMLRichText"
;
@
observer
@
ccclass
(
'SignPanel'
)
export
default
class
SignPanel
extends
Panel
{
static
bundle
=
"SignPanel"
;
static
skin
=
"SignPanel"
;
@
property
(
Node
)
closeBtn
:
Node
=
null
;
@
property
(
Node
)
signBtn
:
Node
=
null
;
onLoad
()
{
this
.
closeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickClose
);
}
async
start
()
{
// this.setRuleTxt(store.homeInfo.activityRule);
}
clickClose
=
()
=>
{
this
.
hidePanel
();
}
// @render
// render() {
// const {ruleInfo = ""} = store;
// this.setRuleTxt(ruleInfo);
// }
setRuleTxt
(
txt
:
string
)
{
// this.spNode.getComponent(HTMLRichText).html = txt;
// this.spNode.once(HTMLRichText.EventType.AFTER_RENDER, ()=>{
// const {width: pw, height: ph} = this.spNode.getComponent(UITransform);
// const width = this.spNode.parent.getComponent(UITransform).width;
// const height = ph * width / pw;
// this.spNode.getComponent(UITransform).setContentSize(width, height);
// });
}
}
assets/Scripts/Panels/SignPanel.ts.meta
0 → 100644
View file @
80a8d9b2
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"471fae17-612c-411b-8e0e-8ad152176179","files":[],"subMetas":{},"userData":{}}
assets/Scripts/Scenes/HomeScene.ts
View file @
80a8d9b2
...
@@ -15,6 +15,7 @@ import { RankScence } from "./RankScene";
...
@@ -15,6 +15,7 @@ import { RankScence } from "./RankScene";
import
{
BlessingBagPage
}
from
"db://assets/Scripts/Scenes/BlessingBagPage"
;
import
{
BlessingBagPage
}
from
"db://assets/Scripts/Scenes/BlessingBagPage"
;
import
{
PropPage
}
from
"db://assets/Scripts/Scenes/PropPage"
;
import
{
PropPage
}
from
"db://assets/Scripts/Scenes/PropPage"
;
import
{
AudioMgr
}
from
"../../core_tgx/base/AudioMgr"
;
import
{
AudioMgr
}
from
"../../core_tgx/base/AudioMgr"
;
import
SignPanel
from
"../Panels/SignPanel"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -32,6 +33,7 @@ export class HomeScene extends Scene {
...
@@ -32,6 +33,7 @@ export class HomeScene extends Scene {
@
property
(
Node
)
rankBtn
:
Node
=
null
;
@
property
(
Node
)
rankBtn
:
Node
=
null
;
@
property
(
Node
)
blessBagBtn
:
Node
=
null
;
@
property
(
Node
)
blessBagBtn
:
Node
=
null
;
@
property
(
Node
)
PropBtn
:
Node
=
null
;
@
property
(
Node
)
PropBtn
:
Node
=
null
;
@
property
(
Node
)
signBtn
:
Node
=
null
;
@
property
(
Label
)
userName
:
Label
;
@
property
(
Label
)
userName
:
Label
;
@
property
(
Label
)
pointNum
:
Label
;
@
property
(
Label
)
pointNum
:
Label
;
...
@@ -44,6 +46,7 @@ export class HomeScene extends Scene {
...
@@ -44,6 +46,7 @@ export class HomeScene extends Scene {
this
.
rankBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRank
,
this
);
this
.
rankBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRank
,
this
);
this
.
blessBagBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickBag
,
this
);
this
.
blessBagBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickBag
,
this
);
this
.
PropBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickProp
,
this
);
this
.
PropBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickProp
,
this
);
this
.
signBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickSign
,
this
);
}
}
async
start
()
{
async
start
()
{
...
@@ -88,6 +91,9 @@ export class HomeScene extends Scene {
...
@@ -88,6 +91,9 @@ export class HomeScene extends Scene {
await
changeScene
(
BlessingBagPage
)
await
changeScene
(
BlessingBagPage
)
})
})
clickSign
=
_asyncThrottle
(
async
()
=>
{
showPanel
(
SignPanel
);
});
clickProp
=
_asyncThrottle
(
async
()
=>
{
clickProp
=
_asyncThrottle
(
async
()
=>
{
await
changeScene
(
PropPage
)
await
changeScene
(
PropPage
)
...
...
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