├── .gitignore
├── README.md
├── assets
├── Scene.meta
├── Scene
│ ├── helloworld.fire
│ └── helloworld.fire.meta
├── Script.meta
├── Script
│ ├── Helloworld.ts
│ ├── Helloworld.ts.meta
│ ├── com-icon.ts
│ ├── com-icon.ts.meta
│ ├── link-prefab-help.meta
│ ├── link-prefab-help
│ │ ├── link-sprite-help.ts
│ │ └── link-sprite-help.ts.meta
│ ├── link-prefab.ts
│ ├── link-prefab.ts.meta
│ ├── login-layer.ts
│ └── login-layer.ts.meta
├── Texture.meta
├── Texture
│ ├── HelloWorld.png
│ ├── HelloWorld.png.meta
│ ├── gold.png
│ ├── gold.png.meta
│ ├── goldcoin.png
│ ├── goldcoin.png.meta
│ ├── image-20200402142308217.png
│ ├── image-20200402142308217.png.meta
│ ├── singleColor.png
│ ├── singleColor.png.meta
│ ├── star.png
│ ├── star.png.meta
│ ├── tab-bg.png
│ └── tab-bg.png.meta
├── migration.meta
├── migration
│ ├── use_v2.1-2.2.1_cc.Toggle_event.js
│ └── use_v2.1-2.2.1_cc.Toggle_event.js.meta
├── res.meta
├── res
│ ├── prefabs.meta
│ └── prefabs
│ │ ├── com-icon.prefab
│ │ └── com-icon.prefab.meta
├── resources.meta
└── resources
│ ├── login-layer.prefab
│ └── login-layer.prefab.meta
├── creator.d.ts
├── jsconfig.json
├── project.json
├── readme
├── 15858808566612.png
├── 15858809963833.png
├── 2020-4-2-12-24-15.gif
├── 20200403184738.png
├── 20200403185043.png
├── GIF-2020-4-3-11-24-59.gif
├── image-20200402142308217.png
├── image-20200402150854377.png
├── image-20200402162249956.png
├── image-20200402164201469.png
├── image-20200402164240106.png
├── image-20200402164308923.png
└── image-20200402164405217.png
├── settings
├── builder.json
├── builder.panel.json
├── project.json
└── services.json
├── template-banner.png
├── template.json
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | #/////////////////////////////////////////////////////////////////////////////
2 | # Fireball Projects
3 | #/////////////////////////////////////////////////////////////////////////////
4 |
5 | library/
6 | temp/
7 | local/
8 | build/
9 |
10 | #/////////////////////////////////////////////////////////////////////////////
11 | # Logs and databases
12 | #/////////////////////////////////////////////////////////////////////////////
13 |
14 | *.log
15 | *.sql
16 | *.sqlite
17 |
18 | #/////////////////////////////////////////////////////////////////////////////
19 | # files for debugger
20 | #/////////////////////////////////////////////////////////////////////////////
21 |
22 | *.sln
23 | *.csproj
24 | *.pidb
25 | *.unityproj
26 | *.suo
27 |
28 | #/////////////////////////////////////////////////////////////////////////////
29 | # OS generated files
30 | #/////////////////////////////////////////////////////////////////////////////
31 |
32 | .DS_Store
33 | ehthumbs.db
34 | Thumbs.db
35 |
36 | #/////////////////////////////////////////////////////////////////////////////
37 | # exvim files
38 | #/////////////////////////////////////////////////////////////////////////////
39 |
40 | *UnityVS.meta
41 | *.err
42 | *.err.meta
43 | *.exvim
44 | *.exvim.meta
45 | *.vimentry
46 | *.vimentry.meta
47 | *.vimproject
48 | *.vimproject.meta
49 | .vimfiles.*/
50 | .exvim.*/
51 | quick_gen_project_*_autogen.bat
52 | quick_gen_project_*_autogen.bat.meta
53 | quick_gen_project_*_autogen.sh
54 | quick_gen_project_*_autogen.sh.meta
55 | .exvim.app
56 |
57 | #/////////////////////////////////////////////////////////////////////////////
58 | # webstorm files
59 | #/////////////////////////////////////////////////////////////////////////////
60 |
61 | .idea/
62 |
63 | #//////////////////////////
64 | # VS Code
65 | #//////////////////////////
66 |
67 | .vscode/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 在Cocos Creator中如何优雅的复用prefab(预制体)
2 |
3 | ## 前言
4 |
5 | 为什么需要这么一个功能?
6 |
7 | 因为我们项目开发使用的是单场景、多预制的开发模式。我们会把公用的东西做成预制,然后在需要用到的界面直接引用,而不是再创建或复制一个。后期策划有修改需求的时候,我们只要把预制修改就可以。不需要修改其他使用的地方。简单还不容易漏。
8 |
9 | 下面举例一个比较常用使用情景:
10 |
11 | **道具图标**:里面包含图标样式、背景框、道具数量、品质数等信息,并且至少需要挂在一个脚本支持代码中动态设置这些属性。并且也是游戏内复用性最高的**组件**之一了,**背包**、**成就奖励信息**、**掉落界面**、**道具详情**等等。
12 |
13 | 那我们就可以只创建一个预制,然后在其他用到的地方直接复用,而不是在其他界面都创建一份。这样工作效率就高很多。如果突然有一天,策划要求图标上要加上阶数,等级等信息,我们只要修改引用的预制体就行。
14 |
15 | 
16 |
17 | **(图片素材来源于网络)**
18 |
19 | 除了**道具图标**、**公用按钮**、**界面标题头**、**通用属性信息**等等,都可以做成一个通用预制,其他界面直接引用。
20 |
21 | 为什么不选择使用官方提供的复用方案?官方的方案只能在场景(*.fire)中引用,不可以在预制(.prefab)中相互使用。这与我们的设计不相符,所以就没办法使用。
22 |
23 | **为了解决上面的复用问题,我们决定实现一套自己的解决方案** *(这也是Creator的强大之处,只要你有想法,就可以实现更多的可能。)*
24 |
25 |
26 | ### 一、功能设计
27 | #### 1、需要实现的功能
28 |
29 | * **在编辑器里所见即所得**
30 |
31 | * **在层级树中不显示被引用的预制体结构**
32 |
33 | * **被引用的预制体结构信息不要保存到当前界面中**
34 |
35 | * **保护引用的预制体,禁止从外部修改**
36 |
37 | **功能解释:**
38 |
39 | **在编辑器里所见即所得**:
40 |
41 | 为了能够在编辑器里即使看到和游戏内相同的显示效果,有助于我们在编辑器里设计UI
42 |
43 | **在层级树中不显示被引用的预制体结构**:
44 |
45 | 不会撑大当前编辑UI的节点树,使显示更清晰简洁。亦可防止我们误编辑引用的节点。
46 |
47 | **被引用的预制体结构信息不要保存到当前界面中**
48 |
49 | 引用的预制体在运行时实时创建就行,不需要对节点信息进行保存,保证当前界面信息清洁无污染
50 |
51 | **保护引用的预制体,禁止从外部修改**
52 |
53 | 保证预制体的只能在源文件修改,不可在外部修改,可以有效防止开发中的误操作
54 |
55 | #### 2、实现方案
56 |
57 | **实例化被引用的预制体**
58 |
59 | 这个问题比较好解决,我们创建一个脚本LinkPrefab.ts,添加**executeInEditMode**标记,添加一个`cc.Prefab`属性成员_prefab,脚本挂载到需要引用其它预制体的节点上。
60 | onLoad中去实例化预制体节点并添加到当前节点上(其它关于位置,缩放,透明度等属性的控制可自行扩展)。
61 |
62 | ```typescript
63 | const {ccclass, executeInEditMode, property} = cc._decorator;
64 | @ccclass
65 | @executeInEditMode
66 | export default class LinkPrefab extends cc.Component {
67 |
68 | @property({type: cc.Prefab, visible: true, displayName: "预制体"})
69 | private _prefab: cc.Prefab = null
70 |
71 | onLoad() {
72 | let prefabNode = cc.instantiate(this._prefab);
73 | if(prefabNode){
74 | this.node.addChild(prefabNode)
75 | }
76 | }
77 | }
78 | ```
79 | 如果需要实时更换被引用的预制体,可以通过set属性来触发新预制的实例化,我们修改一下写法:
80 |
81 | ```typescript
82 | const {ccclass, executeInEditMode, property} = cc._decorator;
83 | @ccclass
84 | @executeInEditMode
85 | export default class LinkPrefab extends cc.Component {
86 |
87 | @property
88 | private _prefab: cc.Prefab = null
89 |
90 | @property({type: cc.Prefab, visible: true, displayName: "预制体"})
91 | set prefab(value: cc.Prefab) {
92 | this._onPrefabChanged(this._prefab, value)
93 | }
94 |
95 | get prefab(): cc.Prefab {
96 | return this._prefab
97 | }
98 |
99 | private _onPrefabChanged(oldValue:cc.Prefab, newValue:cc.Prefab) {
100 | this.node.removeAllChilren()
101 | let prefabNode = cc.instantiate(newValue);
102 | if(prefabNode){
103 | this.node.addChild(prefabNode)
104 | }
105 | }
106 |
107 | onLoad() {
108 | this._onPrefabChanged(null, this._prefab)
109 | }
110 | }
111 | ```
112 |
113 | 
114 |
115 | 从上图可以看到,预制被正常的显示出来了。但是被引用的预制体实例化后,会出现在层级树里(红框框出来的部分),会导致引用它的预制体或场景发生变更。这不是我们所期望的。
116 |
117 | **如何让引用预制体节点树不显示在层级树?**
118 |
119 | 为了解决这个问题,确实花了不少时间,经过不断的尝试。最终找到了解决方案。灵感来自官方的**cc.RichText**。我们发现**RichText**是由多个**cc.Label**拼接而成,而这些Label并没有显示在编辑器的节点树里。然后我们通过翻阅官方的源代码。最终找到了一个`PrivateNode`的类,我们把**PrivateNode**加进来,确实让节点在树里隐身了。我们成功了,但是发现**PrivateNode**的节点始终显示以父类的左下角作为坐标原点,这一点和官方的坐标系不一致。官方也对设计做了解释。
120 |
121 | ```js
122 | /*
123 | * Cocos Creator 场景中的私有节点类。
124 | * 私有节点在编辑器中不可见,对用户透明。
125 | * 通常私有节点是被一些特殊的组件创建出来作为父节点的一部分而存在的,理论上来说,它们不是子节点,而是父节点的组成部分。
126 | * 私有节点有两个非常重要的特性:
127 | * 1. 它有着最小的渲染排序的 Z 轴深度,并且无法被更改,因为它们不能被显示在其他正常子节点之上。
128 | * 2. 它的定位也是特殊的,对于私有节点来说,父节点包围盒的左下角是它的局部坐标系原点,这个原点相当于父节点的位置减去它锚点的偏移。这样私有节点可以比较容易被控制在包围盒之中。
129 | * 目前在引擎中,RichText 和 TileMap 都有可能生成私有节点。*/
130 |
131 | _updateLocalMatrix() {
132 | if (!this._localMatDirty) return;
133 |
134 | let parent = this.parent;
135 | if (parent) {
136 | // Position correction for transform calculation
137 | this._trs[0] = this._originPos.x - (parent._anchorPoint.x - 0.5) * parent._contentSize.width;
138 | this._trs[1] = this._originPos.y - (parent._anchorPoint.y - 0.5) * parent._contentSize.height;
139 | }
140 |
141 | this._super();
142 | },
143 | ```
144 |
145 | 不能用**PrivateNode**,那我们就继续找,找**PrivateNode**与**cc.Node**有啥不同。我们找到了一个属性,经过测试,发现确实是这个属性在起作用。
146 |
147 | 
148 |
149 | 我们深入研究了属性信息:
150 |
151 | ```js
152 | var Destroyed = 1 << 0;
153 | var RealDestroyed = 1 << 1;
154 | var ToDestroy = 1 << 2;
155 | var DontSave = 1 << 3;
156 | var EditorOnly = 1 << 4;
157 | var Dirty = 1 << 5;
158 | var DontDestroy = 1 << 6;
159 | var Destroying = 1 << 7;
160 | var Deactivating = 1 << 8;
161 | var LockedInEditor = 1 << 9;
162 | //var HideInGame = 1 << 9;
163 | var HideInHierarchy = 1 << 10;
164 |
165 | var IsOnEnableCalled = 1 << 11;
166 | var IsEditorOnEnableCalled = 1 << 12;
167 | var IsPreloadStarted = 1 << 13;
168 | var IsOnLoadCalled = 1 << 14;
169 | var IsOnLoadStarted = 1 << 15;
170 | var IsStartCalled = 1 << 16;
171 |
172 | var IsRotationLocked = 1 << 17;
173 | var IsScaleLocked = 1 << 18;
174 | var IsAnchorLocked = 1 << 19;
175 | var IsSizeLocked = 1 << 20;
176 | var IsPositionLocked = 1 << 21;
177 | ```
178 |
179 | 找到了**DontSave**不保存、**LockedInEditor**编辑器中锁定(即不可点击,保证预制体不会在外部修改),我们完成了第一版, 代码修改如下
180 |
181 | ```typescript
182 | private _onPrefabChanged(oldValue:cc.Prefab, newValue:cc.Prefab) {
183 | this._prefab = newValue
184 | if (newValue) {
185 | let prefabNode = cc.instantiate(newValue);
186 | if(prefabNode){
187 | // cc.Object["Flags"].DontSave // 当前节点不会被保存到prefab文件里
188 | // cc.Object["Flags"].LockedInEditor // 当前节点及子节点在编辑器里不会被点击到
189 | // cc.Object["Flags"].HideInHierarchy // 当前节点及子节点在编辑器里不显示
190 | prefabNode["_objFlags"] |= (cc.Object["Flags"].DontSave | cc.Object["Flags"].LockedInEditor | cc.Object["Flags"].HideInHierarchy);
191 | this.node.addChild(prefabNode, -1) // 添加到最底层
192 | }
193 | }
194 | }
195 | ```
196 |
197 | 下面就是最终的实现效果,第一张图是源文件设计有一个com-icon和一个label组成。
198 |
199 | 
200 |
201 | 下图为引用com-icon的显示效果。
202 |
203 | icon1中存放的是我们引用com-icon.prefab,并且在右上角的层级管理器里不会显示com-icon中的实现细节。
204 |
205 | 
206 |
207 | 现在基本上需要实现的功能已经解决了,那我们在代码中如何使用? 最好是代码简洁,不影响访问效率。我们添加了一个直接获取节点组件的方法,这样用起来基本上就没差了
208 |
209 | ```typescript
210 | public getPrefabComponect(type: {prototype: T}): T {
211 | let prefabNode = this._prefabNode
212 | return prefabNode ? prefabNode.getComponent(type) : null;
213 | }
214 |
215 | // 使用的地方
216 | // ...
217 | @property({type: LinkPrefab, visible:true, displayName: "icon2"})
218 | private _icon2: LinkPrefab = null;
219 | // ...
220 | start () {
221 | let icon1 = this._icon1.getPrefabComponect(ComIcon)
222 | if (icon1) {
223 | icon1.label.string = "道具图标1"
224 | }
225 | }
226 | ```
227 |
228 |
229 |
230 | ### 二、用法进阶
231 |
232 | 虽然我们实现了预制体在其他预制体中复用,但是目前来开还是比较简单,不够灵活,不能在编辑器里动态改变一些我们需要改变的信息。
233 |
234 | 这里抛砖引玉,给出一个很常见的使用范例:
235 | 我们做了一个com-icon.prefab, 下面挂载一个cc.Sprite节点(其它节点忽略),主要用来动态显示不同的icon图标。
236 | 在一个界面中,需要显示4个com-icon.prefab的实例,并加载不同的icon图标。这里有两个办法:
237 |
238 | a:在界面A中增加4个节点,调整好位置,分别挂载LinkPrefab组件,把com-icon.prefab拖到LinkPrefab的预制体属性上。
239 | 在界面A的start中去给cc.Sprite节点赋值不同的spriteFrame
240 |
241 | b:在界面B中增加4个节点,调整好位置,分别挂载LinkPrefab组件,把com-icon.prefab拖到LinkPrefab的预制体属性上。
242 |
243 | 在A的节点上挂载link-sprite-prefab(见下方代码)节点,把需要显示的贴图拖到link-sprite-prefab组件的纹理图属性上。
244 |
245 | 
246 |
247 | 这里对四个中的三个icon挂在了link-sprite-help,并且设置了不同的纹理,这样我们既保证了统一性,又保证了显示的灵活性。
248 |
249 | 

250 |
251 |
252 |
253 | ```typescript
254 | import LinkPrefab from "../link-prefab";
255 | const {ccclass, executeInEditMode, property} = cc._decorator;
256 |
257 | @ccclass
258 | @executeInEditMode
259 | export default class LinkSpriteHelp extends cc.Component {
260 |
261 | @property
262 | private _spriteFrame: cc.SpriteFrame = null;
263 |
264 | @property({type: cc.SpriteFrame, visible: true, displayName: "纹理图"})
265 | set spriteFrame(value: cc.SpriteFrame) {
266 | this._spriteFrame = value
267 | this._updateSpriteFrame()
268 | }
269 |
270 | get spriteFrame(): cc.SpriteFrame {
271 | return this._spriteFrame
272 | }
273 |
274 | onLoad() {
275 | this._updateSpriteFrame()
276 | }
277 |
278 | private _updateSpriteFrame() {
279 | let linkPrefab = this.node.getComponent(LinkPrefab)
280 | let sprite = linkPrefab.getPrefabComponect(cc.Sprite)
281 | if (sprite) {
282 | sprite.spriteFrame = this._spriteFrame
283 | }
284 | }
285 | }
286 | ```
287 |
288 | 以上两个办法:a是通过在代码中动态加载贴图并设置到对应的组件上(动态加载)。b是直接在编辑器中完成对不同节点的节图加载(静态加载)。
289 | 相比之下,b方法更优雅简洁。
290 |
291 | 总结:
292 |
293 | 上面的**LinkSpriteHelp**只是作为了开发扩展的引导性实例。大家可以根据自己的想法,开发更多的扩展脚本,以满足各自游戏中的开发需求。
294 |
295 | ### 三、其他问题(开发过程中的已知问题)
296 |
297 | 1、在编辑器里对当前引用的节点进行复制操作,会导致,引用的预制体创建多份(已解决)
298 |
299 | 解决办法:在创建前,判断当前节点的children中是否已存在预制体的实例节点。
300 |
301 |
302 | 2、由于官方在2.3.1版本以后,添加了在预制体中引用预制体的警告。没错就是它:
303 |
304 | 
305 |
306 | 相信你们大多数人已经遇到了,我们的这个写法是这个警告的主要受害群体,所以我的解决方案是把警告弹框忽略掉。将下面的代码放到项目的启动代码中,就可解决
307 |
308 | ```javascript
309 | /// 屏蔽2.3.1版本prefab嵌套prefab的弹框问题
310 | if (CC_EDITOR && !window["Editor"].isBuilder) {
311 | window["_Scene"].DetectConflict.beforeAddChild = function() {
312 | return false
313 | }
314 | }
315 | ```
316 |
317 | 以上示例项目的源代码已经上传,大家可以直接下载下来https://github.com/Relvin/link-prefab
318 |
319 |
320 |
321 | ### 不要走开,后面有彩蛋
322 |
323 |
324 |
325 | # 招贤纳士
326 |
327 | ## 乐府互娱是一家专注于精品移动游戏研发的明星初创企业。公司创始团队均来自于国内知名游戏团队,曾主导创作过3款月流水过亿累积流水过百亿的产品。目前公司新项目有大量Cocos Creator开发的职位空缺,欢迎大家投简历或者来信咨询 recruitment@lovengame.com
328 |
--------------------------------------------------------------------------------
/assets/Scene.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7",
4 | "isGroup": false,
5 | "subMetas": {}
6 | }
--------------------------------------------------------------------------------
/assets/Scene/helloworld.fire:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "__type__": "cc.SceneAsset",
4 | "_name": "",
5 | "_objFlags": 0,
6 | "_native": "",
7 | "scene": {
8 | "__id__": 1
9 | }
10 | },
11 | {
12 | "__type__": "cc.Scene",
13 | "_objFlags": 0,
14 | "_parent": null,
15 | "_children": [
16 | {
17 | "__id__": 2
18 | }
19 | ],
20 | "_active": false,
21 | "_components": [],
22 | "_prefab": null,
23 | "_opacity": 255,
24 | "_color": {
25 | "__type__": "cc.Color",
26 | "r": 255,
27 | "g": 255,
28 | "b": 255,
29 | "a": 255
30 | },
31 | "_contentSize": {
32 | "__type__": "cc.Size",
33 | "width": 0,
34 | "height": 0
35 | },
36 | "_anchorPoint": {
37 | "__type__": "cc.Vec2",
38 | "x": 0,
39 | "y": 0
40 | },
41 | "_trs": {
42 | "__type__": "TypedArray",
43 | "ctor": "Float64Array",
44 | "array": [
45 | 0,
46 | 0,
47 | 0,
48 | 0,
49 | 0,
50 | 0,
51 | 1,
52 | 1,
53 | 1,
54 | 1
55 | ]
56 | },
57 | "_is3DNode": true,
58 | "_groupIndex": 0,
59 | "groupIndex": 0,
60 | "autoReleaseAssets": false,
61 | "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49"
62 | },
63 | {
64 | "__type__": "cc.Node",
65 | "_name": "Canvas",
66 | "_objFlags": 0,
67 | "_parent": {
68 | "__id__": 1
69 | },
70 | "_children": [
71 | {
72 | "__id__": 3
73 | },
74 | {
75 | "__id__": 5
76 | },
77 | {
78 | "__id__": 8
79 | },
80 | {
81 | "__id__": 10
82 | }
83 | ],
84 | "_active": true,
85 | "_components": [
86 | {
87 | "__id__": 18
88 | },
89 | {
90 | "__id__": 19
91 | },
92 | {
93 | "__id__": 20
94 | }
95 | ],
96 | "_prefab": null,
97 | "_opacity": 255,
98 | "_color": {
99 | "__type__": "cc.Color",
100 | "r": 252,
101 | "g": 252,
102 | "b": 252,
103 | "a": 255
104 | },
105 | "_contentSize": {
106 | "__type__": "cc.Size",
107 | "width": 960,
108 | "height": 640
109 | },
110 | "_anchorPoint": {
111 | "__type__": "cc.Vec2",
112 | "x": 0.5,
113 | "y": 0.5
114 | },
115 | "_trs": {
116 | "__type__": "TypedArray",
117 | "ctor": "Float64Array",
118 | "array": [
119 | 480,
120 | 320,
121 | 0,
122 | 0,
123 | 0,
124 | 0,
125 | 1,
126 | 1,
127 | 1,
128 | 1
129 | ]
130 | },
131 | "_eulerAngles": {
132 | "__type__": "cc.Vec3",
133 | "x": 0,
134 | "y": 0,
135 | "z": 0
136 | },
137 | "_skewX": 0,
138 | "_skewY": 0,
139 | "_is3DNode": false,
140 | "_groupIndex": 0,
141 | "groupIndex": 0,
142 | "_id": "a286bbGknJLZpRpxROV6M94"
143 | },
144 | {
145 | "__type__": "cc.Node",
146 | "_name": "Main Camera",
147 | "_objFlags": 0,
148 | "_parent": {
149 | "__id__": 2
150 | },
151 | "_children": [],
152 | "_active": true,
153 | "_components": [
154 | {
155 | "__id__": 4
156 | }
157 | ],
158 | "_prefab": null,
159 | "_opacity": 255,
160 | "_color": {
161 | "__type__": "cc.Color",
162 | "r": 255,
163 | "g": 255,
164 | "b": 255,
165 | "a": 255
166 | },
167 | "_contentSize": {
168 | "__type__": "cc.Size",
169 | "width": 0,
170 | "height": 0
171 | },
172 | "_anchorPoint": {
173 | "__type__": "cc.Vec2",
174 | "x": 0.5,
175 | "y": 0.5
176 | },
177 | "_trs": {
178 | "__type__": "TypedArray",
179 | "ctor": "Float64Array",
180 | "array": [
181 | 0,
182 | 0,
183 | 322.4185514995597,
184 | 0,
185 | 0,
186 | 0,
187 | 1,
188 | 1,
189 | 1,
190 | 1
191 | ]
192 | },
193 | "_eulerAngles": {
194 | "__type__": "cc.Vec3",
195 | "x": 0,
196 | "y": 0,
197 | "z": 0
198 | },
199 | "_skewX": 0,
200 | "_skewY": 0,
201 | "_is3DNode": false,
202 | "_groupIndex": 0,
203 | "groupIndex": 0,
204 | "_id": "c44JkxxaZJEKdzCqIj8Cep"
205 | },
206 | {
207 | "__type__": "cc.Camera",
208 | "_name": "",
209 | "_objFlags": 0,
210 | "node": {
211 | "__id__": 3
212 | },
213 | "_enabled": true,
214 | "_cullingMask": 4294967295,
215 | "_clearFlags": 7,
216 | "_backgroundColor": {
217 | "__type__": "cc.Color",
218 | "r": 0,
219 | "g": 0,
220 | "b": 0,
221 | "a": 255
222 | },
223 | "_depth": -1,
224 | "_zoomRatio": 1,
225 | "_targetTexture": null,
226 | "_fov": 60,
227 | "_orthoSize": 10,
228 | "_nearClip": 1,
229 | "_farClip": 4096,
230 | "_ortho": true,
231 | "_rect": {
232 | "__type__": "cc.Rect",
233 | "x": 0,
234 | "y": 0,
235 | "width": 1,
236 | "height": 1
237 | },
238 | "_renderStages": 1,
239 | "_alignWithScreen": true,
240 | "_id": "fe3Wm8LGJPRrmEuUHmzsaP"
241 | },
242 | {
243 | "__type__": "cc.Node",
244 | "_name": "background",
245 | "_objFlags": 0,
246 | "_parent": {
247 | "__id__": 2
248 | },
249 | "_children": [],
250 | "_active": true,
251 | "_components": [
252 | {
253 | "__id__": 6
254 | },
255 | {
256 | "__id__": 7
257 | }
258 | ],
259 | "_prefab": null,
260 | "_opacity": 255,
261 | "_color": {
262 | "__type__": "cc.Color",
263 | "r": 27,
264 | "g": 38,
265 | "b": 46,
266 | "a": 255
267 | },
268 | "_contentSize": {
269 | "__type__": "cc.Size",
270 | "width": 960,
271 | "height": 640
272 | },
273 | "_anchorPoint": {
274 | "__type__": "cc.Vec2",
275 | "x": 0.5,
276 | "y": 0.5
277 | },
278 | "_trs": {
279 | "__type__": "TypedArray",
280 | "ctor": "Float64Array",
281 | "array": [
282 | 0,
283 | 0,
284 | 0,
285 | 0,
286 | 0,
287 | 0,
288 | 1,
289 | 1,
290 | 1,
291 | 1
292 | ]
293 | },
294 | "_eulerAngles": {
295 | "__type__": "cc.Vec3",
296 | "x": 0,
297 | "y": 0,
298 | "z": 0
299 | },
300 | "_skewX": 0,
301 | "_skewY": 0,
302 | "_is3DNode": false,
303 | "_groupIndex": 0,
304 | "groupIndex": 0,
305 | "_id": "e2e0crkOLxGrpMxpbC4iQg1"
306 | },
307 | {
308 | "__type__": "cc.Widget",
309 | "_name": "",
310 | "_objFlags": 0,
311 | "node": {
312 | "__id__": 5
313 | },
314 | "_enabled": true,
315 | "alignMode": 0,
316 | "_target": null,
317 | "_alignFlags": 45,
318 | "_left": 0,
319 | "_right": 0,
320 | "_top": 0,
321 | "_bottom": 0,
322 | "_verticalCenter": 0,
323 | "_horizontalCenter": 0,
324 | "_isAbsLeft": true,
325 | "_isAbsRight": true,
326 | "_isAbsTop": true,
327 | "_isAbsBottom": true,
328 | "_isAbsHorizontalCenter": true,
329 | "_isAbsVerticalCenter": true,
330 | "_originalWidth": 200,
331 | "_originalHeight": 150,
332 | "_id": "4cStkLXz5Hn5W4NOxB/oc6"
333 | },
334 | {
335 | "__type__": "cc.Sprite",
336 | "_name": "",
337 | "_objFlags": 0,
338 | "node": {
339 | "__id__": 5
340 | },
341 | "_enabled": true,
342 | "_materials": [
343 | {
344 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
345 | }
346 | ],
347 | "_srcBlendFactor": 770,
348 | "_dstBlendFactor": 771,
349 | "_spriteFrame": {
350 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7"
351 | },
352 | "_type": 1,
353 | "_sizeMode": 0,
354 | "_fillType": 0,
355 | "_fillCenter": {
356 | "__type__": "cc.Vec2",
357 | "x": 0,
358 | "y": 0
359 | },
360 | "_fillStart": 0,
361 | "_fillRange": 0,
362 | "_isTrimmedMode": true,
363 | "_atlas": null,
364 | "_id": "f6XEBAt8FP+5o/AwWX8aVX"
365 | },
366 | {
367 | "__type__": "cc.Node",
368 | "_name": "label",
369 | "_objFlags": 0,
370 | "_parent": {
371 | "__id__": 2
372 | },
373 | "_children": [],
374 | "_active": true,
375 | "_components": [
376 | {
377 | "__id__": 9
378 | }
379 | ],
380 | "_prefab": null,
381 | "_opacity": 255,
382 | "_color": {
383 | "__type__": "cc.Color",
384 | "r": 255,
385 | "g": 255,
386 | "b": 255,
387 | "a": 255
388 | },
389 | "_contentSize": {
390 | "__type__": "cc.Size",
391 | "width": 342.33,
392 | "height": 75.6
393 | },
394 | "_anchorPoint": {
395 | "__type__": "cc.Vec2",
396 | "x": 0.5,
397 | "y": 0.5
398 | },
399 | "_trs": {
400 | "__type__": "TypedArray",
401 | "ctor": "Float64Array",
402 | "array": [
403 | 0,
404 | 62,
405 | 0,
406 | 0,
407 | 0,
408 | 0,
409 | 1,
410 | 1,
411 | 1,
412 | 1
413 | ]
414 | },
415 | "_eulerAngles": {
416 | "__type__": "cc.Vec3",
417 | "x": 0,
418 | "y": 0,
419 | "z": 0
420 | },
421 | "_skewX": 0,
422 | "_skewY": 0,
423 | "_is3DNode": false,
424 | "_groupIndex": 0,
425 | "groupIndex": 0,
426 | "_id": "31f1bH7V69Ajr1iXhluMpTB"
427 | },
428 | {
429 | "__type__": "cc.Label",
430 | "_name": "",
431 | "_objFlags": 0,
432 | "node": {
433 | "__id__": 8
434 | },
435 | "_enabled": true,
436 | "_materials": [
437 | {
438 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
439 | }
440 | ],
441 | "_useOriginalSize": false,
442 | "_string": "Hello, World!",
443 | "_N$string": "Hello, World!",
444 | "_fontSize": 60,
445 | "_lineHeight": 60,
446 | "_enableWrapText": true,
447 | "_N$file": null,
448 | "_isSystemFontUsed": true,
449 | "_spacingX": 0,
450 | "_batchAsBitmap": false,
451 | "_styleFlags": 0,
452 | "_underlineHeight": 0,
453 | "_N$horizontalAlign": 1,
454 | "_N$verticalAlign": 1,
455 | "_N$fontFamily": "Arial",
456 | "_N$overflow": 0,
457 | "_N$cacheMode": 0,
458 | "_id": "dbGMM8Zs1LzZRI9AmEL7Le"
459 | },
460 | {
461 | "__type__": "cc.Node",
462 | "_name": "button",
463 | "_objFlags": 0,
464 | "_parent": {
465 | "__id__": 2
466 | },
467 | "_children": [
468 | {
469 | "__id__": 11
470 | }
471 | ],
472 | "_active": true,
473 | "_components": [
474 | {
475 | "__id__": 16
476 | }
477 | ],
478 | "_prefab": null,
479 | "_opacity": 255,
480 | "_color": {
481 | "__type__": "cc.Color",
482 | "r": 255,
483 | "g": 255,
484 | "b": 255,
485 | "a": 255
486 | },
487 | "_contentSize": {
488 | "__type__": "cc.Size",
489 | "width": 100,
490 | "height": 40
491 | },
492 | "_anchorPoint": {
493 | "__type__": "cc.Vec2",
494 | "x": 0.5,
495 | "y": 0.5
496 | },
497 | "_trs": {
498 | "__type__": "TypedArray",
499 | "ctor": "Float64Array",
500 | "array": [
501 | 0,
502 | -180,
503 | 0,
504 | 0,
505 | 0,
506 | 0,
507 | 1,
508 | 1,
509 | 1,
510 | 1
511 | ]
512 | },
513 | "_eulerAngles": {
514 | "__type__": "cc.Vec3",
515 | "x": 0,
516 | "y": 0,
517 | "z": 0
518 | },
519 | "_skewX": 0,
520 | "_skewY": 0,
521 | "_is3DNode": false,
522 | "_groupIndex": 0,
523 | "groupIndex": 0,
524 | "_id": "58U8o/mhdF16piRSKzztdg"
525 | },
526 | {
527 | "__type__": "cc.Node",
528 | "_name": "Background",
529 | "_objFlags": 0,
530 | "_parent": {
531 | "__id__": 10
532 | },
533 | "_children": [
534 | {
535 | "__id__": 12
536 | }
537 | ],
538 | "_active": true,
539 | "_components": [
540 | {
541 | "__id__": 14
542 | },
543 | {
544 | "__id__": 15
545 | }
546 | ],
547 | "_prefab": null,
548 | "_opacity": 255,
549 | "_color": {
550 | "__type__": "cc.Color",
551 | "r": 255,
552 | "g": 255,
553 | "b": 255,
554 | "a": 255
555 | },
556 | "_contentSize": {
557 | "__type__": "cc.Size",
558 | "width": 100,
559 | "height": 40
560 | },
561 | "_anchorPoint": {
562 | "__type__": "cc.Vec2",
563 | "x": 0.5,
564 | "y": 0.5
565 | },
566 | "_trs": {
567 | "__type__": "TypedArray",
568 | "ctor": "Float64Array",
569 | "array": [
570 | 0,
571 | 0,
572 | 0,
573 | 0,
574 | 0,
575 | 0,
576 | 1,
577 | 1,
578 | 1,
579 | 1
580 | ]
581 | },
582 | "_eulerAngles": {
583 | "__type__": "cc.Vec3",
584 | "x": 0,
585 | "y": 0,
586 | "z": 0
587 | },
588 | "_skewX": 0,
589 | "_skewY": 0,
590 | "_is3DNode": false,
591 | "_groupIndex": 0,
592 | "groupIndex": 0,
593 | "_id": "d4H8TFCTpNl67/GOzSuT6J"
594 | },
595 | {
596 | "__type__": "cc.Node",
597 | "_name": "Label",
598 | "_objFlags": 0,
599 | "_parent": {
600 | "__id__": 11
601 | },
602 | "_children": [],
603 | "_active": true,
604 | "_components": [
605 | {
606 | "__id__": 13
607 | }
608 | ],
609 | "_prefab": null,
610 | "_opacity": 255,
611 | "_color": {
612 | "__type__": "cc.Color",
613 | "r": 0,
614 | "g": 0,
615 | "b": 0,
616 | "a": 255
617 | },
618 | "_contentSize": {
619 | "__type__": "cc.Size",
620 | "width": 100,
621 | "height": 40
622 | },
623 | "_anchorPoint": {
624 | "__type__": "cc.Vec2",
625 | "x": 0.5,
626 | "y": 0.5
627 | },
628 | "_trs": {
629 | "__type__": "TypedArray",
630 | "ctor": "Float64Array",
631 | "array": [
632 | 0,
633 | 0,
634 | 0,
635 | 0,
636 | 0,
637 | 0,
638 | 1,
639 | 1,
640 | 1,
641 | 1
642 | ]
643 | },
644 | "_eulerAngles": {
645 | "__type__": "cc.Vec3",
646 | "x": 0,
647 | "y": 0,
648 | "z": 0
649 | },
650 | "_skewX": 0,
651 | "_skewY": 0,
652 | "_is3DNode": false,
653 | "_groupIndex": 0,
654 | "groupIndex": 0,
655 | "_id": "33DA2tPXlOn7dyWNfryXyP"
656 | },
657 | {
658 | "__type__": "cc.Label",
659 | "_name": "",
660 | "_objFlags": 0,
661 | "node": {
662 | "__id__": 12
663 | },
664 | "_enabled": true,
665 | "_materials": [
666 | {
667 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
668 | }
669 | ],
670 | "_useOriginalSize": false,
671 | "_string": "button",
672 | "_N$string": "button",
673 | "_fontSize": 20,
674 | "_lineHeight": 40,
675 | "_enableWrapText": false,
676 | "_N$file": null,
677 | "_isSystemFontUsed": true,
678 | "_spacingX": 0,
679 | "_batchAsBitmap": false,
680 | "_styleFlags": 0,
681 | "_underlineHeight": 0,
682 | "_N$horizontalAlign": 1,
683 | "_N$verticalAlign": 1,
684 | "_N$fontFamily": "Arial",
685 | "_N$overflow": 1,
686 | "_N$cacheMode": 1,
687 | "_id": "98Cid5gaZPp7kmyzCDDKQp"
688 | },
689 | {
690 | "__type__": "cc.Sprite",
691 | "_name": "",
692 | "_objFlags": 0,
693 | "node": {
694 | "__id__": 11
695 | },
696 | "_enabled": true,
697 | "_materials": [
698 | {
699 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
700 | }
701 | ],
702 | "_srcBlendFactor": 770,
703 | "_dstBlendFactor": 771,
704 | "_spriteFrame": {
705 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
706 | },
707 | "_type": 1,
708 | "_sizeMode": 0,
709 | "_fillType": 0,
710 | "_fillCenter": {
711 | "__type__": "cc.Vec2",
712 | "x": 0,
713 | "y": 0
714 | },
715 | "_fillStart": 0,
716 | "_fillRange": 0,
717 | "_isTrimmedMode": true,
718 | "_atlas": null,
719 | "_id": "d4PLRYGMNPc4FHrP1hL8o/"
720 | },
721 | {
722 | "__type__": "cc.Widget",
723 | "_name": "",
724 | "_objFlags": 0,
725 | "node": {
726 | "__id__": 11
727 | },
728 | "_enabled": true,
729 | "alignMode": 0,
730 | "_target": null,
731 | "_alignFlags": 45,
732 | "_left": 0,
733 | "_right": 0,
734 | "_top": 0,
735 | "_bottom": 0,
736 | "_verticalCenter": 0,
737 | "_horizontalCenter": 0,
738 | "_isAbsLeft": true,
739 | "_isAbsRight": true,
740 | "_isAbsTop": true,
741 | "_isAbsBottom": true,
742 | "_isAbsHorizontalCenter": true,
743 | "_isAbsVerticalCenter": true,
744 | "_originalWidth": 100,
745 | "_originalHeight": 40,
746 | "_id": "4bYy5eBDNKaZmUaL3kFG57"
747 | },
748 | {
749 | "__type__": "cc.Button",
750 | "_name": "",
751 | "_objFlags": 0,
752 | "node": {
753 | "__id__": 10
754 | },
755 | "_enabled": true,
756 | "_normalMaterial": null,
757 | "_grayMaterial": null,
758 | "duration": 0.1,
759 | "zoomScale": 1.2,
760 | "clickEvents": [
761 | {
762 | "__id__": 17
763 | }
764 | ],
765 | "_N$interactable": true,
766 | "_N$enableAutoGrayEffect": false,
767 | "_N$transition": 2,
768 | "transition": 2,
769 | "_N$normalColor": {
770 | "__type__": "cc.Color",
771 | "r": 230,
772 | "g": 230,
773 | "b": 230,
774 | "a": 255
775 | },
776 | "_N$pressedColor": {
777 | "__type__": "cc.Color",
778 | "r": 200,
779 | "g": 200,
780 | "b": 200,
781 | "a": 255
782 | },
783 | "pressedColor": {
784 | "__type__": "cc.Color",
785 | "r": 200,
786 | "g": 200,
787 | "b": 200,
788 | "a": 255
789 | },
790 | "_N$hoverColor": {
791 | "__type__": "cc.Color",
792 | "r": 255,
793 | "g": 255,
794 | "b": 255,
795 | "a": 255
796 | },
797 | "hoverColor": {
798 | "__type__": "cc.Color",
799 | "r": 255,
800 | "g": 255,
801 | "b": 255,
802 | "a": 255
803 | },
804 | "_N$disabledColor": {
805 | "__type__": "cc.Color",
806 | "r": 120,
807 | "g": 120,
808 | "b": 120,
809 | "a": 200
810 | },
811 | "_N$normalSprite": {
812 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
813 | },
814 | "_N$pressedSprite": {
815 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
816 | },
817 | "pressedSprite": {
818 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
819 | },
820 | "_N$hoverSprite": {
821 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
822 | },
823 | "hoverSprite": {
824 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
825 | },
826 | "_N$disabledSprite": {
827 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
828 | },
829 | "_N$target": {
830 | "__id__": 11
831 | },
832 | "_id": "33z42zTb9FsbLQB/Sme7uo"
833 | },
834 | {
835 | "__type__": "cc.ClickEvent",
836 | "target": {
837 | "__id__": 2
838 | },
839 | "component": "",
840 | "_componentId": "e1b90/rohdEk4SdmmEZANaD",
841 | "handler": "on_load_button_clicked",
842 | "customEventData": ""
843 | },
844 | {
845 | "__type__": "cc.Canvas",
846 | "_name": "",
847 | "_objFlags": 0,
848 | "node": {
849 | "__id__": 2
850 | },
851 | "_enabled": true,
852 | "_designResolution": {
853 | "__type__": "cc.Size",
854 | "width": 960,
855 | "height": 640
856 | },
857 | "_fitWidth": false,
858 | "_fitHeight": true,
859 | "_id": "33tGF2zopBcZKRYuibnQKp"
860 | },
861 | {
862 | "__type__": "e1b90/rohdEk4SdmmEZANaD",
863 | "_name": "",
864 | "_objFlags": 0,
865 | "node": {
866 | "__id__": 2
867 | },
868 | "_enabled": true,
869 | "label": {
870 | "__id__": 9
871 | },
872 | "text": "hello",
873 | "_id": "c1rbGJO0dJUo77o/kAKJN/"
874 | },
875 | {
876 | "__type__": "cc.Widget",
877 | "_name": "",
878 | "_objFlags": 0,
879 | "node": {
880 | "__id__": 2
881 | },
882 | "_enabled": true,
883 | "alignMode": 1,
884 | "_target": null,
885 | "_alignFlags": 45,
886 | "_left": 0,
887 | "_right": 0,
888 | "_top": 0,
889 | "_bottom": 0,
890 | "_verticalCenter": 0,
891 | "_horizontalCenter": 0,
892 | "_isAbsLeft": true,
893 | "_isAbsRight": true,
894 | "_isAbsTop": true,
895 | "_isAbsBottom": true,
896 | "_isAbsHorizontalCenter": true,
897 | "_isAbsVerticalCenter": true,
898 | "_originalWidth": 0,
899 | "_originalHeight": 0,
900 | "_id": "7a40v9QmFOUYygdeh9EnP0"
901 | }
902 | ]
--------------------------------------------------------------------------------
/assets/Scene/helloworld.fire.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.2.6",
3 | "uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49",
4 | "asyncLoadAssets": false,
5 | "autoReleaseAssets": false,
6 | "subMetas": {}
7 | }
--------------------------------------------------------------------------------
/assets/Script.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934",
4 | "isGroup": false,
5 | "subMetas": {}
6 | }
--------------------------------------------------------------------------------
/assets/Script/Helloworld.ts:
--------------------------------------------------------------------------------
1 | /*********************************
2 | * 创建者 :Relvin
3 | * 时间 :2019年9月11号16:52:10
4 | *
5 | * ******************************/
6 |
7 | const {ccclass, property} = cc._decorator;
8 |
9 | @ccclass
10 | export default class Helloworld extends cc.Component {
11 |
12 | @property(cc.Label)
13 | label: cc.Label = null;
14 |
15 | @property
16 | text: string = 'hello';
17 |
18 | start () {
19 | // init logic
20 | this.label.string = this.text;
21 | }
22 |
23 | on_load_button_clicked() {
24 | let self = this
25 | cc.loader.loadRes("login-layer", cc.Prefab, (ret, prefab: cc.Prefab)=> {
26 | if (ret) {
27 | console.log(ret)
28 | return
29 | }
30 | let loginLayer = cc.instantiate(prefab)
31 | loginLayer.parent = this.node
32 | })
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/assets/Script/Helloworld.ts.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.8",
3 | "uuid": "e1b90feb-a217-4493-849d-9a611900d683",
4 | "isPlugin": false,
5 | "loadPluginInWeb": true,
6 | "loadPluginInNative": true,
7 | "loadPluginInEditor": false,
8 | "subMetas": {}
9 | }
--------------------------------------------------------------------------------
/assets/Script/com-icon.ts:
--------------------------------------------------------------------------------
1 | /*********************************
2 | * 创建者 :Relvin
3 | * 时间 :2019年9月11号16:52:10
4 | *
5 | * ******************************/
6 |
7 | const {ccclass, property} = cc._decorator;
8 |
9 | @ccclass
10 | export default class ComIcon extends cc.Component {
11 |
12 | @property(cc.Label)
13 | label: cc.Label = null;
14 |
15 | // LIFE-CYCLE CALLBACKS:
16 |
17 | // onLoad () {}
18 |
19 | start () {
20 |
21 | }
22 |
23 | // update (dt) {}
24 | }
25 |
--------------------------------------------------------------------------------
/assets/Script/com-icon.ts.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.8",
3 | "uuid": "8d1ed08b-29c7-425d-b977-9dc6b1b0484f",
4 | "isPlugin": false,
5 | "loadPluginInWeb": true,
6 | "loadPluginInNative": true,
7 | "loadPluginInEditor": false,
8 | "subMetas": {}
9 | }
--------------------------------------------------------------------------------
/assets/Script/link-prefab-help.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "8d863c13-80b4-4d3e-80eb-06adc8a2655d",
4 | "isSubpackage": false,
5 | "subpackageName": "",
6 | "subMetas": {}
7 | }
--------------------------------------------------------------------------------
/assets/Script/link-prefab-help/link-sprite-help.ts:
--------------------------------------------------------------------------------
1 | /*********************************
2 | * 创建者 :Relvin
3 | * 时间 :2020年3月11号16:52:10
4 | *
5 | * ******************************/
6 |
7 |
8 | import LinkPrefab from "../link-prefab";
9 | const {ccclass, executeInEditMode, property} = cc._decorator;
10 |
11 | @ccclass
12 | @executeInEditMode
13 | export default class LinkSpriteHelp extends cc.Component {
14 |
15 | @property
16 | private _spriteFrame: cc.SpriteFrame = null;
17 |
18 | @property({type: cc.SpriteFrame, visible: true, displayName: "纹理图"})
19 | set spriteFrame(value: cc.SpriteFrame) {
20 | this._spriteFrame = value
21 | this._updateSpriteFrame()
22 | }
23 |
24 | get spriteFrame(): cc.SpriteFrame {
25 | return this._spriteFrame
26 | }
27 |
28 | start () {
29 |
30 | }
31 |
32 | onLoad() {
33 | this._updateSpriteFrame()
34 | }
35 |
36 | private _updateSpriteFrame() {
37 | let linkPrefab = this.node.getComponent(LinkPrefab)
38 | let sprite = linkPrefab.getPrefabComponect(cc.Sprite)
39 | if (sprite) {
40 | sprite.spriteFrame = this._spriteFrame
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/assets/Script/link-prefab-help/link-sprite-help.ts.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.8",
3 | "uuid": "21eea7ef-565f-4c27-b680-dca22ea617d1",
4 | "isPlugin": false,
5 | "loadPluginInWeb": true,
6 | "loadPluginInNative": true,
7 | "loadPluginInEditor": false,
8 | "subMetas": {}
9 | }
--------------------------------------------------------------------------------
/assets/Script/link-prefab.ts:
--------------------------------------------------------------------------------
1 | /*********************************
2 | * 创建者 :Relvin
3 | * 时间 :2020年3月11号16:52:10
4 | *
5 | * ******************************/
6 |
7 | const {ccclass, executeInEditMode, property} = cc._decorator;
8 |
9 | // // 屏蔽2.3.1版本prefab嵌套prefab的弹框问题
10 | if (CC_EDITOR && !window["Editor"].isBuilder) {
11 | window["_Scene"].DetectConflict.beforeAddChild = function() {
12 | return false
13 | }
14 | }
15 |
16 |
17 | @ccclass
18 | @executeInEditMode
19 | export default class LinkPrefab extends cc.Component {
20 |
21 | private _prefabNode: cc.Node = null
22 |
23 | @property
24 | private _prefab: cc.Prefab = null
25 |
26 | @property({type: cc.Prefab, visible: true, displayName: "预制体"})
27 | set prefab(value: cc.Prefab) {
28 | this._onPrefabChanged(this._prefab, value)
29 | }
30 |
31 | get prefab(): cc.Prefab {
32 | return this._prefab
33 | }
34 |
35 | private _onPrefabChanged(oldValue:cc.Prefab, newValue:cc.Prefab) {
36 | if (this._prefabNode) {
37 | this._prefabNode.destroy();
38 | this._prefabNode = null;
39 | }
40 | this._prefab = newValue
41 | if (newValue) {
42 | let prefabNode = cc.instantiate(newValue);
43 | if(prefabNode){
44 | this._prefabNode = prefabNode;
45 |
46 | // cc.Object["Flags"].DontSave // 当前节点不会被保存到prefab文件里
47 | // cc.Object["Flags"].LockedInEditor // 当前节点及子节点在编辑器里不会被点击到
48 | // cc.Object["Flags"].HideInHierarchy // 当前节点及子节点在编辑器里不显示
49 |
50 | prefabNode["_objFlags"] |= (cc.Object["Flags"].DontSave | cc.Object["Flags"].LockedInEditor | cc.Object["Flags"].HideInHierarchy);
51 | prefabNode.x = 0
52 | prefabNode.y = 0
53 | this.node.addChild(prefabNode, -1) // 添加到最底层
54 | prefabNode.name = "prefabNode";
55 | this.node.setContentSize(prefabNode.getContentSize())
56 | }
57 | }
58 | }
59 |
60 | public getPefabNode(): cc.Node {
61 | this._initPrefab() // 防止当前node被默认隐藏导致,prefabNode获取不到
62 | return this._prefabNode
63 | }
64 |
65 | public getPrefabComponect(type: {prototype: T}): T {
66 | let prefabNode = this._prefabNode
67 | return prefabNode ? prefabNode.getComponent(type) : null;
68 | }
69 |
70 | onLoad() {
71 | this._initPrefab()
72 | }
73 |
74 | private _initPrefab() {
75 | if (!this._prefab || this._prefabNode) {
76 | return
77 | }
78 | let instNode = this.node.getChildByName("prefabNode"); // 避免外部通过cc.instantiate(this.node),导致prefabNode被创建多份
79 | if (instNode) {
80 | this._prefabNode = instNode;
81 | }
82 | else {
83 | if (CC_EDITOR) {
84 | this._onPrefabChanged(null, this._prefab)
85 | }
86 | else {
87 | let prefabNode = cc.instantiate(this._prefab);
88 | if(prefabNode){
89 | this._prefabNode = prefabNode;
90 | this.node.addChild(prefabNode, -1) // 添加到最底层
91 | prefabNode.name = "prefabNode";
92 | prefabNode.x = 0
93 | prefabNode.y = 0
94 | this.node.setContentSize(prefabNode.getContentSize())
95 | }
96 | }
97 | }
98 | }
99 | // update (dt) {}
100 | }
101 |
--------------------------------------------------------------------------------
/assets/Script/link-prefab.ts.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.8",
3 | "uuid": "aa20e5cc-7a8c-4aa5-9aee-3f49ddeaf20d",
4 | "isPlugin": false,
5 | "loadPluginInWeb": true,
6 | "loadPluginInNative": true,
7 | "loadPluginInEditor": false,
8 | "subMetas": {}
9 | }
--------------------------------------------------------------------------------
/assets/Script/login-layer.ts:
--------------------------------------------------------------------------------
1 | /*********************************
2 | * 创建者 :Relvin
3 | * 时间 :2020年3月11号16:52:10
4 | *
5 | * ******************************/
6 |
7 | import LinkPrefab from "./link-prefab";
8 | import ComIcon from "./com-icon";
9 |
10 |
11 | const {ccclass, property} = cc._decorator;
12 |
13 | @ccclass
14 | export default class NewClass extends cc.Component {
15 |
16 | @property({type: LinkPrefab, visible:true, displayName: "icon1"})
17 | private _icon1: LinkPrefab = null;
18 |
19 | @property({type: LinkPrefab, visible:true, displayName: "icon2"})
20 | private _icon2: LinkPrefab = null;
21 |
22 | // LIFE-CYCLE CALLBACKS:
23 |
24 | // onLoad () {}
25 |
26 | start () {
27 | let icon1 = this._icon1.getPrefabComponect(ComIcon)
28 | if (icon1) {
29 | icon1.label.string = "道具图标1"
30 | }
31 |
32 | let icon2 = this._icon2.getPrefabComponect(ComIcon)
33 | if (icon2) {
34 | icon2.label.string = "道具图标2"
35 | }
36 | }
37 |
38 | // update (dt) {}
39 | }
40 |
--------------------------------------------------------------------------------
/assets/Script/login-layer.ts.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.8",
3 | "uuid": "5428f802-019f-4a59-8ccb-9d4b4348d4d5",
4 | "isPlugin": false,
5 | "loadPluginInWeb": true,
6 | "loadPluginInNative": true,
7 | "loadPluginInEditor": false,
8 | "subMetas": {}
9 | }
--------------------------------------------------------------------------------
/assets/Texture.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54",
4 | "isGroup": false,
5 | "subMetas": {}
6 | }
--------------------------------------------------------------------------------
/assets/Texture/HelloWorld.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/HelloWorld.png
--------------------------------------------------------------------------------
/assets/Texture/HelloWorld.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 195,
11 | "height": 270,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "HelloWorld": {
15 | "ver": "1.0.4",
16 | "uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc",
17 | "rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": 0,
23 | "trimX": 0,
24 | "trimY": 0,
25 | "width": 195,
26 | "height": 270,
27 | "rawWidth": 195,
28 | "rawHeight": 270,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/Texture/gold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/gold.png
--------------------------------------------------------------------------------
/assets/Texture/gold.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "91293abb-9a38-48a0-81ca-9147cd7c50e1",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 80,
11 | "height": 80,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "gold": {
15 | "ver": "1.0.4",
16 | "uuid": "c04eb37c-55b0-4feb-a171-98de48651c68",
17 | "rawTextureUuid": "91293abb-9a38-48a0-81ca-9147cd7c50e1",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": 0,
23 | "trimX": 0,
24 | "trimY": 0,
25 | "width": 80,
26 | "height": 80,
27 | "rawWidth": 80,
28 | "rawHeight": 80,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/Texture/goldcoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/goldcoin.png
--------------------------------------------------------------------------------
/assets/Texture/goldcoin.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "083029c1-2c9d-43e1-9178-c1b62281c9c1",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 80,
11 | "height": 80,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "goldcoin": {
15 | "ver": "1.0.4",
16 | "uuid": "b121389b-e89c-4800-a6ca-99916708b535",
17 | "rawTextureUuid": "083029c1-2c9d-43e1-9178-c1b62281c9c1",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": 0,
23 | "trimX": 0,
24 | "trimY": 0,
25 | "width": 80,
26 | "height": 80,
27 | "rawWidth": 80,
28 | "rawHeight": 80,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/Texture/image-20200402142308217.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/image-20200402142308217.png
--------------------------------------------------------------------------------
/assets/Texture/image-20200402142308217.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "2e6a3d47-f12f-4c0c-89e6-516df1b35b94",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 361,
11 | "height": 145,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "image-20200402142308217": {
15 | "ver": "1.0.4",
16 | "uuid": "cde0f5dc-3487-449a-aadb-ac7d5ba2e711",
17 | "rawTextureUuid": "2e6a3d47-f12f-4c0c-89e6-516df1b35b94",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": 0,
23 | "trimX": 0,
24 | "trimY": 0,
25 | "width": 361,
26 | "height": 145,
27 | "rawWidth": 361,
28 | "rawHeight": 145,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/Texture/singleColor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/singleColor.png
--------------------------------------------------------------------------------
/assets/Texture/singleColor.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 2,
11 | "height": 2,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "singleColor": {
15 | "ver": "1.0.4",
16 | "uuid": "410fb916-8721-4663-bab8-34397391ace7",
17 | "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": 0,
23 | "trimX": 0,
24 | "trimY": 0,
25 | "width": 2,
26 | "height": 2,
27 | "rawWidth": 2,
28 | "rawHeight": 2,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/Texture/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/star.png
--------------------------------------------------------------------------------
/assets/Texture/star.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "f5c5b36c-f330-4117-8ba4-fff079d79c4b",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 169,
11 | "height": 201,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "star": {
15 | "ver": "1.0.4",
16 | "uuid": "9899caea-032f-4d4c-a039-bcb07a20c44e",
17 | "rawTextureUuid": "f5c5b36c-f330-4117-8ba4-fff079d79c4b",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": -4,
23 | "trimX": 0,
24 | "trimY": 12,
25 | "width": 169,
26 | "height": 185,
27 | "rawWidth": 169,
28 | "rawHeight": 201,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/Texture/tab-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/assets/Texture/tab-bg.png
--------------------------------------------------------------------------------
/assets/Texture/tab-bg.png.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "2.3.4",
3 | "uuid": "41ffca8e-db84-4626-bda6-1b15af4b7f30",
4 | "type": "sprite",
5 | "wrapMode": "clamp",
6 | "filterMode": "bilinear",
7 | "premultiplyAlpha": false,
8 | "genMipmaps": false,
9 | "packable": true,
10 | "width": 84,
11 | "height": 84,
12 | "platformSettings": {},
13 | "subMetas": {
14 | "tab-bg": {
15 | "ver": "1.0.4",
16 | "uuid": "efc2b25a-edf1-44fa-8a84-f6c88da07631",
17 | "rawTextureUuid": "41ffca8e-db84-4626-bda6-1b15af4b7f30",
18 | "trimType": "auto",
19 | "trimThreshold": 1,
20 | "rotated": false,
21 | "offsetX": 0,
22 | "offsetY": 0,
23 | "trimX": 0,
24 | "trimY": 0,
25 | "width": 84,
26 | "height": 84,
27 | "rawWidth": 84,
28 | "rawHeight": 84,
29 | "borderTop": 0,
30 | "borderBottom": 0,
31 | "borderLeft": 0,
32 | "borderRight": 0,
33 | "subMetas": {}
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/assets/migration.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "578dd677-35dd-4e3c-a794-f25aa270ffbb",
4 | "isSubpackage": false,
5 | "subpackageName": "",
6 | "subMetas": {}
7 | }
--------------------------------------------------------------------------------
/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ~ 2.2.1 version.
3 | * You do not need to manually add this script in any other project.
4 | * If you don't use cc.Toggle in your project, you can delete this script directly.
5 | * If your project is hosted in VCS such as git, submit this script together.
6 | *
7 | * 此脚本由 Cocos Creator 自动生成,仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程,
8 | * 你无需在任何其它项目中手动添加此脚本。
9 | * 如果你的项目中没用到 Toggle,可直接删除该脚本。
10 | * 如果你的项目有托管于 git 等版本库,请将此脚本一并上传。
11 | */
12 |
13 | if (cc.Toggle) {
14 | // Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code
15 | // 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件
16 | cc.Toggle._triggerEventInScript_isChecked = true;
17 | }
18 |
--------------------------------------------------------------------------------
/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.8",
3 | "uuid": "d012a19d-9f23-48ec-8b86-a6bf52a61525",
4 | "isPlugin": false,
5 | "loadPluginInWeb": true,
6 | "loadPluginInNative": true,
7 | "loadPluginInEditor": false,
8 | "subMetas": {}
9 | }
--------------------------------------------------------------------------------
/assets/res.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "5a5d9820-986a-4227-b8d0-1762e7423f82",
4 | "isSubpackage": false,
5 | "subpackageName": "",
6 | "subMetas": {}
7 | }
--------------------------------------------------------------------------------
/assets/res/prefabs.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "b9d2dbd7-2fe5-4d6c-b346-09c07eaf4a0f",
4 | "isSubpackage": false,
5 | "subpackageName": "",
6 | "subMetas": {}
7 | }
--------------------------------------------------------------------------------
/assets/res/prefabs/com-icon.prefab:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "__type__": "cc.Prefab",
4 | "_name": "",
5 | "_objFlags": 0,
6 | "_native": "",
7 | "data": {
8 | "__id__": 1
9 | },
10 | "optimizationPolicy": 0,
11 | "asyncLoadAssets": false,
12 | "readonly": false
13 | },
14 | {
15 | "__type__": "cc.Node",
16 | "_name": "com-icon",
17 | "_objFlags": 0,
18 | "_parent": null,
19 | "_children": [
20 | {
21 | "__id__": 2
22 | }
23 | ],
24 | "_active": true,
25 | "_components": [
26 | {
27 | "__id__": 5
28 | },
29 | {
30 | "__id__": 6
31 | }
32 | ],
33 | "_prefab": {
34 | "__id__": 7
35 | },
36 | "_opacity": 255,
37 | "_color": {
38 | "__type__": "cc.Color",
39 | "r": 255,
40 | "g": 255,
41 | "b": 255,
42 | "a": 255
43 | },
44 | "_contentSize": {
45 | "__type__": "cc.Size",
46 | "width": 195,
47 | "height": 270
48 | },
49 | "_anchorPoint": {
50 | "__type__": "cc.Vec2",
51 | "x": 0.5,
52 | "y": 0.5
53 | },
54 | "_trs": {
55 | "__type__": "TypedArray",
56 | "ctor": "Float64Array",
57 | "array": [
58 | 0,
59 | 0,
60 | 0,
61 | 0,
62 | 0,
63 | 0,
64 | 1,
65 | 1,
66 | 1,
67 | 1
68 | ]
69 | },
70 | "_eulerAngles": {
71 | "__type__": "cc.Vec3",
72 | "x": 0,
73 | "y": 0,
74 | "z": 0
75 | },
76 | "_skewX": 0,
77 | "_skewY": 0,
78 | "_is3DNode": false,
79 | "_groupIndex": 0,
80 | "groupIndex": 0,
81 | "_id": ""
82 | },
83 | {
84 | "__type__": "cc.Node",
85 | "_name": "label",
86 | "_objFlags": 0,
87 | "_parent": {
88 | "__id__": 1
89 | },
90 | "_children": [],
91 | "_active": true,
92 | "_components": [
93 | {
94 | "__id__": 3
95 | }
96 | ],
97 | "_prefab": {
98 | "__id__": 4
99 | },
100 | "_opacity": 255,
101 | "_color": {
102 | "__type__": "cc.Color",
103 | "r": 255,
104 | "g": 255,
105 | "b": 255,
106 | "a": 255
107 | },
108 | "_contentSize": {
109 | "__type__": "cc.Size",
110 | "width": 153.38,
111 | "height": 50.4
112 | },
113 | "_anchorPoint": {
114 | "__type__": "cc.Vec2",
115 | "x": 0.5,
116 | "y": 0.5
117 | },
118 | "_trs": {
119 | "__type__": "TypedArray",
120 | "ctor": "Float64Array",
121 | "array": [
122 | 0,
123 | -163.418,
124 | 0,
125 | 0,
126 | 0,
127 | 0,
128 | 1,
129 | 1,
130 | 1,
131 | 1
132 | ]
133 | },
134 | "_eulerAngles": {
135 | "__type__": "cc.Vec3",
136 | "x": 0,
137 | "y": 0,
138 | "z": 0
139 | },
140 | "_skewX": 0,
141 | "_skewY": 0,
142 | "_is3DNode": false,
143 | "_groupIndex": 0,
144 | "groupIndex": 0,
145 | "_id": ""
146 | },
147 | {
148 | "__type__": "cc.Label",
149 | "_name": "",
150 | "_objFlags": 0,
151 | "node": {
152 | "__id__": 2
153 | },
154 | "_enabled": true,
155 | "_materials": [
156 | {
157 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
158 | }
159 | ],
160 | "_useOriginalSize": false,
161 | "_string": "测试icon",
162 | "_N$string": "测试icon",
163 | "_fontSize": 40,
164 | "_lineHeight": 40,
165 | "_enableWrapText": true,
166 | "_N$file": null,
167 | "_isSystemFontUsed": true,
168 | "_spacingX": 0,
169 | "_batchAsBitmap": false,
170 | "_styleFlags": 0,
171 | "_underlineHeight": 0,
172 | "_N$horizontalAlign": 1,
173 | "_N$verticalAlign": 1,
174 | "_N$fontFamily": "Arial",
175 | "_N$overflow": 0,
176 | "_N$cacheMode": 0,
177 | "_id": ""
178 | },
179 | {
180 | "__type__": "cc.PrefabInfo",
181 | "root": {
182 | "__id__": 1
183 | },
184 | "asset": {
185 | "__uuid__": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c"
186 | },
187 | "fileId": "91vIgj4PBOfJTLg02XmmkM",
188 | "sync": false
189 | },
190 | {
191 | "__type__": "cc.Sprite",
192 | "_name": "",
193 | "_objFlags": 0,
194 | "node": {
195 | "__id__": 1
196 | },
197 | "_enabled": true,
198 | "_materials": [
199 | {
200 | "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
201 | }
202 | ],
203 | "_srcBlendFactor": 770,
204 | "_dstBlendFactor": 771,
205 | "_spriteFrame": {
206 | "__uuid__": "31bc895a-c003-4566-a9f3-2e54ae1c17dc"
207 | },
208 | "_type": 0,
209 | "_sizeMode": 1,
210 | "_fillType": 0,
211 | "_fillCenter": {
212 | "__type__": "cc.Vec2",
213 | "x": 0,
214 | "y": 0
215 | },
216 | "_fillStart": 0,
217 | "_fillRange": 0,
218 | "_isTrimmedMode": true,
219 | "_atlas": null,
220 | "_id": ""
221 | },
222 | {
223 | "__type__": "8d1edCLKcdCXbl3ncaxsEhP",
224 | "_name": "",
225 | "_objFlags": 0,
226 | "node": {
227 | "__id__": 1
228 | },
229 | "_enabled": true,
230 | "label": {
231 | "__id__": 3
232 | },
233 | "_id": ""
234 | },
235 | {
236 | "__type__": "cc.PrefabInfo",
237 | "root": {
238 | "__id__": 1
239 | },
240 | "asset": {
241 | "__uuid__": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c"
242 | },
243 | "fileId": "c4f30YOS65G64U2TwufdJ+2",
244 | "sync": false
245 | }
246 | ]
--------------------------------------------------------------------------------
/assets/res/prefabs/com-icon.prefab.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.2.6",
3 | "uuid": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c",
4 | "optimizationPolicy": "AUTO",
5 | "asyncLoadAssets": false,
6 | "readonly": false,
7 | "subMetas": {}
8 | }
--------------------------------------------------------------------------------
/assets/resources.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.0.1",
3 | "uuid": "51c42fee-fe28-43a5-ae72-5ebc49e28484",
4 | "isSubpackage": false,
5 | "subpackageName": "",
6 | "subMetas": {}
7 | }
--------------------------------------------------------------------------------
/assets/resources/login-layer.prefab:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "__type__": "cc.Prefab",
4 | "_name": "",
5 | "_objFlags": 0,
6 | "_native": "",
7 | "data": {
8 | "__id__": 1
9 | },
10 | "optimizationPolicy": 0,
11 | "asyncLoadAssets": false,
12 | "readonly": false
13 | },
14 | {
15 | "__type__": "cc.Node",
16 | "_name": "login-layer",
17 | "_objFlags": 0,
18 | "_parent": null,
19 | "_children": [
20 | {
21 | "__id__": 2
22 | },
23 | {
24 | "__id__": 5
25 | },
26 | {
27 | "__id__": 9
28 | },
29 | {
30 | "__id__": 13
31 | }
32 | ],
33 | "_active": true,
34 | "_components": [
35 | {
36 | "__id__": 17
37 | }
38 | ],
39 | "_prefab": {
40 | "__id__": 18
41 | },
42 | "_opacity": 255,
43 | "_color": {
44 | "__type__": "cc.Color",
45 | "r": 255,
46 | "g": 255,
47 | "b": 255,
48 | "a": 255
49 | },
50 | "_contentSize": {
51 | "__type__": "cc.Size",
52 | "width": 0,
53 | "height": 0
54 | },
55 | "_anchorPoint": {
56 | "__type__": "cc.Vec2",
57 | "x": 0.5,
58 | "y": 0.5
59 | },
60 | "_trs": {
61 | "__type__": "TypedArray",
62 | "ctor": "Float64Array",
63 | "array": [
64 | 0,
65 | 0,
66 | 0,
67 | 0,
68 | 0,
69 | 0,
70 | 1,
71 | 1,
72 | 1,
73 | 1
74 | ]
75 | },
76 | "_eulerAngles": {
77 | "__type__": "cc.Vec3",
78 | "x": 0,
79 | "y": 0,
80 | "z": 0
81 | },
82 | "_skewX": 0,
83 | "_skewY": 0,
84 | "_is3DNode": false,
85 | "_groupIndex": 0,
86 | "groupIndex": 0,
87 | "_id": ""
88 | },
89 | {
90 | "__type__": "cc.Node",
91 | "_name": "icon1",
92 | "_objFlags": 0,
93 | "_parent": {
94 | "__id__": 1
95 | },
96 | "_children": [],
97 | "_active": true,
98 | "_components": [
99 | {
100 | "__id__": 3
101 | }
102 | ],
103 | "_prefab": {
104 | "__id__": 4
105 | },
106 | "_opacity": 255,
107 | "_color": {
108 | "__type__": "cc.Color",
109 | "r": 255,
110 | "g": 255,
111 | "b": 255,
112 | "a": 255
113 | },
114 | "_contentSize": {
115 | "__type__": "cc.Size",
116 | "width": 195,
117 | "height": 270
118 | },
119 | "_anchorPoint": {
120 | "__type__": "cc.Vec2",
121 | "x": 0.5,
122 | "y": 0.5
123 | },
124 | "_trs": {
125 | "__type__": "TypedArray",
126 | "ctor": "Float64Array",
127 | "array": [
128 | -179.499,
129 | 0,
130 | 0,
131 | 0,
132 | 0,
133 | 0,
134 | 1,
135 | 1,
136 | 1,
137 | 1
138 | ]
139 | },
140 | "_eulerAngles": {
141 | "__type__": "cc.Vec3",
142 | "x": 0,
143 | "y": 0,
144 | "z": 0
145 | },
146 | "_skewX": 0,
147 | "_skewY": 0,
148 | "_is3DNode": false,
149 | "_groupIndex": 0,
150 | "groupIndex": 0,
151 | "_id": ""
152 | },
153 | {
154 | "__type__": "aa20eXMeoxKpZruP0nd6vIN",
155 | "_name": "",
156 | "_objFlags": 0,
157 | "node": {
158 | "__id__": 2
159 | },
160 | "_enabled": true,
161 | "_prefab": {
162 | "__uuid__": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c"
163 | },
164 | "_id": ""
165 | },
166 | {
167 | "__type__": "cc.PrefabInfo",
168 | "root": {
169 | "__id__": 1
170 | },
171 | "asset": {
172 | "__uuid__": "b49a7ebd-f26b-40d9-b271-234318c7e5bb"
173 | },
174 | "fileId": "071IlpzLNGqYpOhpZc9cvU",
175 | "sync": false
176 | },
177 | {
178 | "__type__": "cc.Node",
179 | "_name": "icon2",
180 | "_objFlags": 0,
181 | "_parent": {
182 | "__id__": 1
183 | },
184 | "_children": [],
185 | "_active": true,
186 | "_components": [
187 | {
188 | "__id__": 6
189 | },
190 | {
191 | "__id__": 7
192 | }
193 | ],
194 | "_prefab": {
195 | "__id__": 8
196 | },
197 | "_opacity": 255,
198 | "_color": {
199 | "__type__": "cc.Color",
200 | "r": 255,
201 | "g": 255,
202 | "b": 255,
203 | "a": 255
204 | },
205 | "_contentSize": {
206 | "__type__": "cc.Size",
207 | "width": 195,
208 | "height": 270
209 | },
210 | "_anchorPoint": {
211 | "__type__": "cc.Vec2",
212 | "x": 0.5,
213 | "y": 0.5
214 | },
215 | "_trs": {
216 | "__type__": "TypedArray",
217 | "ctor": "Float64Array",
218 | "array": [
219 | 286.345,
220 | 0,
221 | 0,
222 | 0,
223 | 0,
224 | 0,
225 | 1,
226 | 1,
227 | 1,
228 | 1
229 | ]
230 | },
231 | "_eulerAngles": {
232 | "__type__": "cc.Vec3",
233 | "x": 0,
234 | "y": 0,
235 | "z": 0
236 | },
237 | "_skewX": 0,
238 | "_skewY": 0,
239 | "_is3DNode": false,
240 | "_groupIndex": 0,
241 | "groupIndex": 0,
242 | "_id": ""
243 | },
244 | {
245 | "__type__": "aa20eXMeoxKpZruP0nd6vIN",
246 | "_name": "",
247 | "_objFlags": 0,
248 | "node": {
249 | "__id__": 5
250 | },
251 | "_enabled": true,
252 | "_prefab": {
253 | "__uuid__": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c"
254 | },
255 | "_id": ""
256 | },
257 | {
258 | "__type__": "21eeafvVl9MJ7aA3KIuphfR",
259 | "_name": "",
260 | "_objFlags": 0,
261 | "node": {
262 | "__id__": 5
263 | },
264 | "_enabled": true,
265 | "_spriteFrame": {
266 | "__uuid__": "c04eb37c-55b0-4feb-a171-98de48651c68"
267 | },
268 | "_id": ""
269 | },
270 | {
271 | "__type__": "cc.PrefabInfo",
272 | "root": {
273 | "__id__": 1
274 | },
275 | "asset": {
276 | "__uuid__": "b49a7ebd-f26b-40d9-b271-234318c7e5bb"
277 | },
278 | "fileId": "b5Op2e24JF9q64w8eE6mf5",
279 | "sync": false
280 | },
281 | {
282 | "__type__": "cc.Node",
283 | "_name": "icon3",
284 | "_objFlags": 0,
285 | "_parent": {
286 | "__id__": 1
287 | },
288 | "_children": [],
289 | "_active": true,
290 | "_components": [
291 | {
292 | "__id__": 10
293 | },
294 | {
295 | "__id__": 11
296 | }
297 | ],
298 | "_prefab": {
299 | "__id__": 12
300 | },
301 | "_opacity": 255,
302 | "_color": {
303 | "__type__": "cc.Color",
304 | "r": 255,
305 | "g": 255,
306 | "b": 255,
307 | "a": 255
308 | },
309 | "_contentSize": {
310 | "__type__": "cc.Size",
311 | "width": 195,
312 | "height": 270
313 | },
314 | "_anchorPoint": {
315 | "__type__": "cc.Vec2",
316 | "x": 0.5,
317 | "y": 0.5
318 | },
319 | "_trs": {
320 | "__type__": "TypedArray",
321 | "ctor": "Float64Array",
322 | "array": [
323 | -174.605,
324 | 332.816,
325 | 0,
326 | 0,
327 | 0,
328 | 0,
329 | 1,
330 | 1,
331 | 1,
332 | 1
333 | ]
334 | },
335 | "_eulerAngles": {
336 | "__type__": "cc.Vec3",
337 | "x": 0,
338 | "y": 0,
339 | "z": 0
340 | },
341 | "_skewX": 0,
342 | "_skewY": 0,
343 | "_is3DNode": false,
344 | "_groupIndex": 0,
345 | "groupIndex": 0,
346 | "_id": ""
347 | },
348 | {
349 | "__type__": "aa20eXMeoxKpZruP0nd6vIN",
350 | "_name": "",
351 | "_objFlags": 0,
352 | "node": {
353 | "__id__": 9
354 | },
355 | "_enabled": true,
356 | "_prefab": {
357 | "__uuid__": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c"
358 | },
359 | "_id": ""
360 | },
361 | {
362 | "__type__": "21eeafvVl9MJ7aA3KIuphfR",
363 | "_name": "",
364 | "_objFlags": 0,
365 | "node": {
366 | "__id__": 9
367 | },
368 | "_enabled": true,
369 | "_spriteFrame": {
370 | "__uuid__": "9899caea-032f-4d4c-a039-bcb07a20c44e"
371 | },
372 | "_id": ""
373 | },
374 | {
375 | "__type__": "cc.PrefabInfo",
376 | "root": {
377 | "__id__": 1
378 | },
379 | "asset": {
380 | "__uuid__": "b49a7ebd-f26b-40d9-b271-234318c7e5bb"
381 | },
382 | "fileId": "739Z4tt31HL7C/ypJ9vMO9",
383 | "sync": false
384 | },
385 | {
386 | "__type__": "cc.Node",
387 | "_name": "icon4",
388 | "_objFlags": 0,
389 | "_parent": {
390 | "__id__": 1
391 | },
392 | "_children": [],
393 | "_active": true,
394 | "_components": [
395 | {
396 | "__id__": 14
397 | },
398 | {
399 | "__id__": 15
400 | }
401 | ],
402 | "_prefab": {
403 | "__id__": 16
404 | },
405 | "_opacity": 255,
406 | "_color": {
407 | "__type__": "cc.Color",
408 | "r": 255,
409 | "g": 255,
410 | "b": 255,
411 | "a": 255
412 | },
413 | "_contentSize": {
414 | "__type__": "cc.Size",
415 | "width": 195,
416 | "height": 270
417 | },
418 | "_anchorPoint": {
419 | "__type__": "cc.Vec2",
420 | "x": 0.5,
421 | "y": 0.5
422 | },
423 | "_trs": {
424 | "__type__": "TypedArray",
425 | "ctor": "Float64Array",
426 | "array": [
427 | 286.345,
428 | 331.152,
429 | 0,
430 | 0,
431 | 0,
432 | 0,
433 | 1,
434 | 1,
435 | 1,
436 | 1
437 | ]
438 | },
439 | "_eulerAngles": {
440 | "__type__": "cc.Vec3",
441 | "x": 0,
442 | "y": 0,
443 | "z": 0
444 | },
445 | "_skewX": 0,
446 | "_skewY": 0,
447 | "_is3DNode": false,
448 | "_groupIndex": 0,
449 | "groupIndex": 0,
450 | "_id": ""
451 | },
452 | {
453 | "__type__": "aa20eXMeoxKpZruP0nd6vIN",
454 | "_name": "",
455 | "_objFlags": 0,
456 | "node": {
457 | "__id__": 13
458 | },
459 | "_enabled": true,
460 | "_prefab": {
461 | "__uuid__": "ce187ce4-5efe-49f7-8eb7-8381671bdb5c"
462 | },
463 | "_id": ""
464 | },
465 | {
466 | "__type__": "21eeafvVl9MJ7aA3KIuphfR",
467 | "_name": "",
468 | "_objFlags": 0,
469 | "node": {
470 | "__id__": 13
471 | },
472 | "_enabled": true,
473 | "_spriteFrame": {
474 | "__uuid__": "b121389b-e89c-4800-a6ca-99916708b535"
475 | },
476 | "_id": ""
477 | },
478 | {
479 | "__type__": "cc.PrefabInfo",
480 | "root": {
481 | "__id__": 1
482 | },
483 | "asset": {
484 | "__uuid__": "b49a7ebd-f26b-40d9-b271-234318c7e5bb"
485 | },
486 | "fileId": "0e5ZEBzi9AwL0rwE4TV3+5",
487 | "sync": false
488 | },
489 | {
490 | "__type__": "5428fgCAZ9KWYzLnUtDSNTV",
491 | "_name": "",
492 | "_objFlags": 0,
493 | "node": {
494 | "__id__": 1
495 | },
496 | "_enabled": true,
497 | "_icon1": {
498 | "__id__": 3
499 | },
500 | "_icon2": {
501 | "__id__": 6
502 | },
503 | "_id": ""
504 | },
505 | {
506 | "__type__": "cc.PrefabInfo",
507 | "root": {
508 | "__id__": 1
509 | },
510 | "asset": {
511 | "__uuid__": "b49a7ebd-f26b-40d9-b271-234318c7e5bb"
512 | },
513 | "fileId": "9falsE2KJEZIAorCJAIN6w",
514 | "sync": false
515 | }
516 | ]
--------------------------------------------------------------------------------
/assets/resources/login-layer.prefab.meta:
--------------------------------------------------------------------------------
1 | {
2 | "ver": "1.2.6",
3 | "uuid": "b49a7ebd-f26b-40d9-b271-234318c7e5bb",
4 | "optimizationPolicy": "AUTO",
5 | "asyncLoadAssets": false,
6 | "readonly": false,
7 | "subMetas": {}
8 | }
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "module": "commonjs",
5 | "experimentalDecorators": true
6 | },
7 | "exclude": [
8 | "node_modules",
9 | ".vscode",
10 | "library",
11 | "local",
12 | "settings",
13 | "temp"
14 | ]
15 | }
--------------------------------------------------------------------------------
/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "engine": "cocos2d-html5",
3 | "packages": "packages",
4 | "version": "2.3.1",
5 | "id": "264e650b-dcaa-4878-bc42-9641f7007097"
6 | }
--------------------------------------------------------------------------------
/readme/15858808566612.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/15858808566612.png
--------------------------------------------------------------------------------
/readme/15858809963833.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/15858809963833.png
--------------------------------------------------------------------------------
/readme/2020-4-2-12-24-15.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/2020-4-2-12-24-15.gif
--------------------------------------------------------------------------------
/readme/20200403184738.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/20200403184738.png
--------------------------------------------------------------------------------
/readme/20200403185043.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/20200403185043.png
--------------------------------------------------------------------------------
/readme/GIF-2020-4-3-11-24-59.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/GIF-2020-4-3-11-24-59.gif
--------------------------------------------------------------------------------
/readme/image-20200402142308217.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402142308217.png
--------------------------------------------------------------------------------
/readme/image-20200402150854377.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402150854377.png
--------------------------------------------------------------------------------
/readme/image-20200402162249956.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402162249956.png
--------------------------------------------------------------------------------
/readme/image-20200402164201469.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402164201469.png
--------------------------------------------------------------------------------
/readme/image-20200402164240106.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402164240106.png
--------------------------------------------------------------------------------
/readme/image-20200402164308923.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402164308923.png
--------------------------------------------------------------------------------
/readme/image-20200402164405217.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/readme/image-20200402164405217.png
--------------------------------------------------------------------------------
/settings/builder.json:
--------------------------------------------------------------------------------
1 | {
2 | "excludeScenes": [],
3 | "orientation": {
4 | "landscapeLeft": true,
5 | "landscapeRight": true,
6 | "portrait": false,
7 | "upsideDown": false
8 | },
9 | "packageName": "org.cocos2d.helloworld",
10 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
11 | "title": "hello_world",
12 | "webOrientation": "auto"
13 | }
--------------------------------------------------------------------------------
/settings/builder.panel.json:
--------------------------------------------------------------------------------
1 | {
2 | "excludeScenes": [],
3 | "packageName": "org.cocos2d.helloworld",
4 | "platform": "web-mobile",
5 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
6 | "title": "HelloWorld"
7 | }
--------------------------------------------------------------------------------
/settings/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "collision-matrix": [
3 | [
4 | true
5 | ]
6 | ],
7 | "excluded-modules": [
8 | "3D Physics/cannon.js",
9 | "3D Physics/Builtin",
10 | "3D Particle"
11 | ],
12 | "group-list": [
13 | "default"
14 | ],
15 | "start-scene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
16 | "design-resolution-width": 960,
17 | "design-resolution-height": 640,
18 | "fit-width": false,
19 | "fit-height": true,
20 | "use-project-simulator-setting": false,
21 | "simulator-orientation": false,
22 | "use-customize-simulator": false,
23 | "simulator-resolution": {
24 | "width": 960,
25 | "height": 640
26 | },
27 | "last-module-event-record-time": 0,
28 | "assets-sort-type": "name",
29 | "facebook": {
30 | "enable": false,
31 | "appID": "",
32 | "live": {
33 | "enable": false
34 | },
35 | "audience": {
36 | "enable": false
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/settings/services.json:
--------------------------------------------------------------------------------
1 | {
2 | "game": {
3 | "name": "未知游戏",
4 | "appid": "UNKNOW"
5 | }
6 | }
--------------------------------------------------------------------------------
/template-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Relvin/link-prefab/91a2f0365c5c0189cf445b6fc6010cd53819a3f4/template-banner.png
--------------------------------------------------------------------------------
/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "TEMPLATES.helloworld-ts.name",
3 | "desc": "TEMPLATES.helloworld-ts.desc",
4 | "banner": "template-banner.png"
5 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "lib": [ "dom", "es5", "es2015.promise" ],
5 | "target": "es5",
6 | "allowJs": true,
7 | "experimentalDecorators": true,
8 | "skipLibCheck": true
9 | },
10 | "exclude": [
11 | "node_modules",
12 | "library",
13 | "local",
14 | "temp",
15 | "build",
16 | "settings"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------