Commit 9455655e authored by haiyoucuv's avatar haiyoucuv

init

parent 6e7c485e
......@@ -149,7 +149,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 582,
"height": 619
"height": 639
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -185,7 +185,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "8e597a70-2fbd-4636-a100-6d33455e3ea2@f9941",
"__uuid__": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
......@@ -226,7 +226,7 @@
"_target": null,
"_left": 84,
"_right": 0,
"_top": 333.05899999999997,
"_top": 323.05899999999997,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
......@@ -397,7 +397,7 @@
},
{
"__type__": "cc.Node",
"_name": "关卡数",
"_name": "img",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
......@@ -418,8 +418,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -103,
"y": 173.692,
"x": 0,
"y": 220.201,
"z": 0
},
"_lrot": {
......@@ -459,8 +459,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 117.34765625,
"height": 55.44
"width": 190,
"height": 190
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -471,10 +471,10 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0e26F713xPip623d40GtBV"
"fileId": "1dhnVasHJFC7XTcyoytXmk"
},
{
"__type__": "cc.Label",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
......@@ -491,55 +491,29 @@
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 254,
"b": 254,
"a": 255
},
"_string": "第X关",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 44,
"_fontSize": 44,
"_fontFamily": "Arial",
"_lineHeight": 44,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"g": 255,
"b": 255,
"a": 255
},
"_shadowOffset": {
"_spriteFrame": null,
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
"x": 0,
"y": 0
},
"_shadowBlur": 2,
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4eew+Ac8VO/YK/dyF44P1A"
"fileId": "91A0WvzedEM6q8GMrevN8V"
},
{
"__type__": "cc.PrefabInfo",
......@@ -549,14 +523,14 @@
"asset": {
"__id__": 0
},
"fileId": "80ex1xrgtL8ZbCZnoRKDJ5",
"fileId": "3ewnyGH65EC689t8fQJ3ih",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "宝箱数",
"_name": "prizeName",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
......@@ -577,8 +551,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 99.006,
"y": 114.118,
"x": 0,
"y": 79.47,
"z": 0
},
"_lrot": {
......@@ -618,8 +592,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 118.6875,
"height": 30.240000000000002
"width": 120,
"height": 37.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -649,18 +623,18 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 254,
"b": 254,
"r": 18,
"g": 18,
"b": 18,
"a": 255
},
"_string": "挑战宝箱*1",
"_string": "奖品名称",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 24,
"_fontSize": 24,
"_actualFontSize": 30,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 24,
"_lineHeight": 30,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
......@@ -743,7 +717,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -19.974000000000046,
"y": -0.5960000000000036,
"z": 0
},
"_lrot": {
......@@ -783,7 +757,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 294,
"width": 334,
"height": 77
},
"_anchorPoint": {
......@@ -820,7 +794,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "7baf6c34-b3fb-4720-8811-45727ded4756@f9941",
"__uuid__": "1a458cf9-e493-428f-abb7-67a56325d240@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
......@@ -859,9 +833,9 @@
},
"_alignFlags": 9,
"_target": null,
"_left": 228,
"_left": 208,
"_right": 0,
"_top": 793.474,
"_top": 774.096,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
......@@ -982,7 +956,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -176.55500000000006,
"y": -223.856,
"z": 0
},
"_lrot": {
......@@ -1156,7 +1130,7 @@
"_target": null,
"_left": 335,
"_right": 342,
"_top": 948.5550000000001,
"_top": 995.856,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
......@@ -1254,7 +1228,7 @@
"fileId": "cd+4wPXj1HvLk30seu5z2Q"
},
{
"__type__": "8be1dVlPRJMFqas5QkplOYr",
"__type__": "910a0DejmREFojbM4rsCcb/",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
......@@ -1271,17 +1245,17 @@
"closeBtn": {
"__id__": 38
},
"levelNum": {
"img": {
"__id__": 19
},
"boxNum": {
"prizeName": {
"__id__": 25
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7fWjnSKIBJtKnGEFVQwxN6"
"fileId": "92T/ULB0VKd6GJ5kEk4q/l"
},
{
"__type__": "cc.PrefabInfo",
......
......@@ -1257,7 +1257,6 @@
"__type__": "8be1dVlPRJMFqas5QkplOYr",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
......@@ -1277,7 +1276,7 @@
"boxNum": {
"__id__": 25
},
"_id": ""
"_id": "2213TqL7JHcqukh7O3UB2N"
},
{
"__type__": "cc.CompPrefabInfo",
......
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "8e597a70-2fbd-4636-a100-6d33455e3ea2",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "8e597a70-2fbd-4636-a100-6d33455e3ea2@6c48a",
"displayName": "overBg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "8e597a70-2fbd-4636-a100-6d33455e3ea2",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "8e597a70-2fbd-4636-a100-6d33455e3ea2@f9941",
"displayName": "overBg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 582,
"height": 619,
"rawWidth": 582,
"rawHeight": 619,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-291,
-309.5,
0,
291,
-309.5,
0,
-291,
309.5,
0,
291,
309.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
619,
582,
619,
0,
0,
582,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-291,
-309.5,
0
],
"maxPos": [
291,
309.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "8e597a70-2fbd-4636-a100-6d33455e3ea2@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "8e597a70-2fbd-4636-a100-6d33455e3ea2@6c48a"
}
}
......@@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "8e597a70-2fbd-4636-a100-6d33455e3ea2",
"uuid": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5",
"files": [
".json",
".png"
......@@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "8e597a70-2fbd-4636-a100-6d33455e3ea2@6c48a",
"uuid": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5@6c48a",
"displayName": "prizeBg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "8e597a70-2fbd-4636-a100-6d33455e3ea2",
"imageUuidOrDatabaseUri": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5",
"isUuid": true,
"visible": false,
"minfilter": "linear",
......@@ -34,7 +34,7 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "8e597a70-2fbd-4636-a100-6d33455e3ea2@f9941",
"uuid": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5@f9941",
"displayName": "prizeBg",
"id": "f9941",
"name": "spriteFrame",
......@@ -46,9 +46,9 @@
"trimX": 0,
"trimY": 0,
"width": 582,
"height": 619,
"height": 639,
"rawWidth": 582,
"rawHeight": 619,
"rawHeight": 639,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......@@ -61,16 +61,16 @@
"vertices": {
"rawPosition": [
-291,
-309.5,
-319.5,
0,
291,
-309.5,
-319.5,
0,
-291,
309.5,
319.5,
0,
291,
309.5,
319.5,
0
],
"indexes": [
......@@ -83,9 +83,9 @@
],
"uv": [
0,
619,
639,
582,
619,
639,
0,
0,
582,
......@@ -103,17 +103,17 @@
],
"minPos": [
-291,
-309.5,
-319.5,
0
],
"maxPos": [
291,
309.5,
319.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "8e597a70-2fbd-4636-a100-6d33455e3ea2@6c48a",
"imageUuidOrDatabaseUri": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
......@@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "8e597a70-2fbd-4636-a100-6d33455e3ea2@6c48a"
"redirect": "cf0c68f6-a6cb-40a5-be77-3ef787119cc5@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "1a458cf9-e493-428f-abb7-67a56325d240",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "1a458cf9-e493-428f-abb7-67a56325d240@6c48a",
"displayName": "开心收下",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "1a458cf9-e493-428f-abb7-67a56325d240",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "1a458cf9-e493-428f-abb7-67a56325d240@f9941",
"displayName": "开心收下",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 334,
"height": 77,
"rawWidth": 334,
"rawHeight": 77,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-167,
-38.5,
0,
167,
-38.5,
0,
-167,
38.5,
0,
167,
38.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
77,
334,
77,
0,
0,
334,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-167,
-38.5,
0
],
"maxPos": [
167,
38.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "1a458cf9-e493-428f-abb7-67a56325d240@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "1a458cf9-e493-428f-abb7-67a56325d240@6c48a"
}
}
This diff is collapsed.
import { _decorator, Node } from 'cc';
import Panel from "db://assets/core/Module/Panel";
import Svga from "db://assets/core/Component/Svga/Svga";
import { showPanel } from "db://assets/core/Module/UIFast";
import { PrizePanel } from "db://assets/Scripts/Panels/PrizePanel";
const { ccclass, property } = _decorator;
......@@ -23,7 +25,8 @@ export class BoxPanel extends Panel {
}
onEndFrame = () => {
console.log(this.data);
this.hidePanel();
showPanel(PrizePanel, this.data);
}
......
import { _decorator, Button, Label, Node, Sprite, SpriteFrame } from 'cc';
import { AudioClipName, AudioMgr } from "db://assets/core/base/AudioMgr";
import Panel from "db://assets/core/Module/Panel";
const { ccclass, property } = _decorator;
@ccclass('PrizePanel')
export class PrizePanel extends Panel {
static skin: string = "PrizePanel";
static bundle: string = "GamePanel";
@property(Node) okBtn: Node = null;
@property(Node) closeBtn: Node = null;
@property(Sprite) img: Sprite = null;
@property(Label) prizeName: Label = null;
onLoad() {
super.onLoad();
this.okBtn.on(Button.EventType.CLICK, this.ok, this);
this.closeBtn.on(Button.EventType.CLICK, this.cancel, this);
}
start(): void {
const { optionImg, optionName } = this.data;
this.img.spriteFrame = optionImg;
this.prizeName.string = optionName;
}
cancel = () => {
AudioMgr.ins.playOneShot(AudioClipName.button_ok);
this.hidePanel();
}
ok = () => {
AudioMgr.ins.playOneShot(AudioClipName.button_ok);
this.hidePanel();
}
}
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"910a00de-8e64-4416-88db-338aec09c6ff","files":[],"subMetas":{},"userData":{}}
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