Commit e678008c authored by Tt's avatar Tt

增加公共

parent 6f5d0c1b
{
"ver": "2.0.1",
"uuid": "41cf6b2a-37f4-4db4-95b7-775f2e3b6bfe",
"downloadMode": 0,
"duration": 1.724082,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "9f494553-5017-4755-8d95-88706c49994e",
"downloadMode": 0,
"duration": 2.008,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "cc517da1-6614-4a00-9eb7-ca417f3bef03",
"downloadMode": 0,
"duration": 2.194286,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "cec10922-bbb2-4d17-b77f-bb820c5a9a04",
"downloadMode": 0,
"duration": 1.955125,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.2.9",
"uuid": "4e3ba6ba-17d6-4285-beb3-d5f8c90cc1f1",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "layout_start",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 7
}
],
"_active": false,
"_components": [
{
"__id__": 10
}
],
"_prefab": {
"__id__": 11
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_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": ""
},
{
"__type__": "cc.Node",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 4
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 6
},
"_opacity": 110,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1920,
"_originalHeight": 1080,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "88iu8QvK5GfqhrCOwz7voJ",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "start_ske",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": {
"__id__": 9
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 230.1,
"height": 184.5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1300,
-413.848,
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": ""
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "",
"_animationName": "",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "0d00069a-964d-44d5-b69a-f9a27fd672f6#29f6e472-b4ff-4576-870f-eac44e2f5415",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": null,
"_N$dragonAtlasAsset": null,
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cbZ9rrrOxESYcgiJ5tA0QB",
"sync": false
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1920,
"_originalHeight": 1080,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "424614db-81ce-4c87-bc56-e9bb460b2aaa",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.2.9",
"uuid": "95e7414b-cea3-4467-bc48-5fd920880222",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.1.2",
"uuid": "ca27127c-8eb0-4c66-9972-9efafbe199c0",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "layout_mouse",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 13
}
],
"_prefab": {
"__id__": 14
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 1,
"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": ""
},
{
"__type__": "cc.Node",
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 6
},
{
"__id__": 9
}
],
"_active": false,
"_components": [],
"_prefab": {
"__id__": 12
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_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": ""
},
{
"__type__": "cc.Node",
"_name": "star_bg",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 59,
"height": 42
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f23cc89-5bc8-4607-ba7c-31e6375fd58c"
},
"fileId": "1a6bNni9hAzZuAOicd4es+",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
}
],
"_prefab": {
"__id__": 8
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 59,
"height": 42
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f23cc89-5bc8-4607-ba7c-31e6375fd58c"
},
"fileId": "0dcJdIc9BNfbQiPTRx9GVW",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "icon_bigstar",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
}
],
"_prefab": {
"__id__": 11
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 59,
"height": 42
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f23cc89-5bc8-4607-ba7c-31e6375fd58c"
},
"fileId": "e8QBmuw8VOBYptnR5JD386",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f23cc89-5bc8-4607-ba7c-31e6375fd58c"
},
"fileId": "9eIg5jomZOV5E+Yzh+2uPU",
"sync": false
},
{
"__type__": "e9eaeH4ZsVKx4dSvhRwGuVF",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"bigStarClip": {
"__uuid__": "62d3066d-8591-4ba3-bbe6-93ae24f22efc"
},
"starCountClip": {
"__uuid__": "62d3066d-8591-4ba3-bbe6-93ae24f22efc"
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1f23cc89-5bc8-4607-ba7c-31e6375fd58c"
},
"fileId": "",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "1f23cc89-5bc8-4607-ba7c-31e6375fd58c",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
// 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
import pg from "../pg";
// import Game from "../../scene/Game";
const { ccclass, property } = cc._decorator;
@ccclass
export default class Ngt_star_05 extends cc.Component {
// LIFE-CYCLE CALLBACKS:
onLoad() {
pg.event.on("mouse_05_num", (max: number) => {
this.initStar(max);
});
pg.event.on("mouse_05_add", (curGroupIndex) => {
this.showBigStar(curGroupIndex);
});
pg.event.on("mouse_05_add_error", (curGroupIndex) => {
this.showErrorStar(curGroupIndex);
});
}
init(max) {
}
reviceMouse() {
}
start() {
}
//-----------------------STAR-----------------------------
bigStarArr: cc.Node[];
canvas: cc.Node;
curGroupIndex: number
@property(cc.Vec2)
position: cc.Vec2;
@property(cc.AudioClip)
bigStarClip: cc.AudioClip;
@property(cc.AudioClip)
starCountClip: cc.AudioClip;
//搭配res中的star_bg star等使用
initStar(max) {
this.curGroupIndex = 0;
this.canvas = cc.find('Canvas');
const gArr = [];
gArr.length = max;
if (gArr.length < 1) {
return;
}
this.cleanStar();
this.bigStarArr = [];
let baseX = this.position.x;
let baseY = this.position.y;
let disW = 80;// * this._mapScaleMin
// let disH = 80 * this._mapScaleMin;
let disScale = 1;
if (gArr.length > 5) {
// disH = (400 / gArr.length) * this._mapScaleMin;
// disScale = 5 / gArr.length;
}
for (let i = 0; i < gArr.length; i++) {
const starBg = this.getSprNode('star_bg');
this.canvas.addChild(starBg, 10);
// starBg.x = baseX;
// starBg.y = baseY - i * disH;
starBg.x = baseX - i * disW;
starBg.y = baseY
starBg.scale = disScale;
const starTop = this.getSprNode('star');
starBg.addChild(starTop);
starTop.active = false;
starBg.star = starTop;
const starBig = this.getSprNode('icon_bigstar');
starTop.addChild(starBig);
starBig.angle = -90;
starBg.starBig = starBig;
const star_wrong = this.getSprNode('star_wrong');
starTop.addChild(star_wrong);
star_wrong.active = false;
starBg.star_wrong = star_wrong;
this.bigStarArr.push(starBg);
}
this.bigStarArr = this.bigStarArr.reverse();
console.log("bigStarArr: ", this.bigStarArr);
}
cleanStar() {
if (this.bigStarArr && this.bigStarArr.length > 0) {
for (let i = 0; i < this.bigStarArr.length; i++) {
this.bigStarArr[i].removeFromParent();
}
}
}
private showErrorStar(curGroupIndex) {
if (!this.bigStarArr || this.bigStarArr.length <= 0) {
// this.checkGameEnd();
return;
}
const bigStarBg = this.bigStarArr[curGroupIndex]//[this.curGroupIndex++];
if (!bigStarBg) return;
const star_wrong = bigStarBg.star_wrong;
star_wrong.active = true;
const starBig = bigStarBg.starBig;
// starBig.scale = 1;
starBig.active = false;
const star = bigStarBg.star;
star.active = true;
const canvas = cc.find('Canvas');
const startPos = this.exchangeNodePos(star.parent, canvas);
const middlePos = this.exchangeNodePos(star.parent, canvas);
star.x = 0;
star.y = 0;
star.scale = 1 / bigStarBg.scale;
pg.event.emit("mouse_05_num_game_end")
}
showBigStar(curGroupIndex) {
if (!this.bigStarArr || this.bigStarArr.length <= 0) {
return;
}
const bigStarBg = this.bigStarArr[curGroupIndex]//[this.curGroupIndex++];
if (!bigStarBg) return;
const starBig = bigStarBg.starBig;
starBig.scale = 1;
const star = bigStarBg.star;
star.active = true;
const star_wrong = bigStarBg.star_wrong;
star_wrong.active = false;
star.scaleX = 0.7 / bigStarBg.scale;
star.scaleY = 1 / bigStarBg.scale;
star.angle = 90;
const canvas = cc.find('Canvas');
const startPos = this.exchangeNodePos(star.parent, canvas);
const middlePos = this.exchangeNodePos(star.parent, canvas);
star.x = startPos.x;
star.y = startPos.y - starBig.height;
console.log('middlePos = ' + JSON.stringify(middlePos));
const time = 1;
cc.tween(star)
.to(0.3, { y: middlePos.y + 80 }, { easing: 'quadOut' })
.to(0.1, { y: middlePos.y + 40, scaleX: 1.2 / bigStarBg.scale, scaleY: 0.8 / bigStarBg.scale }, { easing: 'quadOut' })
.to(0.1, { y: middlePos.y, scaleX: 1 / bigStarBg.scale, scaleY: 1 / bigStarBg.scale }, { easing: 'quadOut' })
.delay(0.1)
.to(0.8, { angle: -720, scale: 1 })
.start();
cc.tween(star)
.delay(0.6)
.to(0.8, { x: 0 }, { easing: 'quadIn' })
.start();
cc.tween(star)
.delay(0.6)
.to(0.8, { y: 0 }, { easing: 'quadOut' })
.start();
cc.tween(starBig)
.delay(0.6)
.to(0.8, { scale: 0 }, { easing: 'quadOut' })
.call(() => {
pg.event.emit("mouse_05_num_game_end")
// this.playAudio(this.starCountClip);
})
.start();
this.playAudio(this.bigStarClip);
}
//-----------------------STAR-----------------------------
getSprNode(resName) {
const sf = pg.view.find(this, `img/${resName}`).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
}
exchangeNodePos(baseNode, targetNode) {
return baseNode.convertToNodeSpaceAR(targetNode._parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y)));
}
playAudio(audioClip, cb = null) {
if (audioClip) {
const audioId = cc.audioEngine.playEffect(audioClip, false);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
}
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "e6163a4c-78da-4774-8635-8d535639eed9",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "dcfc4caa-0af3-4916-9c08-74a425f69e92",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a0c757ac-f2e5-4f4f-84d6-08b020b54902",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 94,
"platformSettings": {},
"subMetas": {
"bg_top": {
"ver": "1.0.4",
"uuid": "9c472431-ce84-416d-9902-dfaf1889c340",
"rawTextureUuid": "a0c757ac-f2e5-4f4f-84d6-08b020b54902",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 94,
"rawWidth": 1920,
"rawHeight": 94,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "99723c15-5e1a-4fa2-8dff-4f3ae4be5e57",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 453,
"height": 92,
"platformSettings": {},
"subMetas": {
"btn_again": {
"ver": "1.0.4",
"uuid": "43b81182-272b-451e-b4c3-9718ea02a000",
"rawTextureUuid": "99723c15-5e1a-4fa2-8dff-4f3ae4be5e57",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 453,
"height": 92,
"rawWidth": 453,
"rawHeight": 92,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2e15025d-6f7c-43de-af09-eb4a8df5d984",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 453,
"height": 92,
"platformSettings": {},
"subMetas": {
"btn_next": {
"ver": "1.0.4",
"uuid": "3258fbbd-ca93-4807-8ad7-2f3c7b8953e2",
"rawTextureUuid": "2e15025d-6f7c-43de-af09-eb4a8df5d984",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 453,
"height": 92,
"rawWidth": 453,
"rawHeight": 92,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "ea1a7280-d8e3-471f-821f-0ca975b2b6ad",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 54,
"height": 66,
"platformSettings": {},
"subMetas": {
"icon_right": {
"ver": "1.0.4",
"uuid": "624297d6-9db0-4a93-b6a8-b927e4027e43",
"rawTextureUuid": "ea1a7280-d8e3-471f-821f-0ca975b2b6ad",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 54,
"height": 66,
"rawWidth": 54,
"rawHeight": 66,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f83b1f88-e807-44c8-9e94-be0c856e9d60",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 150,
"height": 150,
"platformSettings": {},
"subMetas": {
"icon_right2": {
"ver": "1.0.4",
"uuid": "0c661590-c947-41bc-bc1e-985049e9ae21",
"rawTextureUuid": "f83b1f88-e807-44c8-9e94-be0c856e9d60",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 13,
"trimY": 0,
"width": 124,
"height": 150,
"rawWidth": 150,
"rawHeight": 150,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "aeebfa6c-8933-4d9a-a4a3-5024e00158c6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 54,
"height": 66,
"platformSettings": {},
"subMetas": {
"icon_undone": {
"ver": "1.0.4",
"uuid": "79419fa0-2d62-43d7-9a8b-6405540db4c0",
"rawTextureUuid": "aeebfa6c-8933-4d9a-a4a3-5024e00158c6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 54,
"height": 66,
"rawWidth": 54,
"rawHeight": 66,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2bf3d1f2-96a5-4ef6-b8cc-05d47e85cac6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 54,
"height": 66,
"platformSettings": {},
"subMetas": {
"icon_wrong": {
"ver": "1.0.4",
"uuid": "f0e35d2f-91e3-46ed-b708-cf643620fd8c",
"rawTextureUuid": "2bf3d1f2-96a5-4ef6-b8cc-05d47e85cac6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 54,
"height": 66,
"rawWidth": 54,
"rawHeight": 66,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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