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
05cd1b79
Commit
05cd1b79
authored
Aug 14, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改
parent
e0897562
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
6 deletions
+63
-6
BackPanel.ts
assets/Scripts/Panels/BackPanel.ts
+9
-0
NoPrizePanel.ts
assets/Scripts/Panels/NoPrizePanel.ts
+8
-1
PrizePanel.ts
assets/Scripts/Panels/PrizePanel.ts
+7
-0
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+6
-0
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+33
-5
No files found.
assets/Scripts/Panels/BackPanel.ts
View file @
05cd1b79
...
...
@@ -2,6 +2,7 @@ import Panel from "../../Module/Panel";
import
{
_decorator
,
Button
,
Node
}
from
"cc"
;
import
{
changeScene
}
from
"db://assets/Module/UIFast"
;
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
{
LOG_TYPE
,
sendLog
}
from
"../Utils/WebNet/WebNet"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -21,17 +22,25 @@ export default class BackPanel extends Panel {
close
:
Node
=
null
;
async
start
()
{
sendLog
(
LOG_TYPE
.
EXPOSURE
,
6
);
sendLog
(
LOG_TYPE
.
EXPOSURE
,
7
);
this
.
ok
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickOk
,
this
);
this
.
cancel
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickCancel
,
this
);
this
.
close
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
}
clickOk
()
{
sendLog
(
LOG_TYPE
.
CLICK
,
6
);
this
.
hidePanel
();
changeScene
(
HomeScene
);
}
clickCancel
()
{
sendLog
(
LOG_TYPE
.
CLICK
,
7
);
this
.
hidePanel
();
}
...
...
assets/Scripts/Panels/NoPrizePanel.ts
View file @
05cd1b79
import
Panel
from
"../../Module/Panel"
;
import
{
_decorator
,
Button
,
Label
,
Node
}
from
"cc"
;
import
{
_decorator
,
Button
,
Node
}
from
"cc"
;
import
{
changeScene
,
showToast
}
from
"db://assets/Module/UIFast"
;
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
GameMgr
from
"../GameMgr"
;
import
store
from
"../../store/store"
;
import
{
MainGame
}
from
"../Scenes/MainGame/MainGame"
;
import
{
LOG_TYPE
,
sendLog
}
from
"../Utils/WebNet/WebNet"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -21,6 +22,9 @@ export default class NoPrizePanel extends Panel {
again
:
Node
=
null
!
;
async
start
()
{
sendLog
(
LOG_TYPE
.
EXPOSURE
,
5
);
this
.
close
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
this
.
again
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickAgain
,
this
);
}
...
...
@@ -34,6 +38,9 @@ export default class NoPrizePanel extends Panel {
}
clickAgain
=
async
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
5
);
this
.
hidePanel
();
if
(
store
.
homeInfo
.
leftTimes
<=
0
)
{
changeScene
(
HomeScene
);
...
...
assets/Scripts/Panels/PrizePanel.ts
View file @
05cd1b79
...
...
@@ -4,6 +4,7 @@ import { changeScene } from "db://assets/Module/UIFast";
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
{
strFormat
}
from
"../Utils/Utils"
;
import
{
PrizeScene
}
from
"../Scenes/PrizeScene/PrizeScene"
;
import
{
LOG_TYPE
,
sendLog
}
from
"../Utils/WebNet/WebNet"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -26,6 +27,9 @@ export default class PrizePanel extends Panel {
img
:
Sprite
=
null
!
;
async
start
()
{
sendLog
(
LOG_TYPE
.
EXPOSURE
,
4
);
this
.
close
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
this
.
get
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickGet
,
this
);
...
...
@@ -40,6 +44,9 @@ export default class PrizePanel extends Panel {
}
clickGet
=
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
4
);
this
.
hidePanel
();
changeScene
(
PrizeScene
);
}
...
...
assets/Scripts/Scenes/HomeScene.ts
View file @
05cd1b79
...
...
@@ -35,6 +35,9 @@ export class HomeScene extends Scene {
this
.
startBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickStart
,
this
);
this
.
prizeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickPrize
,
this
);
this
.
ruleBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRule
,
this
);
sendLog
(
LOG_TYPE
.
EXPOSURE
,
1
);
}
async
start
()
{
...
...
@@ -74,6 +77,9 @@ export class HomeScene extends Scene {
/** 去挑战 */
clickStart
=
async
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
1
);
if
(
!
this
.
checkActStatus
())
return
false
;
const
{
leftTimes
=
0
,
// 剩余挑战次数
...
...
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
05cd1b79
import
{
_decorator
,
Collider2D
,
Contact2DType
,
EPhysics2DDrawFlags
,
EventTouch
,
Node
,
input
,
Input
,
instantiate
,
IPhysics2DContact
,
_decorator
,
Animation
,
PhysicsSystem2D
,
Prefab
,
v2
,
PHYSICS_2D_PTM_RATIO
,
UITransform
,
v3
,
Vec3
,
Vec2
,
tween
,
Tween
,
misc
,
clamp
,
view
,
Button
,
Label
,
PhysicsGroup
,
Sprite
,
Color
,
color
,
UIOpacity
Button
,
clamp
,
Collider2D
,
Color
,
Contact2DType
,
EventTouch
,
instantiate
,
IPhysics2DContact
,
Label
,
Node
,
PHYSICS_2D_PTM_RATIO
,
PhysicsGroup
,
PhysicsSystem2D
,
Prefab
,
Sprite
,
tween
,
UIOpacity
,
UITransform
,
v2
,
v3
,
Vec2
,
Vec3
,
view
}
from
"cc"
;
import
Scene
from
"db://assets/Module/Scene"
;
import
{
Ball
}
from
"./Ball"
;
...
...
@@ -14,6 +33,7 @@ import MergeMaxPanel from "../../Panels/MergeMaxPanel";
import
NoPrizePanel
from
"../../Panels/NoPrizePanel"
;
import
BackPanel
from
"../../Panels/BackPanel"
;
import
store
from
"../../../store/store"
;
import
{
LOG_TYPE
,
sendLog
}
from
"../../Utils/WebNet/WebNet"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -90,6 +110,10 @@ export class MainGame extends Scene {
newBall
:
Node
=
null
;
onLoad
()
{
sendLog
(
LOG_TYPE
.
EXPOSURE
,
2
);
sendLog
(
LOG_TYPE
.
EXPOSURE
,
3
);
this
.
isUseHammer
=
false
;
if
(
store
.
homeInfo
.
newGuideFlag
===
0
)
{
...
...
@@ -160,6 +184,8 @@ export class MainGame extends Scene {
}
clickHammer
=
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
3
);
if
(
this
.
hammerCount
<=
0
)
{
showToast
(
"暂无道具"
);
return
;
...
...
@@ -172,6 +198,8 @@ export class MainGame extends Scene {
* 点击万能球
*/
clickProtean
=
()
=>
{
sendLog
(
LOG_TYPE
.
CLICK
,
2
);
if
(
this
.
isOver
)
return
;
if
(
this
.
proteanCount
<=
0
)
{
...
...
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