Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xytk_cs_001
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
xytk_cs_001
Commits
7ac6e613
Commit
7ac6e613
authored
Mar 01, 2021
by
xytk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
456c0b85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
189 additions
and
38 deletions
+189
-38
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+136
-31
AutoSize.ts
play/assets/tmpGame/script/AutoSize.ts
+26
-0
AutoSize.ts.meta
play/assets/tmpGame/script/AutoSize.ts.meta
+9
-0
Scene.js
play/assets/tmpGame/script/Scene.js
+18
-7
title_bg.png
play/assets/tmpGame/textures/title_bg.png
+0
-0
No files found.
play/assets/tmpGame/scene/Scene.fire
View file @
7ac6e613
...
@@ -85,21 +85,24 @@
...
@@ -85,21 +85,24 @@
},
},
{
{
"__id__": 42
"__id__": 42
},
{
"__id__": 44
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
2
"__id__": 5
4
},
},
{
{
"__id__": 5
3
"__id__": 5
5
},
},
{
{
"__id__": 5
5
"__id__": 5
7
},
},
{
{
"__id__": 5
4
"__id__": 5
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -189,7 +192,7 @@
...
@@ -189,7 +192,7 @@
"array": [
"array": [
0,
0,
0,
0,
5
78.3992193418256
,
5
86.5427680068793
,
0,
0,
0,
0,
0,
0,
...
@@ -442,7 +445,7 @@
...
@@ -442,7 +445,7 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
500
,
"width":
445
,
"height": 104
"height": 104
},
},
"_anchorPoint": {
"_anchorPoint": {
...
@@ -555,7 +558,7 @@
...
@@ -555,7 +558,7 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
35
0,
"width":
29
0,
"height": 56.4
"height": 56.4
},
},
"_anchorPoint": {
"_anchorPoint": {
...
@@ -610,8 +613,8 @@
...
@@ -610,8 +613,8 @@
"_useOriginalSize": false,
"_useOriginalSize": false,
"_string": "Listen and Droag",
"_string": "Listen and Droag",
"_N$string": "Listen and Droag",
"_N$string": "Listen and Droag",
"_fontSize":
40
,
"_fontSize":
36
,
"_lineHeight":
40
,
"_lineHeight":
36
,
"_enableWrapText": false,
"_enableWrapText": false,
"_N$file": {
"_N$file": {
"__uuid__": "9de7e940-49b7-4208-a6fd-efbfd529cfa6"
"__uuid__": "9de7e940-49b7-4208-a6fd-efbfd529cfa6"
...
@@ -1263,7 +1266,7 @@
...
@@ -1263,7 +1266,7 @@
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_spriteFrame": null,
"_type": 0,
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1496,8 +1499,8 @@
...
@@ -1496,8 +1499,8 @@
"_useOriginalSize": false,
"_useOriginalSize": false,
"_string": "Blend A with B to make ab,bab,bab,bab.",
"_string": "Blend A with B to make ab,bab,bab,bab.",
"_N$string": "Blend A with B to make ab,bab,bab,bab.",
"_N$string": "Blend A with B to make ab,bab,bab,bab.",
"_fontSize": 4
0
,
"_fontSize": 4
8
,
"_lineHeight": 4
0
,
"_lineHeight": 4
8
,
"_enableWrapText": true,
"_enableWrapText": true,
"_N$file": {
"_N$file": {
"__uuid__": "ba5cb94f-a8af-4b01-b548-414f4a31cea2"
"__uuid__": "ba5cb94f-a8af-4b01-b548-414f4a31cea2"
...
@@ -1707,6 +1710,108 @@
...
@@ -1707,6 +1710,108 @@
"_originalHeight": 0,
"_originalHeight": 0,
"_id": "70Zu8iVClD+aCTkCjHtxtg"
"_id": "70Zu8iVClD+aCTkCjHtxtg"
},
},
{
"__type__": "cc.Node",
"_name": "New TiledMap",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 402.08407761575506,
"height": 313.1361171716606
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "016m3ctOJLt6/0irtijIfi"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "Armature",
"_animationName": "unit1_boy_jump",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "716bf20c-5e8e-4b11-80d7-3cdeb16f947b#579b28fe-0e39-4fd3-84e8-e5910ee77031",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "716bf20c-5e8e-4b11-80d7-3cdeb16f947b"
},
"_N$dragonAtlasAsset": {
"__uuid__": "579b28fe-0e39-4fd3-84e8-e5910ee77031"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "b4agz5Xg5Aw6+3nX/Un1Fo"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "res",
"_name": "res",
...
@@ -1716,13 +1821,13 @@
...
@@ -1716,13 +1821,13 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 4
3
"__id__": 4
5
},
},
{
{
"__id__": 4
6
"__id__": 4
8
},
},
{
{
"__id__":
49
"__id__":
51
}
}
],
],
"_active": false,
"_active": false,
...
@@ -1780,11 +1885,11 @@
...
@@ -1780,11 +1885,11 @@
"_name": "font",
"_name": "font",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
2
"__id__": 4
4
},
},
"_children": [
"_children": [
{
{
"__id__": 4
4
"__id__": 4
6
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1842,13 +1947,13 @@
...
@@ -1842,13 +1947,13 @@
"_name": "BRLNSDB",
"_name": "BRLNSDB",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
3
"__id__": 4
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 4
5
"__id__": 4
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1904,7 +2009,7 @@
...
@@ -1904,7 +2009,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
4
"__id__": 4
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1940,11 +2045,11 @@
...
@@ -1940,11 +2045,11 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
2
"__id__": 4
4
},
},
"_children": [
"_children": [
{
{
"__id__": 4
7
"__id__": 4
9
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2002,13 +2107,13 @@
...
@@ -2002,13 +2107,13 @@
"_name": "icon",
"_name": "icon",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
6
"__id__": 4
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
48
"__id__":
50
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2064,7 +2169,7 @@
...
@@ -2064,7 +2169,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 4
7
"__id__": 4
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -2096,11 +2201,11 @@
...
@@ -2096,11 +2201,11 @@
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 4
2
"__id__": 4
4
},
},
"_children": [
"_children": [
{
{
"__id__": 5
0
"__id__": 5
2
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2158,13 +2263,13 @@
...
@@ -2158,13 +2263,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
49
"__id__":
51
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 5
1
"__id__": 5
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2220,7 +2325,7 @@
...
@@ -2220,7 +2325,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 5
0
"__id__": 5
2
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -2259,7 +2364,7 @@
...
@@ -2259,7 +2364,7 @@
},
},
"_enabled": true,
"_enabled": true,
"loadInAudioSource": {
"loadInAudioSource": {
"__id__": 5
4
"__id__": 5
6
},
},
"dragonBonesNode": {
"dragonBonesNode": {
"__id__": 19
"__id__": 19
...
...
play/assets/tmpGame/script/AutoSize.ts
0 → 100644
View file @
7ac6e613
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
enum
NodeType
{
"
BG
"
,
""
}
@
ccclass
export
default
class
NewClass
extends
cc
.
Component
{
@
property
(
cc
.
Label
)
label
:
cc
.
Label
=
null
;
@
property
text
:
string
=
'
hello
'
;
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start
()
{
}
// update (dt) {}
}
play/assets/tmpGame/script/AutoSize.ts.meta
0 → 100644
View file @
7ac6e613
{
"ver": "1.0.8",
"uuid": "8e66bd5f-a4b8-47ed-9f53-2e61d70c3a78",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
play/assets/tmpGame/script/Scene.js
View file @
7ac6e613
...
@@ -206,9 +206,13 @@ cc.Class({
...
@@ -206,9 +206,13 @@ cc.Class({
}
}
let
width
=
animNode
.
width
;
let
width
=
animNode
.
width
;
let
height
=
animNode
.
height
;
let
height
=
animNode
.
height
;
animNode
.
width
=
width
;
let
tWidth
=
texture
.
width
;
animNode
.
height
=
height
;
let
tHeight
=
texture
.
height
;
if
(
tWidth
/
tHeight
>
width
/
height
){
animNode
.
scale
=
width
/
tWidth
;
}
else
{
animNode
.
scale
=
height
/
tHeight
;
}
});
});
});
});
});
});
...
@@ -244,15 +248,22 @@ cc.Class({
...
@@ -244,15 +248,22 @@ cc.Class({
let
width
=
this
.
pic_a_sprite
.
node
.
width
;
let
width
=
this
.
pic_a_sprite
.
node
.
width
;
let
height
=
this
.
pic_a_sprite
.
node
.
height
;
let
height
=
this
.
pic_a_sprite
.
node
.
height
;
this
.
pic_a_sprite
.
spriteFrame
=
spriteFrame
;
this
.
pic_a_sprite
.
spriteFrame
=
spriteFrame
;
this
.
pic_a_sprite
.
node
.
width
=
width
;
// cc.log(this.pic_a_sprite.node.scale);
this
.
pic_a_sprite
.
node
.
height
=
height
;
if
(
this
.
pic_a_sprite
.
node
.
width
/
this
.
pic_a_sprite
.
node
.
height
>
width
/
height
){
this
.
pic_a_sprite
.
node
.
scale
=
width
/
this
.
pic_a_sprite
.
node
.
width
;
}
else
{
this
.
pic_a_sprite
.
node
.
scale
=
height
/
this
.
pic_a_sprite
.
node
.
height
;
}
});
});
this
.
getSpriteFrimeByUrl
(
this
.
data
.
pic_C_url
,(
spriteFrame
)
=>
{
this
.
getSpriteFrimeByUrl
(
this
.
data
.
pic_C_url
,(
spriteFrame
)
=>
{
let
width
=
this
.
pic_c_sprite
.
node
.
width
;
let
width
=
this
.
pic_c_sprite
.
node
.
width
;
let
height
=
this
.
pic_c_sprite
.
node
.
height
;
let
height
=
this
.
pic_c_sprite
.
node
.
height
;
this
.
pic_c_sprite
.
spriteFrame
=
spriteFrame
;
this
.
pic_c_sprite
.
spriteFrame
=
spriteFrame
;
this
.
pic_c_sprite
.
node
.
width
=
width
;
if
(
this
.
pic_c_sprite
.
node
.
width
/
this
.
pic_c_sprite
.
node
.
height
>
width
/
height
){
this
.
pic_c_sprite
.
node
.
height
=
height
;
this
.
pic_c_sprite
.
node
.
scale
=
width
/
this
.
pic_c_sprite
.
node
.
width
;
}
else
{
this
.
pic_c_sprite
.
node
.
scale
=
height
/
this
.
pic_c_sprite
.
node
.
height
;
}
});
});
},
},
...
...
play/assets/tmpGame/textures/title_bg.png
View replaced file @
456c0b85
View file @
7ac6e613
21.3 KB
|
W:
|
H:
37.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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