Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car
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
car
Commits
e116cdf6
Commit
e116cdf6
authored
Jun 04, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
aff1cac5
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
586 additions
and
22 deletions
+586
-22
PrizePanel.prefab
assets/Bundles/GamePanel/PrizePanel.prefab
+429
-21
btnBg.png
assets/Bundles/GamePanel/png/btnBg.png
+0
-0
btnBg.png.meta
assets/Bundles/GamePanel/png/btnBg.png.meta
+134
-0
PrizePanel.ts
assets/Scripts/Panels/PrizePanel.ts
+22
-0
project.settings.json
project.settings.json
+1
-1
No files found.
assets/Bundles/GamePanel/PrizePanel.prefab
View file @
e116cdf6
This diff is collapsed.
Click to expand it.
assets/Bundles/GamePanel/png/btnBg.png
0 → 100644
View file @
e116cdf6
16.6 KB
assets/Bundles/GamePanel/png/btnBg.png.meta
0 → 100644
View file @
e116cdf6
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "cf1d6984-848b-479e-8cb6-06c8c5891dc8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "cf1d6984-848b-479e-8cb6-06c8c5891dc8@6c48a",
"displayName": "btnBg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "cf1d6984-848b-479e-8cb6-06c8c5891dc8",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "cf1d6984-848b-479e-8cb6-06c8c5891dc8@f9941",
"displayName": "btnBg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 334,
"height": 77,
"rawWidth": 334,
"rawHeight": 77,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-167,
-38.5,
0,
167,
-38.5,
0,
-167,
38.5,
0,
167,
38.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
77,
334,
77,
0,
0,
334,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-167,
-38.5,
0
],
"maxPos": [
167,
38.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "cf1d6984-848b-479e-8cb6-06c8c5891dc8@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "cf1d6984-848b-479e-8cb6-06c8c5891dc8@6c48a"
}
}
assets/Scripts/Panels/PrizePanel.ts
View file @
e116cdf6
import
{
_decorator
,
Button
,
Label
,
Node
,
Sprite
,
SpriteFrame
}
from
'cc'
;
import
{
_decorator
,
Button
,
Label
,
Node
,
Sprite
,
SpriteFrame
}
from
'cc'
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
Panel
from
"db://assets/core/Module/Panel"
;
import
Panel
from
"db://assets/core/Module/Panel"
;
import
{
observer
,
render
}
from
"db://assets/Scripts/store/decorators"
;
import
store
from
"db://assets/Scripts/store/store"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
@
observer
@
ccclass
(
'PrizePanel'
)
@
ccclass
(
'PrizePanel'
)
export
class
PrizePanel
extends
Panel
{
export
class
PrizePanel
extends
Panel
{
static
skin
:
string
=
"PrizePanel"
;
static
skin
:
string
=
"PrizePanel"
;
static
bundle
:
string
=
"GamePanel"
;
static
bundle
:
string
=
"GamePanel"
;
@
property
(
Node
)
okBtn
:
Node
=
null
;
@
property
(
Node
)
okBtn
:
Node
=
null
;
@
property
(
Node
)
okBtn2
:
Node
=
null
;
@
property
(
Node
)
closeBtn
:
Node
=
null
;
@
property
(
Node
)
closeBtn
:
Node
=
null
;
@
property
(
Sprite
)
img
:
Sprite
=
null
;
@
property
(
Sprite
)
img
:
Sprite
=
null
;
...
@@ -21,6 +25,24 @@ export class PrizePanel extends Panel {
...
@@ -21,6 +25,24 @@ export class PrizePanel extends Panel {
this
.
closeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
cancel
,
this
);
this
.
closeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
cancel
,
this
);
}
}
@
render
render
()
{
const
{
boxConfigs
}
=
store
.
homeInfo
;
const
noOpen
=
boxConfigs
?.
filter
((
item
)
=>
{
return
+
item
.
status
!=
1
});
if
(
noOpen
?.
length
)
{
this
.
okBtn2
.
active
=
true
;
this
.
okBtn
.
active
=
false
;
this
.
okBtn
.
getComponentInChildren
(
Label
).
string
=
`继续开宝箱(
${
noOpen
.
length
}
)`
;
}
else
{
this
.
okBtn2
.
active
=
false
;
this
.
okBtn
.
active
=
true
;
}
}
start
():
void
{
start
():
void
{
const
{
optionImg
,
optionName
}
=
this
.
data
;
const
{
optionImg
,
optionName
}
=
this
.
data
;
this
.
img
.
spriteFrame
=
optionImg
;
this
.
img
.
spriteFrame
=
optionImg
;
...
...
project.settings.json
View file @
e116cdf6
{
"proSetting"
:{
"projectxIDs"
:{
"testId"
:[{
"label"
:
"test"
,
"value"
:
"p80bfa061"
}],
"prodId"
:[]},
"skinVariables"
:[],
"mockSetting"
:{
"projectId"
:
""
,
"pageId"
:
""
}},
"envSetting"
:{},
"psdSetting"
:{
"psdFSSetting"
:
true
,
"psdCenterSetting"
:
true
}}
{
"proSetting"
:{
"projectxIDs"
:{
"testId"
:[{
"label"
:
"test"
,
"value"
:
"p80bfa061"
}],
"prodId"
:[
{
"label"
:
"线上测试"
,
"value"
:
"pca83ad6b"
}
]},
"skinVariables"
:[],
"mockSetting"
:{
"projectId"
:
""
,
"pageId"
:
""
}},
"envSetting"
:{},
"psdSetting"
:{
"psdFSSetting"
:
true
,
"psdCenterSetting"
:
true
}}
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