Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xy_camera
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
xy_camera
Commits
86714bfe
Commit
86714bfe
authored
Aug 13, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
47c38f7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
149 additions
and
50 deletions
+149
-50
xy_camera.fire
assets/xy_camera/scene/xy_camera.fire
+144
-47
xy_camera.ts
assets/xy_camera/scene/xy_camera.ts
+5
-3
No files found.
assets/xy_camera/scene/xy_camera.fire
View file @
86714bfe
...
...
@@ -84,19 +84,19 @@
"__id__": 30
},
{
"__id__":
49
"__id__":
51
}
],
"_active": true,
"_components": [
{
"__id__": 7
0
"__id__": 7
2
},
{
"__id__": 7
1
"__id__": 7
3
},
{
"__id__": 7
2
"__id__": 7
4
}
],
"_prefab": null,
...
...
@@ -1385,15 +1385,18 @@
},
{
"__id__": 43
},
{
"__id__": 47
}
],
"_active": true,
"_components": [
{
"__id__": 4
7
"__id__": 4
9
},
{
"__id__":
48
"__id__":
50
}
],
"_prefab": null,
...
...
@@ -1989,7 +1992,7 @@
"__id__": 30
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 44
...
...
@@ -2160,6 +2163,100 @@
"handler": "goRestart",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "btn_again_dis",
"_objFlags": 0,
"_parent": {
"__id__": 30
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 48
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 59,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
146.087,
3.652,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "14wNlCyNhPf7IxVaFp4nQH"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "745d21b5-2a0f-4a0e-ba58-d235bb05c3c8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "812Z41kMtPX7hAXQCuNtOE"
},
{
"__type__": "cc.Sprite",
"_name": "",
...
...
@@ -2228,10 +2325,7 @@
},
"_children": [
{
"__id__": 50
},
{
"__id__": 53
"__id__": 52
},
{
"__id__": 55
...
...
@@ -2240,19 +2334,22 @@
"__id__": 57
},
{
"__id__":
60
"__id__":
59
},
{
"__id__": 6
3
"__id__": 6
2
},
{
"__id__": 66
"__id__": 65
},
{
"__id__": 68
}
],
"_active": false,
"_components": [
{
"__id__":
69
"__id__":
71
}
],
"_prefab": null,
...
...
@@ -2308,16 +2405,16 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
1
"__id__": 5
3
},
{
"__id__": 5
2
"__id__": 5
4
}
],
"_prefab": null,
...
...
@@ -2373,7 +2470,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
0
"__id__": 5
2
},
"_enabled": true,
"_materials": [
...
...
@@ -2405,7 +2502,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
0
"__id__": 5
2
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2432,13 +2529,13 @@
"_name": "startbg",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
4
"__id__": 5
6
}
],
"_prefab": null,
...
...
@@ -2494,7 +2591,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2526,13 +2623,13 @@
"_name": "desc",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
6
"__id__": 5
8
}
],
"_prefab": null,
...
...
@@ -2588,7 +2685,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
5
"__id__": 5
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2623,16 +2720,16 @@
"_name": "continue",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
58
"__id__":
60
},
{
"__id__":
59
"__id__":
61
}
],
"_prefab": null,
...
...
@@ -2688,7 +2785,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
7
"__id__": 5
9
},
"_enabled": true,
"_materials": [
...
...
@@ -2720,7 +2817,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
7
"__id__": 5
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2788,16 +2885,16 @@
"_name": "leave",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
1
"__id__": 6
3
},
{
"__id__": 6
2
"__id__": 6
4
}
],
"_prefab": null,
...
...
@@ -2853,7 +2950,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
0
"__id__": 6
2
},
"_enabled": true,
"_materials": [
...
...
@@ -2885,7 +2982,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
0
"__id__": 6
2
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2953,16 +3050,16 @@
"_name": "btn_bl",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
4
"__id__": 6
6
},
{
"__id__": 6
5
"__id__": 6
7
}
],
"_prefab": null,
...
...
@@ -3018,7 +3115,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
3
"__id__": 6
5
},
"_enabled": true,
"_materials": [
...
...
@@ -3050,7 +3147,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
3
"__id__": 6
5
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3118,16 +3215,16 @@
"_name": "btn_zcdt",
"_objFlags": 0,
"_parent": {
"__id__":
49
"__id__":
51
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
7
"__id__": 6
9
},
{
"__id__":
68
"__id__":
70
}
],
"_prefab": null,
...
...
@@ -3183,7 +3280,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
8
},
"_enabled": true,
"_materials": [
...
...
@@ -3215,7 +3312,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
8
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3283,7 +3380,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
49
"__id__":
51
},
"_enabled": true,
"alignMode": 1,
...
...
assets/xy_camera/scene/xy_camera.ts
View file @
86714bfe
...
...
@@ -33,6 +33,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
window
[
"
courseware
"
].
getAnswer
(
null
,
ans
=>
{
if
(
ans
)
{
this
.
isOver
=
JSON
.
parse
(
ans
).
isOver
;
if
(
this
.
isOver
)
{
cc
.
find
(
`Canvas/btnbg/btn_again`
).
active
=
true
;
cc
.
find
(
`Canvas/btnbg/btn_again_dis`
).
active
=
false
;
}
const
pic
=
cc
.
find
(
`Canvas/border/pic_bg/picture`
);
getSpriteFrimeByUrl
(
JSON
.
parse
(
ans
).
pic_url
,
(
frame
)
=>
{
pic
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
frame
;
...
...
@@ -65,9 +69,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
initView
()
{
this
.
initBg
();
window
[
"
cameraHandler
"
].
takePictureCallback
=
(
err
,
url
)
=>
{
if
(
err
)
{
console
.
log
(
err
);
...
...
@@ -85,6 +86,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
hideLoading
();
});
}
}
initBg
()
{
...
...
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