Commit 2cc736a6 authored by 李维's avatar 李维

更新UI素材

parent c2689cb9
import { asyncCallNetworkApiGet, buttonOnClick, asyncGetSpriteFrimeByUrl, jumpToCourseWare } from "../script/util"; import { asyncCallNetworkApiGet, buttonOnClick, asyncGetSpriteFrimeByUrl, jumpToCourseWare } from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent"; import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
import { asyncDelay } from "../script/util";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
...@@ -20,6 +21,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -20,6 +21,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initBg(); this.initBg();
await this.initView(); await this.initView();
this.initListener(); this.initListener();
this.randomPop();
} }
rows: any; rows: any;
...@@ -129,7 +131,53 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -129,7 +131,53 @@ export default class SceneComponent extends MyCocosSceneComponent {
syllabusId, syllabusId,
}); });
jumpToCourseWare(syllabusId); jumpToCourseWare(syllabusId);
}, 0.8); }, item.scale);
} }
} }
async randomPop() {
const popTemplate = cc.find('Canvas/random_pop');
const newPop = cc.instantiate(popTemplate);
const time1 = Math.ceil(Math.random() * 5) / 5 + 10;
const x = Math.ceil(Math.random() * this.node.width) - this.node.width / 2;
const y = this.node.height / 2 + newPop.height / 2;
newPop.setPosition(x, -y);
newPop.scale = this.getRandomNum(0.4, 1);
newPop.opacity = this.getRandomNum(80, 200);
newPop.active = true;
newPop.parent = this.node;
cc.tween(newPop)
.to(time1, {y: y})
.call(() => {
newPop.removeFromParent();
newPop.destroy();
})
.start()
const time2 = this.getRandomNum(3, 5);
const moveLength = this.getRandomNum(10, 50);
cc.tween(newPop)
.by(time2, {x: -moveLength}, {easing:"sineInOut"})
.by(time2, {x: moveLength}, {easing:"sineInOut"})
.union()
.repeatForever()
.start();
await asyncDelay(1.2)
if (this.isDestroy) {
return;
}
this.randomPop();
}
getRandomNum(startNum, endNum) {
return startNum + Math.random() * (endNum - startNum);
}
isDestroy: boolean = false;
protected onDestroy(): void {
this.isDestroy = true;
}
} }
{
"ver": "2.3.5",
"uuid": "74d8d95b-6e03-4e8a-81f7-e1c1a2336aa0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 393,
"height": 230,
"platformSettings": {},
"subMetas": {
"5": {
"ver": "1.0.4",
"uuid": "5eaf2c52-fbf9-4d7d-adda-c55e9b4074d4",
"rawTextureUuid": "74d8d95b-6e03-4e8a-81f7-e1c1a2336aa0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 393,
"height": 230,
"rawWidth": 393,
"rawHeight": 230,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a8d894bf-d51f-4e30-b9e8-9cf73662193d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 540,
"height": 363,
"platformSettings": {},
"subMetas": {
"bg_green": {
"ver": "1.0.4",
"uuid": "faf088d6-7b1a-40a3-83bc-501feaf61ff5",
"rawTextureUuid": "a8d894bf-d51f-4e30-b9e8-9cf73662193d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 3.5,
"offsetY": 0,
"trimX": 8,
"trimY": 2,
"width": 531,
"height": 359,
"rawWidth": 540,
"rawHeight": 363,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1dc30007-cf34-4039-b81a-9b056022529e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 531,
"height": 359,
"platformSettings": {},
"subMetas": {
"bg_orange": {
"ver": "1.0.4",
"uuid": "cb43cee0-5b54-422c-92d6-0fe47ac15e15",
"rawTextureUuid": "1dc30007-cf34-4039-b81a-9b056022529e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 531,
"height": 359,
"rawWidth": 531,
"rawHeight": 359,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dd3af66f-c3d1-44eb-afe2-eb7c0d927c3c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 540,
"height": 363,
"platformSettings": {},
"subMetas": {
"bg_purple": {
"ver": "1.0.4",
"uuid": "92d09411-e25b-406a-b74c-2a26b665132f",
"rawTextureUuid": "dd3af66f-c3d1-44eb-afe2-eb7c0d927c3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 3.5,
"offsetY": 0,
"trimX": 8,
"trimY": 2,
"width": 531,
"height": 359,
"rawWidth": 540,
"rawHeight": 363,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "46c926c6-1dc0-434c-90e6-21e8eab00cd8", "uuid": "8a0b0714-fae9-4473-b648-fb3d7db50fb4",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 393, "width": 531,
"height": 230, "height": 359,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"1": { "bg_red": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "6ccc875e-9e0e-4fbc-9b25-a3d9b561d68a", "uuid": "732891ea-a67d-4028-a94e-cdfe20a5c3d8",
"rawTextureUuid": "46c926c6-1dc0-434c-90e6-21e8eab00cd8", "rawTextureUuid": "8a0b0714-fae9-4473-b648-fb3d7db50fb4",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 393, "width": 531,
"height": 230, "height": 359,
"rawWidth": 393, "rawWidth": 531,
"rawHeight": 230, "rawHeight": 359,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "03f6dc99-1324-4023-8701-776e3bb70ce4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 531,
"height": 359,
"platformSettings": {},
"subMetas": {
"bg_yellow": {
"ver": "1.0.4",
"uuid": "eaff5eda-b71e-4cf2-878f-44eed5968507",
"rawTextureUuid": "03f6dc99-1324-4023-8701-776e3bb70ce4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 531,
"height": 359,
"rawWidth": 531,
"rawHeight": 359,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "d087578b-c9d3-477f-8573-632a8f6a65bd",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "37ecd3c9-237a-4873-9177-43e3149b54df", "uuid": "7c666861-291d-4204-a75b-8ce1babf4b75",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1280, "width": 1280,
"height": 720, "height": 720,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"L1": { "bg_bg": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "e4a49f28-07a0-4376-b51c-bae3bbc8ef2f", "uuid": "25f587f0-abe3-4f3d-a2e4-c7963865a45c",
"rawTextureUuid": "37ecd3c9-237a-4873-9177-43e3149b54df", "rawTextureUuid": "7c666861-291d-4204-a75b-8ce1babf4b75",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{
"ver": "2.3.5",
"uuid": "2488dcd7-1647-4cc6-9fda-4518bbae75b7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 158,
"platformSettings": {},
"subMetas": {
"bg_bottom": {
"ver": "1.0.4",
"uuid": "fe303ac1-f977-45e8-a0a2-37200a6cfdb6",
"rawTextureUuid": "2488dcd7-1647-4cc6-9fda-4518bbae75b7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 158,
"rawWidth": 1280,
"rawHeight": 158,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dc13aa2a-5081-4433-bea0-6f622eb89884",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 147,
"height": 221,
"platformSettings": {},
"subMetas": {
"bg_bottom_left": {
"ver": "1.0.4",
"uuid": "6a873ce7-90e4-410b-a248-ce75c254ebd2",
"rawTextureUuid": "dc13aa2a-5081-4433-bea0-6f622eb89884",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 147,
"height": 221,
"rawWidth": 147,
"rawHeight": 221,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "929a3efc-822d-4128-a38d-f0d87814bf67",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 130,
"height": 220,
"platformSettings": {},
"subMetas": {
"bg_bottom_right": {
"ver": "1.0.4",
"uuid": "21db35c1-22e1-48d8-9ef4-87bf01c56c1f",
"rawTextureUuid": "929a3efc-822d-4128-a38d-f0d87814bf67",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 130,
"height": 220,
"rawWidth": 130,
"rawHeight": 220,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "83032d8e-87bd-4dce-8366-66e45aba2a89", "uuid": "eeecc3c8-4f67-4f2b-bc81-136be4119207",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 393, "width": 49,
"height": 230, "height": 49,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"3": { "bg_bubble": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "ec6db2f8-0b29-4f5b-a92a-c72e31042813", "uuid": "221854fe-cf96-40c4-a3b3-03e4922b8253",
"rawTextureUuid": "83032d8e-87bd-4dce-8366-66e45aba2a89", "rawTextureUuid": "eeecc3c8-4f67-4f2b-bc81-136be4119207",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 393, "width": 49,
"height": 230, "height": 49,
"rawWidth": 393, "rawWidth": 49,
"rawHeight": 230, "rawHeight": 49,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "730b8cf7-5af5-4f81-a396-7c3c852c6e07", "uuid": "bcb5855e-852b-4b88-826a-aa03f89a99e7",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 393, "width": 941,
"height": 230, "height": 168,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"4": { "bg_fish": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "38d0a49d-b3de-4221-9502-55158de40e96", "uuid": "54170716-c145-4bca-abe3-487ec87fa819",
"rawTextureUuid": "730b8cf7-5af5-4f81-a396-7c3c852c6e07", "rawTextureUuid": "bcb5855e-852b-4b88-826a-aa03f89a99e7",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 393, "width": 941,
"height": 230, "height": 168,
"rawWidth": 393, "rawWidth": 941,
"rawHeight": 230, "rawHeight": 168,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "5276d68f-e817-4cd9-a895-bf725e61b0bb", "uuid": "110f353d-6a9a-484f-9976-f29e5509a476",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 393, "width": 731,
"height": 230, "height": 491,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"2": { "bg_left": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "29796353-4c7f-4531-854e-782a6bffab5a", "uuid": "9df56b8e-95ac-4aed-bd0d-858a5044e237",
"rawTextureUuid": "5276d68f-e817-4cd9-a895-bf725e61b0bb", "rawTextureUuid": "110f353d-6a9a-484f-9976-f29e5509a476",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 393, "width": 731,
"height": 230, "height": 491,
"rawWidth": 393, "rawWidth": 731,
"rawHeight": 230, "rawHeight": 491,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "1e7ead81-caa0-4910-9a65-61376ac137b2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 448,
"height": 570,
"platformSettings": {},
"subMetas": {
"bg_right": {
"ver": "1.0.4",
"uuid": "438c1564-ce71-47a0-a77b-352a7e8f92f7",
"rawTextureUuid": "1e7ead81-caa0-4910-9a65-61376ac137b2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 448,
"height": 570,
"rawWidth": 448,
"rawHeight": 570,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
"name": "play", "name": "play",
"id": "9af72fd2-44a6-4131-8ea3-3e1b3fa22231", "id": "9af72fd2-44a6-4131-8ea3-3e1b3fa22231",
"version": "2.4.5", "version": "2.4.5",
"isNew": false "isNew": false,
"description": ""
} }
\ 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