Commit a1dc2e8a authored by 章红平's avatar 章红平

‘提交信息’

parent f4038c1c
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
"_children": [ "_children": [
{ {
"__id__": 2 "__id__": 2
},
{
"__id__": 27
} }
], ],
"_active": false, "_active": false,
...@@ -884,7 +887,7 @@ ...@@ -884,7 +887,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 0,
"height": 0 "height": 50.4
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -928,7 +931,11 @@ ...@@ -928,7 +931,11 @@
"__id__": 16 "__id__": 16
}, },
"_enabled": true, "_enabled": true,
"_materials": [], "_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "", "_string": "",
...@@ -1083,7 +1090,11 @@ ...@@ -1083,7 +1090,11 @@
"__id__": 19 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"_materials": [], "_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
...@@ -1298,6 +1309,117 @@ ...@@ -1298,6 +1309,117 @@
"__id__": 2 "__id__": 2
}, },
"_enabled": true, "_enabled": true,
"candleN": null,
"_id": "eaTVUpqahPfZeO9+sUI7RP" "_id": "eaTVUpqahPfZeO9+sUI7RP"
},
{
"__type__": "cc.Node",
"_name": "middleLayer",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 28
},
{
"__id__": 29
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
640,
360,
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": "e4dKV4CyhEaKp0ChMGFMHk"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "14Nq2izkRFg7UlFZ1hULpO"
},
{
"__type__": "bfa28dfIqtJGZ2a6CpvLNsg",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"label": null,
"text": "hello",
"_id": "758k66wFpKB6uEtO+DFQ01"
} }
] ]
\ No newline at end of file
...@@ -5,7 +5,9 @@ const { ccclass, property } = cc._decorator; ...@@ -5,7 +5,9 @@ const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class SceneComponent extends MyCocosSceneComponent { export default class SceneComponent extends MyCocosSceneComponent {
// property()
@property(cc.Prefab)
candleN: cc.Prefab=null
addPreloadImage() { addPreloadImage() {
// TODO 根据自己的配置预加载图片资源 // TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url }); this._imageResList.push({ url: this.data.pic_url });
...@@ -27,12 +29,21 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -27,12 +29,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initView(); this.initView();
this.initListener(); this.initListener();
} }
start(){
super.start();
// this.playBones(this.candleN,"newAnimation")
}
_cantouch = null; _cantouch = null;
initData() { initData() {
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this._cantouch = true; this._cantouch = true;
} }
// playBones(node, name) {
// let skeletonAnimation = node.getComponent(cc.Dr);
// skeletonAnimation.play(name);
// }
initView() { initView() {
this.initBg(); this.initBg();
......
...@@ -52,6 +52,8 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -52,6 +52,8 @@ export class MyCocosSceneComponent extends cc.Component {
// 生命周期 start // 生命周期 start
start() { start() {
console.log("(<any>window).courseware===",(<any>window).courseware)
this.log("(<any>window).courseware==="+JSON.stringify({courseware:(<any>window).courseware}))
if (window && (<any>window).courseware && (<any>window).courseware.getData) { if (window && (<any>window).courseware && (<any>window).courseware.getData) {
(<any>window).courseware.getData((data) => { (<any>window).courseware.getData((data) => {
this.log('data:' + data); this.log('data:' + data);
...@@ -117,22 +119,6 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -117,22 +119,6 @@ export class MyCocosSceneComponent extends cc.Component {
onLoadEnd() { onLoadEnd() {
} }
// ------------------------------------------------ // ------------------------------------------------
getSprNode(resName) { getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame; const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
......
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
}
log(str){
this.node.getComponent(cc.Label).string=str;
if(!this.node.active){
this.node.active=true;
setTimeout(()=>{
this.node.active=false
},5000)
}
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "bfa2875f-22ab-4919-9d9a-e82a6f2cdb20",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
"excludeScenes": [], "excludeScenes": [],
"includeSDKBox": false, "includeSDKBox": false,
"orientation": { "orientation": {
"landscapeLeft": true, "landscapeLeft": false,
"landscapeRight": true, "landscapeRight": false,
"portrait": false, "portrait": false,
"upsideDown": false "upsideDown": true
}, },
"webOrientation": "auto", "webOrientation": "auto",
"inlineSpriteFrames": false, "inlineSpriteFrames": false,
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
}, },
"ios": { "ios": {
"REMOTE_SERVER_ROOT": "", "REMOTE_SERVER_ROOT": "",
"packageName": "org.cocos2d.demo" "packageName": "org.cocos2d.demo",
"ios_enable_jit": true
}, },
"mac": { "mac": {
"REMOTE_SERVER_ROOT": "", "REMOTE_SERVER_ROOT": "",
...@@ -50,5 +51,6 @@ ...@@ -50,5 +51,6 @@
"scheme": "https", "scheme": "https",
"skipRecord": false "skipRecord": false
}, },
"appBundle": false "appBundle": false,
"agreements": {}
} }
...@@ -2,5 +2,39 @@ ...@@ -2,5 +2,39 @@
"last-module-event-record-time": 1600677246969, "last-module-event-record-time": 1600677246969,
"migrate-history": [ "migrate-history": [
"cloud-function" "cloud-function"
] ],
"group-list": [
"default"
],
"collision-matrix": [
[
true
]
],
"excluded-modules": [
"3D Physics/Builtin"
],
"preview-port": 7456,
"design-resolution-width": 1280,
"design-resolution-height": 720,
"fit-width": true,
"fit-height": true,
"use-project-simulator-setting": false,
"simulator-orientation": false,
"use-customize-simulator": true,
"simulator-resolution": {
"width": 960,
"height": 640
},
"clear-simulator-cache": true,
"facebook": {
"enable": false,
"appID": "",
"live": {
"enable": false
},
"audience": {
"enable": false
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment