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
58654902
Commit
58654902
authored
Dec 12, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
55de6b66
72713058
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
13 deletions
+35
-13
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+18
-12
Target.ts
assets/Scripts/Scenes/MainGame/Components/Target.ts
+17
-1
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
58654902
...
...
@@ -199,7 +199,7 @@
"_priority": 40000,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight":
724.9590973201692
,
"_orthoHeight":
596.5439469320066
,
"_near": 0,
"_far": 2000,
"_color": {
...
...
@@ -2444,7 +2444,7 @@
"_priority": 50000,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight":
724.9590973201692
,
"_orthoHeight":
596.5439469320066
,
"_near": 1,
"_far": 2000,
"_color": {
...
...
@@ -11267,7 +11267,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -
489.9995422363281
,
"x": -
1503
,
"y": 126,
"z": 0
},
...
...
@@ -11292,7 +11292,7 @@
"y": 180,
"z": 0
},
"_id": "
46u8BDHYRFBpL+rERWH3sg
"
"_id": "
15ntahYuBOlI9axsLvmVn4
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -11314,7 +11314,7 @@
"x": 0,
"y": 1
},
"_id": "
5aWlDqc9RPhbmHipxKvQPX
"
"_id": "
29mpQoZeRDIILvvM0XrIyd
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -11350,7 +11350,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "
83T8dmcspM0YX+ri+d/7ZZ
"
"_id": "
a4d7Pfm5pBg76Fz5VRrIym
"
},
{
"__type__": "cc.Node",
...
...
@@ -11398,7 +11398,7 @@
"y": 0,
"z": 0
},
"_id": "
03DY42QN9Mc4WnVY8AvnLB
"
"_id": "
aa5tYYkoFLUohaYXtyytDH
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -11420,7 +11420,7 @@
"x": 0,
"y": 1
},
"_id": "
0bCemjQj1JQ6e64+shf3LZ
"
"_id": "
37hRnGP1NAXJYZ2CY+mVU/
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -11456,7 +11456,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "
e1DyExHqFOZa9MSEu+LVcA
"
"_id": "
c8YUQpN19KG6QnOuYWicKk
"
},
{
"__type__": "cc.Node",
...
...
@@ -11504,7 +11504,7 @@
"y": 0,
"z": 0
},
"_id": "
e99Px79RNNlrbJA+XosW7C
"
"_id": "
8e1P/3v3RJ8JfxfGdiKfUh
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -11526,7 +11526,7 @@
"x": 0,
"y": 1
},
"_id": "6
e5ZxXmE5K/rLlouvI1T6h
"
"_id": "6
cQsM4oEpHkrdmgpuqttul
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -11562,7 +11562,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "3
0C+YOj/lH2ZyYw5LOApJV
"
"_id": "3
cdoeEB6dJ24D6ITZZ//0X
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -13151,6 +13151,12 @@
"__id__": 332
}
],
"top": {
"__id__": 250
},
"topCard": {
"__id__": 276
},
"_id": "dfl2fX641H3qOpggystLiY"
},
{
...
...
assets/Scripts/Scenes/MainGame/Components/Target.ts
View file @
58654902
...
...
@@ -30,6 +30,10 @@ export class Target extends Component {
@
property
([
Node
])
bannerArr
:
Node
[]
=
[];
@
property
(
Node
)
top
:
Node
=
null
;
@
property
(
Node
)
topCard
:
Node
=
null
;
constructor
()
{
super
();
Target
.
_ins
=
this
;
...
...
@@ -92,10 +96,12 @@ export class Target extends Component {
}
async
showTarget3
()
{
this
.
showTopCard
()
await
this
.
showBanner
(
this
.
bannerArr
[
2
]);
}
async
showTarget2
()
{
this
.
showTop
()
const
{
time
,
length
}
=
Global
.
stageConfig
[
1
];
this
.
goalTxt
.
string
=
`
${
time
}
秒长度达到
${
length
}
`
;
...
...
@@ -106,6 +112,7 @@ export class Target extends Component {
}
async
showTarget1
()
{
this
.
showTop
()
const
{
time
}
=
Global
.
stageConfig
[
0
];
this
.
goalTxt
.
string
=
`存活
${
time
}
秒`
;
this
.
bannerArr
[
0
].
getChildByName
(
"txt"
)
...
...
@@ -114,6 +121,15 @@ export class Target extends Component {
await
this
.
showBanner
(
this
.
bannerArr
[
0
]);
}
showTopCard
()
{
this
.
topCard
.
active
=
true
;
this
.
top
.
active
=
false
;
}
showTop
()
{
this
.
top
.
active
=
true
;
this
.
topCard
.
active
=
false
}
private
_cd
=
0
;
...
...
@@ -137,7 +153,7 @@ export class Target extends Component {
cdTween
:
Tween
<
Target
>
=
null
;
startCd
(
cd
:
number
,
onComplete
=
()
=>
{})
{
startCd
(
cd
:
number
,
onComplete
=
()
=>
{
})
{
this
.
graphics
.
node
.
active
=
true
;
this
.
cd
=
this
.
totalCd
=
cd
;
this
.
cdTween
=
tween
(
this
as
Target
)
...
...
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