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
255ed21d
Commit
255ed21d
authored
May 28, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
fdce1062
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
454 additions
and
359 deletions
+454
-359
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+8
-8
park.png
assets/Bundles/MainGame/png/park.png
+0
-0
park.png.meta
assets/Bundles/MainGame/png/park.png.meta
+0
-0
park1.png
assets/Bundles/MainGame/png/park1.png
+0
-0
park1.png.meta
assets/Bundles/MainGame/png/park1.png.meta
+0
-0
park2.png
assets/Bundles/MainGame/png/park2.png
+0
-0
park2.png.meta
assets/Bundles/MainGame/png/park2.png.meta
+0
-0
UnlockPanel.prefab
assets/Bundles/UnlockPanel/UnlockPanel.prefab
+309
-271
UI.meta
assets/CarColorsGame/Scrips/UI.meta
+0
-9
UnlockPanel.ts
assets/Scripts/Panels/UnlockPanel.ts
+63
-0
UnlockPanel.ts.meta
assets/Scripts/Panels/UnlockPanel.ts.meta
+1
-0
GamePage.ts
assets/Scripts/Scenes/MainGame/GamePage.ts
+28
-64
GamePage.ts.meta
assets/Scripts/Scenes/MainGame/GamePage.ts.meta
+0
-0
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+38
-0
UICanvas.prefab
assets/Start/UICanvas.prefab
+3
-3
UIMgr.ts
assets/core/Module/UIMgr.ts
+2
-2
index.ejs
build-templates/web-mobile/index.ejs
+1
-1
index.ejs
preview-template/index.ejs
+1
-1
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
255ed21d
...
@@ -1907,7 +1907,7 @@
...
@@ -1907,7 +1907,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 7.5,
"x":
-
7.5,
"y": 0,
"y": 0,
"z": 0
"z": 0
},
},
...
@@ -2080,7 +2080,7 @@
...
@@ -2080,7 +2080,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 5,
"x":
-
5,
"y": 0,
"y": 0,
"z": 0
"z": 0
},
},
...
@@ -2253,7 +2253,7 @@
...
@@ -2253,7 +2253,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 2.5,
"x":
-
2.5,
"y": 0,
"y": 0,
"z": 0
"z": 0
},
},
...
@@ -2599,7 +2599,7 @@
...
@@ -2599,7 +2599,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x":
-
2.5,
"x": 2.5,
"y": 0,
"y": 0,
"z": 0
"z": 0
},
},
...
@@ -2897,8 +2897,8 @@
...
@@ -2897,8 +2897,8 @@
},
},
"_size": {
"_size": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 0.
9
,
"x": 0.
88
,
"y": 0.5,
"y": 0.5
02
,
"z": 0.5
"z": 0.5
},
},
"_id": "00q2lBscdLpq5TJlfdQ+Xw"
"_id": "00q2lBscdLpq5TJlfdQ+Xw"
...
@@ -2921,7 +2921,7 @@
...
@@ -2921,7 +2921,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x":
-
5,
"x": 5,
"y": 0,
"y": 0,
"z": 0
"z": 0
},
},
...
@@ -3243,7 +3243,7 @@
...
@@ -3243,7 +3243,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x":
-
7.5,
"x": 7.5,
"y": 0,
"y": 0,
"z": 0
"z": 0
},
},
...
...
assets/
CarColorsGame/Sprites
/park.png
→
assets/
Bundles/MainGame/png
/park.png
View file @
255ed21d
File moved
assets/
CarColorsGame/Sprites
/park.png.meta
→
assets/
Bundles/MainGame/png
/park.png.meta
View file @
255ed21d
File moved
assets/
CarColorsGame/Sprites
/park1.png
→
assets/
Bundles/MainGame/png
/park1.png
View file @
255ed21d
File moved
assets/
CarColorsGame/Sprites
/park1.png.meta
→
assets/
Bundles/MainGame/png
/park1.png.meta
View file @
255ed21d
File moved
assets/
CarColorsGame/Sprites
/park2.png
→
assets/
Bundles/MainGame/png
/park2.png
View file @
255ed21d
File moved
assets/
CarColorsGame/Sprites
/park2.png.meta
→
assets/
Bundles/MainGame/png
/park2.png.meta
View file @
255ed21d
File moved
assets/Bundles/UnlockPanel/UnlockPanel.prefab
View file @
255ed21d
This diff is collapsed.
Click to expand it.
assets/CarColorsGame/Scrips/UI.meta
deleted
100644 → 0
View file @
fdce1062
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "69a629da-707c-4827-aea1-5e784be2b18b",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Scripts/Panels/UnlockPanel.ts
0 → 100644
View file @
255ed21d
import
{
_decorator
,
Node
,
Sprite
,
SpriteFrame
}
from
'cc'
;
import
{
CarColorsGlobalInstance
}
from
'db://assets/CarColorsGame/Scrips/CarColorsGlobalInstance'
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
Panel
from
"db://assets/core/Module/Panel"
;
import
{
showShareGuide
}
from
"db://assets/core/Module/UIFast"
;
import
{
MainGame
}
from
"db://assets/Scripts/Scenes/MainGame/MainGame"
;
const
{
ccclass
,
property
}
=
_decorator
;
@
ccclass
(
'UnlockPanel'
)
export
class
UnlockPanel
extends
Panel
{
static
skin
:
string
=
"UnlockPanel"
;
static
bundle
:
string
=
"UnlockPanel"
;
@
property
(
Node
)
okBtn
:
Node
=
null
;
@
property
(
Node
)
cancelBtn
:
Node
=
null
;
@
property
(
Node
)
closeBtn
:
Node
=
null
;
@
property
(
SpriteFrame
)
shareSf
:
SpriteFrame
=
null
;
@
property
(
SpriteFrame
)
exchangeSf
:
SpriteFrame
=
null
;
onLoad
()
{
super
.
onLoad
();
this
.
okBtn
.
on
(
Node
.
EventType
.
TOUCH_END
,
this
.
ok
,
this
);
this
.
cancelBtn
.
on
(
Node
.
EventType
.
TOUCH_END
,
this
.
cancel
,
this
);
this
.
closeBtn
.
on
(
Node
.
EventType
.
TOUCH_END
,
this
.
cancel
,
this
);
}
start
():
void
{
const
{
type
}
=
this
.
data
;
this
.
okBtn
.
getComponent
(
Sprite
).
spriteFrame
=
type
==
"share"
?
this
.
shareSf
:
this
.
exchangeSf
;
}
hidePanel
()
{
super
.
hidePanel
();
CarColorsGlobalInstance
.
instance
.
roleSysterm
.
isGaming
=
true
}
cancel
=
()
=>
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
);
this
.
hidePanel
();
}
ok
=
()
=>
{
const
{
type
}
=
this
.
data
;
if
(
type
==
"share"
)
{
showShareGuide
();
this
.
scheduleOnce
(()
=>
{
MainGame
.
ins
.
shareUnlock
();
},
3
);
}
else
{
}
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
);
this
.
hidePanel
();
}
}
assets/Scripts/Panels/UnlockPanel.ts.meta
0 → 100644
View file @
255ed21d
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"ef5c5afa-46df-44d6-ae6d-9ca90b616b58","files":[],"subMetas":{},"userData":{}}
assets/
CarColorsGame/Scrips/UI
/GamePage.ts
→
assets/
Scripts/Scenes/MainGame
/GamePage.ts
View file @
255ed21d
...
@@ -18,16 +18,16 @@ import {
...
@@ -18,16 +18,16 @@ import {
tween
,
tween
,
Vec3
Vec3
}
from
'cc'
;
}
from
'cc'
;
import
{
CarCarColorsComponent
}
from
'../Components/CarCarColorsComponent'
;
import
{
CarCarColorsComponent
}
from
'db://assets/CarColorsGame/Scrips/Components/CarCarColorsComponent'
;
import
{
CarColorsGlobalInstance
}
from
'../CarColorsGlobalInstance'
;
import
{
CarColorsGlobalInstance
}
from
'db://assets/CarColorsGame/Scrips/CarColorsGlobalInstance'
;
import
{
GlobalData
,
ConfigKeys
}
from
'../../../ScriptFrame/GlobalData'
;
import
{
PlatformManager
}
from
'../../../ScriptFrame/Frame/platformManager'
;
import
{
PlatformManager
}
from
'../../../ScriptFrame/Frame/platformManager'
;
import
{
showPanel
,
showToast
}
from
"db://assets/core/Module/UIFast"
;
import
{
showPanel
,
showToast
}
from
"db://assets/core/Module/UIFast"
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
{
StopPage
}
from
"
../../..
/Scripts/Panels/StopPage"
;
import
{
StopPage
}
from
"
db://assets
/Scripts/Panels/StopPage"
;
import
{
RefreshPage
}
from
"db://assets/Scripts/Panels/RefreshPage"
;
import
{
RefreshPage
}
from
"db://assets/Scripts/Panels/RefreshPage"
;
import
{
SortPage
}
from
"db://assets/Scripts/Panels/SortPage"
;
import
{
SortPage
}
from
"db://assets/Scripts/Panels/SortPage"
;
import
{
VipPage
}
from
"db://assets/Scripts/Panels/VipPage"
;
import
{
VipPage
}
from
"db://assets/Scripts/Panels/VipPage"
;
import
{
UnlockPanel
}
from
"db://assets/Scripts/Panels/UnlockPanel"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -107,31 +107,7 @@ export class GamePage extends Component {
...
@@ -107,31 +107,7 @@ export class GamePage extends Component {
})
})
}
}
videoUnlock1
()
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
)
PlatformManager
.
instance
.
showVideoAd
(()
=>
{
const
points
=
find
(
"Scene/Parkings"
).
children
points
[
5
].
name
=
"empty"
points
[
5
].
children
[
0
].
children
[
0
].
active
=
true
points
[
5
].
children
[
0
].
children
[
1
].
active
=
false
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
upgrade
)
},
()
=>
{
showToast
(
"视频播放未完成!"
)
})
}
videoUnlock2
()
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
)
PlatformManager
.
instance
.
showVideoAd
(()
=>
{
const
points
=
find
(
"Scene/Parkings"
).
children
points
[
6
].
name
=
"empty"
points
[
6
].
children
[
0
].
children
[
0
].
active
=
true
points
[
6
].
children
[
0
].
children
[
1
].
active
=
false
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
upgrade
)
},
()
=>
{
showToast
(
"视频播放未完成!"
)
})
}
getEmptyParkPoint
():
Node
{
getEmptyParkPoint
():
Node
{
const
points
=
find
(
"Scene/Parkings"
).
children
const
points
=
find
(
"Scene/Parkings"
).
children
...
@@ -144,8 +120,8 @@ export class GamePage extends Component {
...
@@ -144,8 +120,8 @@ export class GamePage extends Component {
}
}
touchStart
(
event
:
EventTouch
)
{
touchStart
(
event
:
EventTouch
)
{
if
(
this
.
isAnimateObstacle
)
return
if
(
this
.
isAnimateObstacle
)
return
;
if
(
this
.
isAnimateHelicopter
)
return
if
(
this
.
isAnimateHelicopter
)
return
;
let
ray
=
new
geometry
.
Ray
();
let
ray
=
new
geometry
.
Ray
();
find
(
"Main Camera"
).
getComponent
(
Camera
).
screenPointToRay
(
event
.
getLocationX
(),
event
.
getLocationY
(),
ray
);
find
(
"Main Camera"
).
getComponent
(
Camera
).
screenPointToRay
(
event
.
getLocationX
(),
event
.
getLocationY
(),
ray
);
// 以下参数可选
// 以下参数可选
...
@@ -155,15 +131,14 @@ export class GamePage extends Component {
...
@@ -155,15 +131,14 @@ export class GamePage extends Component {
// 点中停车位
// 点中停车位
if
(
!
this
.
isChooseHelicopterTarget
&&
PhysicsSystem
.
instance
.
raycastClosest
(
ray
,
mask
,
maxDistance
,
queryTrigger
))
{
if
(
!
this
.
isChooseHelicopterTarget
&&
PhysicsSystem
.
instance
.
raycastClosest
(
ray
,
mask
,
maxDistance
,
queryTrigger
))
{
const
parkPoint
=
PhysicsSystem
.
instance
.
raycastClosestResult
.
collider
.
node
.
parent
.
parent
const
parkPoint
=
PhysicsSystem
.
instance
.
raycastClosestResult
.
collider
.
node
.
parent
.
parent
;
console
.
log
(
parkPoint
)
const
parkIndex
=
parkPoint
.
getSiblingIndex
();
if
(
parkPoint
.
getSiblingIndex
()
===
4
)
{
if
(
parkIndex
===
4
)
{
this
.
shareUnlock
()
showPanel
(
UnlockPanel
,
{
type
:
"share"
});
}
else
if
(
parkPoint
.
getSiblingIndex
()
===
5
)
{
}
else
if
(
parkIndex
===
5
)
{
this
.
videoUnlock1
()
showPanel
(
UnlockPanel
,
{
type
:
"exchange"
});
}
}
else
if
(
parkIndex
===
6
)
{
if
(
parkPoint
.
getSiblingIndex
()
===
6
)
{
showPanel
(
UnlockPanel
,
{
type
:
"exchange"
});
this
.
videoUnlock2
()
}
}
return
return
}
}
...
@@ -194,13 +169,10 @@ export class GamePage extends Component {
...
@@ -194,13 +169,10 @@ export class GamePage extends Component {
// 碰到车
// 碰到车
if
(
collider
.
getGroup
()
===
1
<<
1
)
{
if
(
collider
.
getGroup
()
===
1
<<
1
)
{
this
.
isAnimateObstacle
=
true
this
.
isAnimateObstacle
=
true
tween
(
car
).
to
(
0.1
,
{
tween
(
car
)
worldPosition
:
carMovePos
.
to
(
0.1
,
{
worldPosition
:
carMovePos
})
})
// .delay(0.1)
// .delay(0.1)
.
to
(
0.1
,
{
.
to
(
0.1
,
{
worldPosition
:
pos
})
worldPosition
:
pos
})
.
call
(()
=>
{
.
call
(()
=>
{
this
.
isAnimateObstacle
=
false
this
.
isAnimateObstacle
=
false
})
})
...
@@ -307,9 +279,8 @@ export class GamePage extends Component {
...
@@ -307,9 +279,8 @@ export class GamePage extends Component {
helicopter
.
forward
=
carPos
.
clone
().
subtract
(
helicopter
.
getWorldPosition
()).
normalize
()
helicopter
.
forward
=
carPos
.
clone
().
subtract
(
helicopter
.
getWorldPosition
()).
normalize
()
AudioMgr
.
ins
.
play
(
AudioClipName
.
helico
,
{
loop
:
true
})
AudioMgr
.
ins
.
play
(
AudioClipName
.
helico
,
{
loop
:
true
})
tween
(
helicopter
).
to
(
1
,
{
tween
(
helicopter
)
worldPosition
:
carPos
.
clone
().
add3f
(
0
,
3
,
0
)
.
to
(
1
,
{
worldPosition
:
carPos
.
clone
().
add3f
(
0
,
3
,
0
)
})
})
.
call
(()
=>
{
.
call
(()
=>
{
car
.
setParent
(
helicopter
,
true
)
car
.
setParent
(
helicopter
,
true
)
car
.
setRotationFromEuler
(
0
,
180
,
0
)
car
.
setRotationFromEuler
(
0
,
180
,
0
)
...
@@ -322,9 +293,7 @@ export class GamePage extends Component {
...
@@ -322,9 +293,7 @@ export class GamePage extends Component {
}).
start
()
}).
start
()
})
})
.
delay
(
0.5
)
.
delay
(
0.5
)
.
to
(
1
,
{
.
to
(
1
,
{
worldPosition
:
parkPoint
.
children
[
0
].
getWorldPosition
().
add3f
(
0
,
3
,
0
)
})
worldPosition
:
parkPoint
.
children
[
0
].
getWorldPosition
().
add3f
(
0
,
3
,
0
)
})
.
call
(()
=>
{
.
call
(()
=>
{
car
.
forward
=
new
Vec3
(
-
1.2
,
0
,
2
)
car
.
forward
=
new
Vec3
(
-
1.2
,
0
,
2
)
car
.
setParent
(
parkPoint
,
true
)
car
.
setParent
(
parkPoint
,
true
)
...
@@ -342,22 +311,19 @@ export class GamePage extends Component {
...
@@ -342,22 +311,19 @@ export class GamePage extends Component {
}
}
}).
start
()
}).
start
()
})
})
.
to
(
1
,
{
.
to
(
1
,
{
position
:
new
Vec3
(
0
,
0
,
0
)
})
position
:
new
Vec3
(
0
,
0
,
0
)
})
.
call
(()
=>
{
.
call
(()
=>
{
AudioMgr
.
ins
.
play
(
AudioClipName
.
bgm
,
{
loop
:
true
});
AudioMgr
.
ins
.
play
(
AudioClipName
.
bgm
,
{
loop
:
true
});
helicopter
.
active
=
false
helicopter
.
active
=
false
})
})
.
start
()
.
start
()
;
}
}
// 导航到碰撞点
// 导航到碰撞点
hitPointTween
(
car
:
Node
,
targetPoint
:
Node
,
tweenCar
:
Tween
<
Node
>
,
hitPoint
:
Vec3
=
null
)
{
hitPointTween
(
car
:
Node
,
targetPoint
:
Node
,
tweenCar
:
Tween
<
Node
>
,
hitPoint
:
Vec3
=
null
)
{
const
pointForward
:
Vec3
=
hitPoint
.
clone
().
subtract
(
targetPoint
.
getWorldPosition
()).
normalize
()
const
pointForward
:
Vec3
=
hitPoint
.
clone
().
subtract
(
targetPoint
.
getWorldPosition
()).
normalize
()
tweenCar
.
to
(
0.2
,
{
tweenCar
worldPosition
:
hitPoint
.
to
(
0.2
,
{
worldPosition
:
hitPoint
})
})
.
call
(()
=>
{
.
call
(()
=>
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
brake
);
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
brake
);
const
carforward
=
car
.
forward
.
clone
()
const
carforward
=
car
.
forward
.
clone
()
...
@@ -372,9 +338,8 @@ export class GamePage extends Component {
...
@@ -372,9 +338,8 @@ export class GamePage extends Component {
// 顶部导航
// 顶部导航
topRoadTween
(
car
:
Node
,
targetPoint
:
Node
,
tweenCar
:
Tween
<
Node
>
)
{
topRoadTween
(
car
:
Node
,
targetPoint
:
Node
,
tweenCar
:
Tween
<
Node
>
)
{
tweenCar
.
to
(
0.2
,
{
tweenCar
worldPosition
:
targetPoint
.
getWorldPosition
()
.
to
(
0.2
,
{
worldPosition
:
targetPoint
.
getWorldPosition
()
})
})
.
call
(()
=>
{
.
call
(()
=>
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
brake
);
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
brake
);
const
carforward
=
car
.
forward
.
clone
()
const
carforward
=
car
.
forward
.
clone
()
...
@@ -394,9 +359,8 @@ export class GamePage extends Component {
...
@@ -394,9 +359,8 @@ export class GamePage extends Component {
// 左边导航
// 左边导航
leftRoadTween
(
car
:
Node
,
tweenCar
:
Tween
<
Node
>
)
{
leftRoadTween
(
car
:
Node
,
tweenCar
:
Tween
<
Node
>
)
{
const
targetPoint
=
find
(
"Scene/physicRoodTop/leftPoint"
)
const
targetPoint
=
find
(
"Scene/physicRoodTop/leftPoint"
)
tweenCar
.
to
(
0.2
,
{
tweenCar
worldPosition
:
targetPoint
.
getWorldPosition
()
.
to
(
0.2
,
{
worldPosition
:
targetPoint
.
getWorldPosition
()
})
})
.
call
(()
=>
{
.
call
(()
=>
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
brake
);
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
brake
);
const
carforward
=
car
.
forward
.
clone
()
const
carforward
=
car
.
forward
.
clone
()
...
...
assets/
CarColorsGame/Scrips/UI
/GamePage.ts.meta
→
assets/
Scripts/Scenes/MainGame
/GamePage.ts.meta
View file @
255ed21d
File moved
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
255ed21d
...
@@ -7,6 +7,7 @@ import { CarColorsGlobalInstance } from "db://assets/CarColorsGame/Scrips/CarCol
...
@@ -7,6 +7,7 @@ import { CarColorsGlobalInstance } from "db://assets/CarColorsGame/Scrips/CarCol
import
{
RoleCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/RoleCarColorsSysterm"
;
import
{
RoleCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/RoleCarColorsSysterm"
;
import
{
CarCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/CarCarColorsSysterm"
;
import
{
CarCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/CarCarColorsSysterm"
;
import
{
SuccessPage
}
from
"db://assets/Scripts/Panels/SuccessPage"
;
import
{
SuccessPage
}
from
"db://assets/Scripts/Panels/SuccessPage"
;
import
{
PlatformManager
}
from
"db://assets/ScriptFrame/Frame/platformManager"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -42,6 +43,17 @@ export class MainGame extends Scene {
...
@@ -42,6 +43,17 @@ export class MainGame extends Scene {
await
this
.
nextLevel
();
await
this
.
nextLevel
();
}
}
shareUnlock
()
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
)
PlatformManager
.
instance
.
shareGame
(()
=>
{
const
points
=
find
(
"Scene/Parkings"
).
children
points
[
4
].
name
=
"empty"
points
[
4
].
children
[
0
].
children
[
0
].
active
=
true
points
[
4
].
children
[
0
].
children
[
1
].
active
=
false
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
upgrade
)
})
}
showPre
()
{
showPre
()
{
this
.
gamePre
.
active
=
true
;
this
.
gamePre
.
active
=
true
;
const
isLevel1
=
this
.
level
===
1
;
const
isLevel1
=
this
.
level
===
1
;
...
@@ -53,6 +65,32 @@ export class MainGame extends Scene {
...
@@ -53,6 +65,32 @@ export class MainGame extends Scene {
},
2
);
},
2
);
}
}
videoUnlock1
()
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
)
PlatformManager
.
instance
.
showVideoAd
(()
=>
{
const
points
=
find
(
"Scene/Parkings"
).
children
points
[
5
].
name
=
"empty"
points
[
5
].
children
[
0
].
children
[
0
].
active
=
true
points
[
5
].
children
[
0
].
children
[
1
].
active
=
false
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
upgrade
)
},
()
=>
{
showToast
(
"视频播放未完成!"
)
})
}
videoUnlock2
()
{
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
button_ok
)
PlatformManager
.
instance
.
showVideoAd
(()
=>
{
const
points
=
find
(
"Scene/Parkings"
).
children
points
[
6
].
name
=
"empty"
points
[
6
].
children
[
0
].
children
[
0
].
active
=
true
points
[
6
].
children
[
0
].
children
[
1
].
active
=
false
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
upgrade
)
},
()
=>
{
showToast
(
"视频播放未完成!"
)
})
}
async
nextLevel
()
{
async
nextLevel
()
{
if
(
this
.
level
>=
5
)
{
if
(
this
.
level
>=
5
)
{
showPanel
(
SuccessPage
);
showPanel
(
SuccessPage
);
...
...
assets/Start/UICanvas.prefab
View file @
255ed21d
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
},
},
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 37
4.99999999999994
,
"x": 37
5
,
"y": 812,
"y": 812,
"z": 0
"z": 0
},
},
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "Panel",
"_name": "Panel",
"_objFlags":
512
,
"_objFlags":
0
,
"__editorExtras__": {},
"__editorExtras__": {},
"_parent": {
"_parent": {
"__id__": 1
"__id__": 1
...
@@ -253,7 +253,7 @@
...
@@ -253,7 +253,7 @@
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "mask",
"_name": "mask",
"_objFlags":
512
,
"_objFlags":
0
,
"__editorExtras__": {},
"__editorExtras__": {},
"_parent": {
"_parent": {
"__id__": 6
"__id__": 6
...
...
assets/core/Module/UIMgr.ts
View file @
255ed21d
...
@@ -104,8 +104,8 @@ export class UIMgr {
...
@@ -104,8 +104,8 @@ export class UIMgr {
showShareGuide
(
guideTxt
=
""
)
{
showShareGuide
(
guideTxt
=
""
)
{
this
.
shareGuide
.
active
=
true
;
this
.
shareGuide
.
active
=
true
;
this
.
shareGuide
.
getChildByName
(
"label
"
)
// this.shareGuide.getChildByName("分享提示
")
.
getComponent
(
Label
).
string
=
guideTxt
;
//
.getComponent(Label).string = guideTxt;
}
}
hideShareGuide
()
{
hideShareGuide
()
{
...
...
build-templates/web-mobile/index.ejs
View file @
255ed21d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
口味王新春集福气
</title>
<title>
爱心护航 梦想启航
</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta
name=
"viewport"
<meta
name=
"viewport"
...
...
preview-template/index.ejs
View file @
255ed21d
<html>
<html>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<title>
口味王新春集福气
</title>
<title>
爱心护航 梦想启航
</title>
<meta
<meta
name=
"viewport"
name=
"viewport"
content=
"width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true"
content=
"width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=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