Commit 2398397d authored by 李维's avatar 李维

去掉中间层的video模板

parent b7e02bdf
{
"ver": "1.1.2",
"uuid": "027980ee-1da4-43c0-924e-a1b0081b87ba",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"ver": "1.2.9",
"uuid": "59286199-6a11-47ed-8d48-f792c3448a8f",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c83618a6-a058-4cb0-bf49-0872f18ba784",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
import { asyncGetSpriteFrimeByUrl, onHomeworkFinish } from "../Script/util_JJ_Video_01";
import { defaultData } from "../Script/defaultData_JJ_Video_01";
const { ccclass, property } = cc._decorator;
@ccclass
export default class VideoPlayerComponent extends cc.Component {
@property(cc.VideoPlayer)
videoPlayer: cc.VideoPlayer = null;
@property(cc.Node)
ProgressBar: cc.Node = null;
@property(cc.Button)
playButton: cc.Button = null;
@property(cc.Button)
pauseButton: cc.Button = null;
@property(cc.Button)
restartButton: cc.Button = null;
@property(cc.Button)
backButton: cc.Button = null;
@property(cc.Button)
forwardButton: cc.Button = null;
@property(cc.Label)
durationLabel: cc.Label = null;
@property(cc.Label)
currentTimeLabel: cc.Label = null;
@property(cc.Node)
barTag: cc.Node = null;
@property(cc.Node)
bar: cc.Node = null;
@property(cc.Node)
loadingSprite: cc.Node = null;
_designSize: cc.Size = null;
_frameSize: cc.Size = null;
_mapScaleMin: number = null;
_mapScaleMax: number = null;
_cocosScale: number = null;
data;
initSize() {
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height;
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height;
console.log("原本尺寸",screen_size,"现在尺寸",design_size)
let f = screen_size >= design_size;
cc.Canvas.instance.fitHeight = f;
cc.Canvas.instance.fitWidth = !f;
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
console.log("原本宽度",cc.director["_scene"].width,"现在宽度",frameSize.width)
console.log("原本高度",cc.director["_scene"].height,"现在高度",frameSize.height)
cc.director["_scene"].width = frameSize.width;
cc.director["_scene"].height = frameSize.height;
}
getVideoUrl(url1: string): Promise<string> {
return new Promise((resolve, reject) => {
const url2 = url1.replace(/.mp4$/g, "_h.mp4");
this.httpHeadCall(url2, (success) => {
if (success) {
console.log('return url2: ', url2);
resolve(url2);
} else {
console.log('return url1: ', url1);
resolve(url1);
}
});
});
}
httpHeadCall(requestUrl: string, callback: (success: boolean) => void) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requestUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if (xhr.status >= 200 && xhr.status < 400) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e);
}
};
xhr.open("HEAD", requestUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
console.log("汪汪汪 posterror", e);
callback(false);
};
xhr.ontimeout = (e) => {
console.log("汪汪汪 ontimeout", e);
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e);
}
}
_isPlayComplated: boolean = null;
_isReadyToPlay: boolean = null;
onLoad() {
cc.debug.setDisplayStats(false);
this.initSize();
cc.find('JJ_Video_01/bg').scale = this._mapScaleMax;
cc.find('JJ_Video_01/video_node/bg').scale = this._mapScaleMax;
// cc.find('JJ_Video_01/bgwhite').zIndex=-2
// cc.find('JJ_Video_01/bg').zIndex=-1
// cc.find('JJ_Video_01/VideoNode').zIndex=0
// cc.find('JJ_Video_01/video_node').zIndex=1
// cc.find('JJ_Video_01/bg_video_shadow').zIndex=2
// cc.find('JJ_Video_01/Controls').zIndex=3
// cc.find('JJ_Video_01/videolist').zIndex=4
// cc.find('JJ_Video_01/btn_return').zIndex=5
// cc.find('JJ_Video_01/title').zIndex=5
this._isReadyToPlay = false;
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
this.videoPlayer.node.on('ready-to-play', () => {
console.log('ready-to-play');
this.playButton.node.active = true;
cc.find(`JJ_Video_01/bg_video_shadow`).active = false;
// cc.find(`JJ_Video_01/loading`).active = false;
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this._isReadyToPlay = true;
this._isPlayComplated = false;
this.videoPlayer.currentTime = 0;
this.play();
});
this.videoPlayer.node.on('meta-loaded', () => {
console.log('meta-loaded');
});
this.videoPlayer.node.on('clicked', () => {
console.log('clicked');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on('touchstarted', () => {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on(cc.Node.EventType.TOUCH_START, () => {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on('playing', () => {
console.log('playing');
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this.playButton.node.active = false;
this.restartButton.node.active = false;
this.pauseButton.node.active = true;
});
this.videoPlayer.node.on('paused', () => {
console.log('paused');
});
this.videoPlayer.node.on('stopped', () => {
console.log('stopped');
});
this.videoPlayer.node.on('completed', async () => {
console.log('completed');
this._isPlayComplated = true;
this.playButton.node.active = false;
this.pauseButton.node.active = false;
this.restartButton.node.active = false;
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
});
cc.view.setResizeCallback(() => {
console.log('Resize');
this.initdDrag();
});
this.initdDrag();
this.videoPlayIndex=0
this.refreshLastNextBtns()
}
refreshLastNextBtns(){
cc.find("JJ_Video_01/btn_last").active=this.videoPlayIndex!=0
if (this.videoItemList)
cc.find("JJ_Video_01/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
}
onClickNext(){
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
onClickLast(){
const nextItem = this.videoItemList[this.videoPlayIndex - 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
initListener() {
if (window['air']) {
window["air"].dialogStatus = (statusCode: number) => {
console.log("缓冲", statusCode);
if (statusCode == 701) {
this.loadingSprite.active = true;
} else if (statusCode == 702) {
this.loadingSprite.active = false;
}
};
}
}
initdDrag() {
const maxX = this.ProgressBar.width;
const minX = 0;
this.barTag.off(cc.Node.EventType.TOUCH_START);
this.barTag.on(cc.Node.EventType.TOUCH_START, (e) => {
if (!this._isReadyToPlay) {
return;
}
console.log("TOUCH_START");
});
this.barTag.off(cc.Node.EventType.TOUCH_MOVE);
this.barTag.on(cc.Node.EventType.TOUCH_MOVE, (e) => {
if (!this._isReadyToPlay) {
return;
}
const worldPos = e.getLocation();
const localPos = this.barTag.parent.convertToNodeSpaceAR(worldPos);
let newX = localPos.x;
newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX;
const percent = newX / maxX;
const dur = this.videoPlayer.getDuration();
this.currentTimeLabel.string = this.formatTime(percent * dur);
this.videoPlayer.currentTime = percent * dur;
});
this.barTag.off(cc.Node.EventType.TOUCH_END);
this.barTag.on(cc.Node.EventType.TOUCH_END, (e) => {
if (!this._isReadyToPlay) {
return;
}
console.log("TOUCH_ENDED");
this.updateBarByPos(this.barTag.x);
});
this.barTag.off(cc.Node.EventType.MOUSE_UP);
this.barTag.on(cc.Node.EventType.MOUSE_UP, (e) => {
if (!this._isReadyToPlay) {
return;
}
console.log("MOUSE_UP");
this.updateBarByPos(this.barTag.x);
});
}
videoItemList: cc.Node[] = null;
videoPlayIndex: number = null;
async initView() {
this.videoItemList = [];
const videoListContent = cc.find(`JJ_Video_01/videolist/view/content`);
const templateItem = cc.find(`item`, videoListContent);
for (let i = 0; i < this.data.dataArr.length; i++) {
const row = this.data.dataArr[i];
const itemClone = cc.instantiate(templateItem);
itemClone.parent = videoListContent;
itemClone.active = true;
const spriteFrame = await asyncGetSpriteFrimeByUrl(row.cover);
const picNode1 = cc.find(`item/mask/cover`, itemClone);
picNode1.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx1 = 321 / picNode1.width;
const sy1 = 199 / picNode1.height;
picNode1.scale = Math.min(sx1, sy1);
const picNode2 = cc.find(`item_active/mask/cover`, itemClone);
picNode2.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx2 = 366 / picNode2.width;
const sy2 = 227 / picNode2.height;
picNode2.scale = Math.min(sx2, sy2);
cc.find(`item_active/title`, itemClone).getComponent(cc.Label).string = row.title;
cc.find(`item/title`, itemClone).getComponent(cc.Label).string = row.title;
cc.find(`item_active/num`, itemClone).getComponent(cc.Label).string = String(i + 1 > 9 ? (i + 1) : `0${i + 1}`);
cc.find(`item/num`, itemClone).getComponent(cc.Label).string = String(i + 1 > 9 ? (i + 1) : `0${i + 1}`);
itemClone.attr({ video_url: row.video_url, playIndex: i });
itemClone.on('my_item_click', () => {
this.clickVideoItem(null, itemClone);
});
this.videoItemList.push(itemClone);
}
let videolist = cc.find(`JJ_Video_01/videolist`)
videolist.getComponent(cc.ScrollView).scrollToLeft()
}
showTips(tips: string) {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.showTips(tips);
} else {
console.log(tips);
}
}
async clickVideoItem(evt: cc.Event.EventTouch, _node: cc.Node) {
const item = evt ? evt.currentTarget : _node;
if (!item.video_url) {
this.showTips("视频不存在");
return;
}
if (item.video_url == this.videoPlayer.remoteURL) {
this.showTips("该视频正在播放");
return;
}
this.videoPlayIndex = item.playIndex;
this._isReadyToPlay = false;
// cc.find(`JJ_Video_01/loading`).active = true;
cc.find(`JJ_Video_01/bg`).active = true;
cc.find(`JJ_Video_01/bgwhite`).active = true;
// cc.find(`JJ_Video_01/bg_video_shadow`).active = true;
// this.videoPlayer.node.x = -5000;
// this.videoPlayer.node.y = -5000;
cc.find(`JJ_Video_01/videolist/view/content`).children.forEach(row => {
cc.find(`item_active`, row).active = false;
cc.find(`item`, row).active = true;
});
cc.find(`item_active`, item).active = true;
const originalUrl = item.video_url;
this.videoPlayer.remoteURL = await this.getVideoUrl(item.video_url);
for (let i = 0; i < this.data.dataArr.length; i++) {
const element = this.data.dataArr[i];
if (element.video_url == originalUrl) {
const count = this.data.dataArr[i].count;
if (count) {
this.data.dataArr[i].count++;
} else {
this.data.dataArr[i].count = 1;
}
}
}
const totalCount = this.data.totalCount;
if (totalCount) {
this.data.totalCount++;
} else {
this.data.totalCount = 1;
}
this.refreshLastNextBtns()
}
start() {
this.node.zIndex = 10000;
let getData = this.getData.bind(this);
if (window && window["courseware"]) {
getData = window["courseware"].getData;
}
getData(async (data) => {
console.log('data:', JSON.stringify(data));
this.data = data || this.getDefaultData();
await this.initView();
if (window && window["air"]) {
window["air"].hideAirClassLoading();
}
cc.find(`JJ_Video_01/videolist`).active = this.data.dataArr.length>1;
if (this.data.dataArr.length<=1){
console.log("qsj???")
cc.find(`JJ_Video_01/bg/videoBg`).scale=1.2
cc.find(`JJ_Video_01/bg/videoBg`).y=-136.058
// cc.find(`JJ_Video_01/video_node`).scale=1.2
cc.find(`JJ_Video_01/video_node`).width*=1.2
cc.find(`JJ_Video_01/video_node`).height*=1.2
cc.find(`JJ_Video_01/video_node`).y=73.311
cc.find(`JJ_Video_01/bg_video_shadow`).scale=1.2
cc.find(`JJ_Video_01/bg_video_shadow`).y=59.039
cc.find(`JJ_Video_01/btn_last`).x=-734.101
cc.find(`JJ_Video_01/btn_last`).y=-39.603
cc.find(`JJ_Video_01/btn_next`).x=734.101
cc.find(`JJ_Video_01/btn_next`).y=-39.603
cc.find(`JJ_Video_01/VideoNode`).scale=1.2
cc.find(`JJ_Video_01/Controls`).scale=1.2
cc.find(`JJ_Video_01/Controls`).y=-570
cc.find(`JJ_Video_01/Controls`).x+=50
this.videoPlayIndex=0
this.videoItemList[0].emit('my_item_click');
}
});
if (window.CustomEvent) {
window.dispatchEvent(new CustomEvent('resize'));
}
this.initListener();
}
updateBarByPos(newX: number) {
const maxX = this.ProgressBar.width;
const minX = 0;
let percent = newX / maxX;
if (percent > 1) {
percent = 1;
}
const dur = this.videoPlayer.getDuration();
this.videoPlayer.currentTime = percent * dur;
}
updateBarByTime(ct: number) {
if (this._isPlayComplated) {
return;
}
this.currentTimeLabel.string = this.formatTime(ct);
const dur = this.videoPlayer.getDuration();
let percent = ct / dur;
if (percent > 1) {
percent = 1;
}
this.ProgressBar.getComponent(cc.ProgressBar).progress = percent;
const maxX = this.ProgressBar.width;
const minX = 0;
let newX = percent * maxX;
newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX;
}
formatTime(time: number): string {
if (time === undefined) {
return '';
}
let hh:Number|String = Math.floor(time / 60 / 60);
if (Number(hh) > 0) {
hh = `${hh.toString().padStart(2, '0')}:`;
} else {
hh = '';
}
const mm = Math.floor(time / 60).toString().padStart(2, '0');
const ss = Math.round(time % 60).toString().padStart(2, '0');
return `${hh}${mm}:${ss}`;
}
getData(func: (data: any) => void) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
}
getDefaultData() {
return defaultData;
}
play() {
if (!this._isReadyToPlay) {
return;
}
const { width, height } = cc.find(`JJ_Video_01/bg`);
cc.find(`JJ_Video_01/text_tips`).active = false;
// cc.find(`JJ_Video_01/bg`).active = false;
cc.find(`JJ_Video_01/bgwhite`).active = false;
cc.find(`JJ_Video_01/bg_video_shadow`).active = false;
const videoContainer = cc.find('JJ_Video_01/video_node');
cc.find('bg', videoContainer).width = width;
cc.find('bg', videoContainer).height = height;
this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y;
this.videoPlayer.play();
}
pause() {
this.videoPlayer.pause();
}
forward() {
}
backward() {
}
replay() {
this._isPlayComplated = false;
this.videoPlayer.currentTime = 0;
this.videoPlayer.play();
}
playLocalAudio(audioName: string) {
cc.audioEngine.stopAll();
const audio = cc.find(`JJ_Video_01/res/audio/${audioName}`).getComponent(cc.AudioSource);
cc.audioEngine.playEffect(audio.clip, false);
}
time1: any = null;
isVideoFull: boolean = false;
tempPos: any = null;
fullScreen() {
if (this.isVideoFull) {
return;
}
if (!this._isReadyToPlay) {
return;
}
this.tempPos = {};
console.log("====进入全屏===");
this.isVideoFull = true;
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls/fullscreen`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/Controls/exitfull`).active = this.isVideoFull;
cc.find(`JJ_Video_01/btn_return`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/title`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/bg`).active = !this.isVideoFull;
const videoContainer = cc.find('JJ_Video_01/video_node');
this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height };
videoContainer.width = this.node.width;
videoContainer.height = this.node.height;
videoContainer.x = 0;
videoContainer.y = 0;
cc.find(`JJ_Video_01/videolist`).active = false;
const controls = cc.find(`JJ_Video_01/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls);
this.tempPos.controlPos = { x: controls.x, y: controls.y };
controls.x = 300; // qsj
if (this.data.dataArr.length<=1){
controls.y = 0 - this.node.height / 2-30;
} else {
controls.y = 0 - this.node.height / 2-30;
}
controlBg.opacity = 240;
controlBg.width = this.node.width;
this.videoPlayer.node.height = this.node.height;
this.videoPlayer.node.width = this.node.width;
this.videoPlayer.node.x = 0;
this.videoPlayer.node.y = 0;
setTimeout(() => {
this.videoPlayer.node.width = Math.min(this.node.width, this.node.height * 16 / 9);
}, 100);
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 3000);
}
exitFullScreen() {
if (!this.isVideoFull) {
return;
}
console.log("====退出全屏===", this.tempPos);
this.isVideoFull = false;
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls/fullscreen`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/Controls/exitfull`).active = this.isVideoFull;
cc.find(`JJ_Video_01/btn_return`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/title`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/bg`).active = !this.isVideoFull;
const videoContainer = cc.find('JJ_Video_01/video_node');
videoContainer.width = this.tempPos.videoPos.width;
videoContainer.height = this.tempPos.videoPos.height;
videoContainer.x = this.tempPos.videoPos.x;
videoContainer.y = this.tempPos.videoPos.y;
this.videoPlayer.node.width = this.tempPos.videoPos.width;
this.videoPlayer.node.height = this.tempPos.videoPos.height;
this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y;
cc.find(`JJ_Video_01/videolist`).active = this.data.dataArr.length>1;
const controls = cc.find(`JJ_Video_01/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls);
controls.x = this.tempPos.controlPos.x;
controls.y = this.tempPos.controlPos.y;
controlBg.opacity = 255;
controlBg.width = 1259;
if (this.time1) {
clearTimeout(this.time1);
}
}
onDestroy() {
if (this.time1) {
clearTimeout(this.time1);
}
}
exitGame() {
this.data.templateName="JJ_Video_01";
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.exitGame(this.data, true);
} else {
console.log("==触发返回事件==");
}
}
update(dt: number) {
console.log("==VIDEO==",this.node.active);
if (!this._isReadyToPlay) {
return;
}
if (this.videoPlayer) {
const ct = this.videoPlayer.currentTime;
if (ct) {
this.updateBarByTime(ct);
}
if (this.videoPlayer.isPlaying()) {
if (this.playButton.node.active) {
this.playButton.node.active = false;
this.restartButton.node.active = false;
}
if (!this.pauseButton.node.active) {
this.pauseButton.node.active = true;
}
} else {
if (!this.playButton.node.active) {
this.playButton.node.active = true;
}
if (this.pauseButton.node.active) {
this.pauseButton.node.active = false;
}
if (this.restartButton.node.active) {
this.playButton.node.active = false;
}
}
}
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "ed52eb63-fc85-4f55-b5f9-b56aabff79cf",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e0e698b1-03bb-4e00-a907-4be459ef4eeb",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
export const defaultData = {
"dataArr": [
{
"title": "The Old Man",
"cover": "http://staging-teach.cdn.ireadabc.com/c8abf7383d65bcbdba8f390785cece60.png",
"video_url": "http://staging-teach.cdn.ireadabc.com/c37a3945121274a1f7d95717327539ec.mp4"
},
{
"title": "Where has my little dog gone",
"cover": "http://staging-teach.cdn.ireadabc.com/f6f4bbef497409fef3c8f1d375893829.png",
"video_url": "http://staging-teach.cdn.ireadabc.com/d9df7ef1ba8d7e20613e83984d2d7b9a.mp4"
}
]
};
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "060d5dad-fd85-4f0e-924c-d09fa22f5092",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
export function getPosByAngle(angle, len) {
const radian = angle * Math.PI / 180;
const x = Math.sin(radian) * len;
const y = Math.cos(radian) * len;
return { x, y };
}
export function getAngleByPos(px, py, mx, my) {
const x = Math.abs(px - mx);
const y = Math.abs(py - my);
const z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
const cos = y / z;
const radina = Math.acos(cos); // 用反三角函数求弧度
let angle = Math.floor(180 / (Math.PI / radina) * 100) / 100; // 将弧度转换成角度
if (mx > px && my > py) {// 鼠标在第四象限
angle = 180 - angle;
}
if (mx === px && my > py) {// 鼠标在y轴负方向上
angle = 180;
}
if (mx > px && my === py) {// 鼠标在x轴正方向上
angle = 90;
}
if (mx < px && my > py) {// 鼠标在第三象限
angle = 180 + angle;
}
if (mx < px && my === py) {// 鼠标在x轴负方向
angle = 270;
}
if (mx < px && my < py) {// 鼠标在第二象限
angle = 360 - angle;
}
// console.log('angle: ', angle);
return angle;
}
export function exchangeNodePos(baseNode, targetNode) {
return baseNode.convertToNodeSpaceAR(targetNode._parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y)));
}
export function RandomInt(a, b = 0) {
let max = Math.max(a, b);
let min = Math.min(a, b);
return Math.floor(Math.random() * (max - min) + min);
}
export function randomSortByArr(arr) {
const newArr = [];
const tmpArr = arr.concat();
while (tmpArr.length > 0) {
const randomIndex = Math.floor(tmpArr.length * Math.random());
newArr.push(tmpArr[randomIndex]);
tmpArr.splice(randomIndex, 1);
}
return newArr;
}
export function setSprNodeMaxLen(sprNode, maxW, maxH) {
const sx = maxW / sprNode.width;
const sy = maxH / sprNode.height;
const s = Math.min(sx, sy);
sprNode.scale = Math.round(s * 1000) / 1000;
}
export function localPosTolocalPos(baseNode, targetNode) {
const worldPos = targetNode.parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y));
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
}
export function worldPosToLocalPos(worldPos, baseNode) {
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
}
export function getScaleRateBy2Node(baseNode, targetNode, maxFlag = true) {
const worldRect1 = targetNode.getBoundingBoxToWorld();
const worldRect2 = baseNode.getBoundingBoxToWorld();
const sx = worldRect1.width / worldRect2.width;
const sy = worldRect1.height / worldRect2.height;
if (maxFlag) {
return Math.max(sx, sy);
} else {
return Math.min(sx, sy);
}
}
export function getDistance(start, end) {
var pos = cc.v2(start.x - end.x, start.y - end.y);
var dis = Math.sqrt(pos.x * pos.x + pos.y * pos.y);
return dis;
}
export function playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
}
export function btnClickAnima(btn, time = 0.15, rate = 1.05) {
btn.tmpScale = btn.scale;
btn.on(cc.Node.EventType.TOUCH_START, () => {
cc.tween(btn)
.to(time / 2, { scale: btn.scale * rate })
.start()
})
btn.on(cc.Node.EventType.TOUCH_CANCEL, () => {
cc.tween(btn)
.to(time / 2, { scale: btn.tmpScale })
.start()
})
btn.on(cc.Node.EventType.TOUCH_END, () => {
cc.tween(btn)
.to(time / 2, { scale: btn.tmpScale })
.start()
})
}
export function setNetImg(item, res, { w, h }, custom = true) {
return new Promise((resolve, reject) => {
if (!item) return console.warn("图片更换失败,传入了错误的item");
let node = item.node ? item.node : item;
if (!res) {
if (node) node.active = false;
return console.warn("图片更换失败,传入了错误的res");
}
if (!node) return console.warn("图片更换失败,传入了错误的item");
if (node.net_url == res) return;
node.active = false;//
cc.loader.load({ url: res }, (err, texture) => {
if (err && !texture) return resolve(console.warn('loading loadRes warn-> ' + texture));
if (!cc.isValid(node)) return console.info("节点已销毁");
let nw = node.width = texture.width;
let nh = node.height = texture.height;
let component = node.getComponent(cc.Sprite);
let spriteFrame = new cc.SpriteFrame(texture);
component.spriteFrame = spriteFrame;
node.net_url = res;
if (!cc.isValid(node)) return console.info("节点已销毁");
if (!node) return console.warn("节点已销毁");
if (w && h && custom) {
let scaleX = w / nw;
let scaleY = h / nh;
let scale = scaleX <= scaleY ? scaleX : scaleY;
node.width = nw * scale;
node.height = nh * scale;
}
node.active = true;
resolve({ w: nw, h: nh });
});
})
}
export function getSpriteFrimeByUrl(url, cb) {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img)
if (cb) {
cb(spriteFrame);
}
})
}
export function getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
}
export function getSprNodeByUrl(url, cb) {
const node = new cc.Node();
const spr = node.addComponent(cc.Sprite);
getSpriteFrimeByUrl(url, (sf) => {
spr.spriteFrame = sf;
if (cb) {
cb(spr);
}
})
}
export function playAudio(audioClip, cb = null) {
if (audioClip) {
const audioId = cc.audioEngine.playEffect(audioClip, false);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
}
}
export async function asyncDelay(time) {
return new Promise((resolve, reject) => {
try {
cc.tween(cc.find('Canvas'))
.delay(time)
.call(() => {
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
})
}
export async function asyncLoadDragonBoneAnime(node, { skeJsonData: { url: skeJsonDataUrl }, texJsonData: { url: texJsonDataUrl }, texPngData: { url: texPngDataUrl } }) {
if (!texPngDataUrl || !texJsonDataUrl || !texPngDataUrl
|| texPngDataUrl == '' || texJsonDataUrl == '' || texPngDataUrl == '') {
return;
}
return new Promise((resolve, reject) => {
if (node.animaNode) {
node.animaNode.removeFromParent();
}
const animaNode = new cc.Node();
animaNode.name = 'animaNode';
animaNode.parent = node;
animaNode.active = true;
node.animaNode = animaNode;
const dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
const loadTexture = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texPngDataUrl, (error, texture) => {
if (error) {
reject(error);
}
resolve(texture);
});
});
const loadTexJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texJsonDataUrl, (error, atlasJson) => {
if (error) {
reject(error);
}
resolve(atlasJson);
});
});
const loadSkeJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(skeJsonDataUrl, (error, dragonBonesJson) => {
if (error) {
reject(error);
}
resolve(dragonBonesJson);
});
});
Promise.all([loadTexture, loadTexJsonData, loadSkeJsonData]).then(([texture, atlasJson, dragonBonesJson]) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = JSON.stringify(atlasJson.json);
atlas.texture = texture;
const asset = new dragonBones.DragonBonesAsset();
asset.dragonBonesJson = JSON.stringify(dragonBonesJson.json);
dragonDisplay.dragonAtlasAsset = atlas;
dragonDisplay.dragonAsset = asset;
//设置
let defaultArmature = dragonBonesJson.json.armature[0];//aramture 所有的骨骼名称
dragonDisplay.armatureName = defaultArmature.name;
resolve(animaNode);
});
});
}
export class FireworkSettings {
baseNode; // 父节点
nodeList; // 火花节点的array
pos; // 发射点
side; // 发射方向
range; // 扩散范围
number; // 发射数量
scalseRange; // 缩放范围
constructor(baseNode, nodeList,
pos = cc.v2(0, 0),
side = cc.v2(0, 100),
range = 50,
number = 100,
scalseRange = 0
) {
this.baseNode = baseNode;
this.nodeList = nodeList;
this.pos = pos;
this.side = side;
this.range = range;
this.number = number;
this.scalseRange = scalseRange;
}
static copy(firework) {
return new FireworkSettings(
firework.baseNode,
firework.nodeList,
firework.pos,
firework.side,
firework.range,
firework.number,
);
}
}
export async function showFireworks(fireworkSettings) {
const { baseNode, nodeList, pos, side, range, number, scalseRange } = fireworkSettings;
new Array(number).fill(' ').forEach(async (_, i) => {
let rabbonNode = new cc.Node();
rabbonNode.parent = baseNode;
rabbonNode.x = pos.x;
rabbonNode.y = pos.y;
rabbonNode.angle = 60 * Math.random() - 30;
let node = cc.instantiate(nodeList[RandomInt(nodeList.length)]);
node.parent = rabbonNode;
node.active = true;
node.x = 0;
node.y = 0;
node.angle = 0;
node.scale = (Math.random() - 0.5) * scalseRange + 1;
const rate = Math.random();
const angle = Math.PI * (Math.random() * 2 - 1);
await asyncTweenBy(rabbonNode, 0.3, {
x: side.x * rate + Math.cos(angle) * range * rate,
y: side.y * rate + Math.sin(angle) * range * rate
}, {
easing: 'quadIn'
});
cc.tween(rabbonNode)
.by(8, { y: -2000 })
.start();
cc.tween(rabbonNode)
.to(5, { scale: (Math.random() - 0.5) * scalseRange + 1 })
.start();
rabbonFall(rabbonNode);
await asyncDelay(Math.random());
cc.tween(node)
.by(0.15, { x: -10, angle: -10 })
.by(0.3, { x: 20, angle: 20 })
.by(0.15, { x: -10, angle: -10 })
.union()
.repeatForever()
.start();
cc.tween(rabbonNode)
.delay(5)
.to(0.3, { opacity: 0 })
.call(() => {
node.stopAllActions();
node.active = false;
node.parent = null;
node = null;
})
.start();
});
}
async function rabbonFall(node) {
const time = 1 + Math.random();
const offsetX = RandomInt(-200, 200) * time;
await asyncTweenBy(node, time, { x: offsetX, angle: offsetX * 60 / 200 });
rabbonFall(node);
}
export async function asyncTweenTo(node, duration, obj, ease = undefined) {
return new Promise((resolve, reject) => {
try {
cc.tween(node)
.to(duration, obj, ease)
.call(() => {
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
});
}
export async function asyncTweenBy(node, duration, obj, ease = undefined) {
return new Promise((resolve, reject) => {
try {
cc.tween(node)
.by(duration, obj, ease)
.call(() => {
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
});
}
export function showTrebleFirework(baseNode, rabbonList) {
const middle = new FireworkSettings(baseNode, rabbonList);
middle.pos = cc.v2(0, -400);
middle.side = cc.v2(0, 1000);
middle.range = 200;
middle.number = 100;
middle.scalseRange = 0.4;
const left = FireworkSettings.copy(middle);
left.pos = cc.v2(-600, -400);
left.side = cc.v2(200, 1000);
const right = FireworkSettings.copy(middle);
right.pos = cc.v2(600, -400);
right.side = cc.v2(-200, 1000);
showFireworks(middle);
showFireworks(left);
showFireworks(right);
}
export function onHomeworkFinish(data) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.onHomeworkFinish(() => {}, data);
} else {
console.log('onHomeworkFinish', data);
}
}
export function jumpToBundle(bundleName) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.loadOnlineBundle(bundleName);
} else {
console.log('jump to bundle: ' + bundleName);
}
}
export function jumpToLogin() {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.loadOnlineBundle("NJ_login");
} else {
console.log('jump to bundle: NJ_login');
}
}
export function asyncCallNetworkApiGet(apiName, data) {
return new Promise((resolve, reject) => {
callNetworkApiGet(apiName, data, (res => {
resolve(res);
}));
});
}
export function asyncCallNetworkApiPost(uri, data) {
return new Promise((resolve, reject) => {
callNetworkApiPost(uri, data, (res) => {
resolve(res);
});
});
}
export function callNetworkApiPost(uri, data, callBack) {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.callNetworkApiPost(uri, data, callBack);
return;
}
const baseUrl = 'http://staging-openapi.iteachabc.com';
const xhr = new XMLHttpRequest();
const url = `${baseUrl}${uri}`;
xhr.open("POST", url, true);
xhr.setRequestHeader('content-type', 'application/json');
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
callBack(JSON.parse(xhr.responseText));
}
}
xhr.send(JSON.stringify(data));
}
export function callNetworkApiGet(uri, data, callBack) {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.callNetworkApiGet(uri, data, callBack);
return;
}
const baseUrl = 'http://staging-openapi.iteachabc.com';
let queryStr = '?';
const params = [];
for (const key in data) {
if (Object.hasOwnProperty.call(data, key)) {
params.push(`${key}=${data[key]}`);
}
}
queryStr += params.join("&");
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
callBack(xhr.responseText);
}
};
const url = `${baseUrl}${uri}${queryStr}`;
console.log('url = ' + url);
xhr.open('GET', url, true);
xhr.send();
}
function httpHeadCall(requsetUrl, callback) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requsetUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if ((xhr.status >= 200 && xhr.status < 400)) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e)
}
};
xhr.open("HEAD", requsetUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
console.log("汪汪汪 posterror", e);
callback(false);
};
xhr.ontimeout = (e) => {
console.log("汪汪汪 ontimeout", e);
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e)
}
};
export function getVideoUrl(video_url, callback) {
const url1 = video_url;
const url2 = url1.replace(/.mp4$/g, "_l.mp4");
httpHeadCall(url2, (success) => {
if (success) {
console.log('return url2: ', url2);
callback(url2);
} else {
console.log('return url1: ', url1);
callback(url1);
}
})
};
export function buttonOnceClick(button, callback, scale = 1.0) {
button.addComponent(cc.Button);
const func = () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
cc.tween(button)
.to(0.1, { scale: scale * 1.1 })
.to(0.1, { scale: scale })
.call(() => {
button['cantClick'] = false;
callback && callback();
})
.start();
}
button.off('click');
button.once('click', func);
}
export function buttonOnClick(button, callback, scale = 1.0) {
button.on('click', () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
callback && callback();
button['cantClick'] = false;
});
}
export function asyncGetSpriteFrimeByUrl(url) {
return new Promise((resolve, reject) => {
cc.loader.load({ url }, (err, img) => {
if (err) {
reject(err);
return;
}
const spriteFrame = new cc.SpriteFrame(img)
resolve(spriteFrame);
})
});
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "8b8f565c-a90c-4919-ab4a-7cec87e53873",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "a0910f9d-063b-4f28-ad70-008cb77f6673",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "13f89b4a-cdb6-40c6-85dd-5cdb8ad917e5",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9467816a-a150-4a80-864c-1630f46876d5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 460,
"height": 1080,
"platformSettings": {},
"subMetas": {
"bg_bg": {
"ver": "1.0.4",
"uuid": "7b1b9a24-6ffe-428a-94f7-a4167e2f58c9",
"rawTextureUuid": "9467816a-a150-4a80-864c-1630f46876d5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 460,
"height": 1080,
"rawWidth": 460,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5231ba36-fe05-472a-8ac4-522754ab8fb5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 548,
"platformSettings": {},
"subMetas": {
"bg_bottom": {
"ver": "1.0.4",
"uuid": "234ab084-10f0-444b-9317-05a2e79fc865",
"rawTextureUuid": "5231ba36-fe05-472a-8ac4-522754ab8fb5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 548,
"rawWidth": 1920,
"rawHeight": 548,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "23b8aafb-c37c-45e2-900b-152c979928f2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 223,
"height": 274,
"platformSettings": {},
"subMetas": {
"bg_left": {
"ver": "1.0.4",
"uuid": "6f7064ca-1a2b-40d6-9fd1-bee219ca78a8",
"rawTextureUuid": "23b8aafb-c37c-45e2-900b-152c979928f2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 223,
"height": 274,
"rawWidth": 223,
"rawHeight": 274,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "abf0b0cd-2c1f-4998-a7ad-8d460f9488fc",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 200,
"height": 327,
"platformSettings": {},
"subMetas": {
"bg_right": {
"ver": "1.0.4",
"uuid": "8274ddd3-3e42-4e68-aa18-1cfc3385f7c7",
"rawTextureUuid": "abf0b0cd-2c1f-4998-a7ad-8d460f9488fc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 200,
"height": 327,
"rawWidth": 200,
"rawHeight": 327,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1ec7d2ee-8183-490b-b0d4-a1f54df4ac22",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 971,
"height": 717,
"platformSettings": {},
"subMetas": {
"bg_video_bg": {
"ver": "1.0.4",
"uuid": "bbf1e3a9-27e1-420a-adf7-4bede4e54e51",
"rawTextureUuid": "1ec7d2ee-8183-490b-b0d4-a1f54df4ac22",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 971,
"height": 717,
"rawWidth": 971,
"rawHeight": 717,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2368a4b6-479f-4a0b-80e3-ef03b62fb202",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1255,
"height": 891,
"platformSettings": {},
"subMetas": {
"bg_video_bg2": {
"ver": "1.0.4",
"uuid": "bdfd467d-5c1a-41e7-9271-27892b0b7769",
"rawTextureUuid": "2368a4b6-479f-4a0b-80e3-ef03b62fb202",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1255,
"height": 891,
"rawWidth": 1255,
"rawHeight": 891,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "80283efa-d05b-4f13-8b37-6a34d35349e8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 971,
"height": 717,
"platformSettings": {},
"subMetas": {
"bg_video_bg_mask": {
"ver": "1.0.4",
"uuid": "4942db0a-b739-4f31-987a-a9b8c76ed038",
"rawTextureUuid": "80283efa-d05b-4f13-8b37-6a34d35349e8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 81.5,
"trimX": 50,
"trimY": 6,
"width": 870,
"height": 542,
"rawWidth": 971,
"rawHeight": 717,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "79c3bd4b-f24a-4b59-a849-7e0cd4c2187d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 417,
"height": 256,
"platformSettings": {},
"subMetas": {
"bg_video_chosen": {
"ver": "1.0.4",
"uuid": "9db8ec1a-5f28-4f9c-99ef-b66018fd54e5",
"rawTextureUuid": "79c3bd4b-f24a-4b59-a849-7e0cd4c2187d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 417,
"height": 256,
"rawWidth": 417,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3baa58ea-b70f-4443-9297-6c714c2e1ad7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 417,
"height": 256,
"platformSettings": {},
"subMetas": {
"bg_video_chosen_mask": {
"ver": "1.0.4",
"uuid": "116e7f0f-5a2d-4bd5-947e-7248356ea211",
"rawTextureUuid": "3baa58ea-b70f-4443-9297-6c714c2e1ad7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 8,
"trimX": 25,
"trimY": 6,
"width": 367,
"height": 228,
"rawWidth": 417,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "57f3ede2-4bf5-4324-922b-6243e0f55ea4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 348,
"height": 228,
"platformSettings": {},
"subMetas": {
"bg_video_unchosen": {
"ver": "1.0.4",
"uuid": "5ffb0180-b8f3-4086-8e95-6c4652eaa3ac",
"rawTextureUuid": "57f3ede2-4bf5-4324-922b-6243e0f55ea4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 348,
"height": 228,
"rawWidth": 348,
"rawHeight": 228,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8352083c-cf27-417d-b2b9-bb6df90744be",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 636,
"height": 55,
"platformSettings": {},
"subMetas": {
"bg_videotime_bg": {
"ver": "1.0.4",
"uuid": "a03aadf0-e818-47f3-bab6-4f77bbfd969c",
"rawTextureUuid": "8352083c-cf27-417d-b2b9-bb6df90744be",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 11,
"trimX": 13,
"trimY": 2,
"width": 610,
"height": 29,
"rawWidth": 636,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4fe753b6-8bb6-4ad5-8c80-a0560ac569d6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 636,
"height": 55,
"platformSettings": {},
"subMetas": {
"bg_videotime_progress": {
"ver": "1.0.4",
"uuid": "5e42909c-f0ec-4b12-9feb-f695eee4def5",
"rawTextureUuid": "4fe753b6-8bb6-4ad5-8c80-a0560ac569d6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 636,
"height": 55,
"rawWidth": 636,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "45afad3b-bde7-4f10-bb6f-fb39b4ff1951",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_downsize": {
"ver": "1.0.4",
"uuid": "381a6930-a3ed-432a-9297-e1eeef2a0082",
"rawTextureUuid": "45afad3b-bde7-4f10-bb6f-fb39b4ff1951",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6221b93a-64fb-4125-a6a5-fc245cf77b40",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 103,
"height": 103,
"platformSettings": {},
"subMetas": {
"btn_last": {
"ver": "1.0.4",
"uuid": "d0893e19-3900-461f-b09e-ecc435b815ba",
"rawTextureUuid": "6221b93a-64fb-4125-a6a5-fc245cf77b40",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 103,
"height": 103,
"rawWidth": 103,
"rawHeight": 103,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1e1f7dfb-c23a-406a-aeca-e961cffefbfb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 103,
"height": 103,
"platformSettings": {},
"subMetas": {
"btn_next": {
"ver": "1.0.4",
"uuid": "c528c2a2-e7b9-4f8b-9cd2-5cdd956ae9c0",
"rawTextureUuid": "1e1f7dfb-c23a-406a-aeca-e961cffefbfb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 103,
"height": 103,
"rawWidth": 103,
"rawHeight": 103,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "deec6641-b22a-4b0c-a8c0-f2b41769c0c7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_play": {
"ver": "1.0.4",
"uuid": "623242fc-e6b2-41a3-929d-d5594ba9c99b",
"rawTextureUuid": "deec6641-b22a-4b0c-a8c0-f2b41769c0c7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6be1c5a5-6bf2-4607-b335-3c366e3d56e8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 132,
"height": 132,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "b657058c-bcb3-456e-894f-6c8fa554dc16",
"rawTextureUuid": "6be1c5a5-6bf2-4607-b335-3c366e3d56e8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 2,
"trimY": 2,
"width": 128,
"height": 130,
"rawWidth": 132,
"rawHeight": 132,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7af0f94a-d2c1-43c4-bed0-b1641d46e996",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_stop": {
"ver": "1.0.4",
"uuid": "bc7f3310-02e0-4bb5-a1be-aca4ddf1f34a",
"rawTextureUuid": "7af0f94a-d2c1-43c4-bed0-b1641d46e996",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "126e2084-2f8b-48a1-9a46-38ca2cdaf454",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_zoomin": {
"ver": "1.0.4",
"uuid": "f9e619b2-4f7a-40cf-99c6-2f303cfd5a6e",
"rawTextureUuid": "126e2084-2f8b-48a1-9a46-38ca2cdaf454",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "01139abc-ab61-4bbd-bd17-b4552b071eca",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"尺寸": {
"ver": "1.0.4",
"uuid": "bf300679-7480-41b8-a896-bb88dec4fc03",
"rawTextureUuid": "01139abc-ab61-4bbd-bd17-b4552b071eca",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "31364ae0-1b3d-49e2-96af-6f2987a3c289",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"看动画": {
"ver": "1.0.4",
"uuid": "acb84a7d-725a-41af-895c-6235fa395d0c",
"rawTextureUuid": "31364ae0-1b3d-49e2-96af-6f2987a3c289",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "715805a4-91bc-4372-9375-ae7d3689dbe3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"看动画2": {
"ver": "1.0.4",
"uuid": "8267a57b-24ea-470d-a60c-4417e501f313",
"rawTextureUuid": "715805a4-91bc-4372-9375-ae7d3689dbe3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "0db8f105-0469-496e-9a19-de25f8e1a078",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "de1c0ed7-5cf7-45c9-8d62-d82f598d74dc",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"bg": {
"ver": "1.0.4",
"uuid": "82179df8-a8f0-4782-87fb-93835aa2425f",
"rawTextureUuid": "de1c0ed7-5cf7-45c9-8d62-d82f598d74dc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "35f8333f-8709-4de1-811e-d8c2c1de6f24",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 286,
"height": 310,
"platformSettings": {},
"subMetas": {
"bg_empty": {
"ver": "1.0.4",
"uuid": "5ee55e2e-0823-4a78-955d-f4b38cfadbdf",
"rawTextureUuid": "35f8333f-8709-4de1-811e-d8c2c1de6f24",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 286,
"height": 310,
"rawWidth": 286,
"rawHeight": 310,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "db0dc39d-a6fc-470a-9c10-0b8130b701ba",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1259,
"height": 98,
"platformSettings": {},
"subMetas": {
"bg_video_bottom": {
"ver": "1.0.4",
"uuid": "944e1e8a-b189-46cd-a7ba-d3c86aaa73f7",
"rawTextureUuid": "db0dc39d-a6fc-470a-9c10-0b8130b701ba",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1259,
"height": 98,
"rawWidth": 1259,
"rawHeight": 98,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f4148bd8-9b00-4e73-871e-38592da4ef97",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 1320,
"height": 776,
"platformSettings": {},
"subMetas": {
"bg_video_shadow": {
"ver": "1.0.4",
"uuid": "086afe24-36cf-4acb-a26e-0cf3fade2b6e",
"rawTextureUuid": "f4148bd8-9b00-4e73-871e-38592da4ef97",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1320,
"height": 776,
"rawWidth": 1320,
"rawHeight": 776,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4c49c091-e090-4d1d-9514-2969c638db31",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_replay": {
"ver": "1.0.4",
"uuid": "16ea0a4c-9fd6-4334-8f5a-56b9ec1673f8",
"rawTextureUuid": "4c49c091-e090-4d1d-9514-2969c638db31",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 91,
"height": 91,
"rawWidth": 91,
"rawHeight": 91,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "93150b0c-6b0b-4efd-a9c7-c9de4ea89217",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 96,
"height": 73,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "b2f066b5-f1a9-4fdc-9364-796c91b086eb",
"rawTextureUuid": "93150b0c-6b0b-4efd-a9c7-c9de4ea89217",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 96,
"height": 73,
"rawWidth": 96,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5de3473e-8885-4416-bf83-f8eae55c2348",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_start": {
"ver": "1.0.4",
"uuid": "da418ab0-6bf6-401e-ad24-d27cca267d4f",
"rawTextureUuid": "5de3473e-8885-4416-bf83-f8eae55c2348",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 91,
"height": 91,
"rawWidth": 91,
"rawHeight": 91,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7ccf116b-22c0-4ea7-aab8-939097279dbf",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_stop": {
"ver": "1.0.4",
"uuid": "e89e23bb-5d4b-45e2-952c-753062416f03",
"rawTextureUuid": "7ccf116b-22c0-4ea7-aab8-939097279dbf",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 91,
"height": 91,
"rawWidth": 91,
"rawHeight": 91,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "28c82057-046a-4a62-9b4f-f560d8d4898d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 68,
"height": 68,
"platformSettings": {},
"subMetas": {
"btn_tiao": {
"ver": "1.0.4",
"uuid": "b42b439b-c03b-4687-98c4-39a3b8fe830f",
"rawTextureUuid": "28c82057-046a-4a62-9b4f-f560d8d4898d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 68,
"height": 68,
"rawWidth": 68,
"rawHeight": 68,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d0079242-fa68-419f-ac48-3039775a68c8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 257,
"height": 177,
"platformSettings": {},
"subMetas": {
"empty_white": {
"ver": "1.0.4",
"uuid": "f3b8db00-c61e-437d-a40f-e051aad58737",
"rawTextureUuid": "d0079242-fa68-419f-ac48-3039775a68c8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 257,
"height": 177,
"rawWidth": 257,
"rawHeight": 177,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c1f665d8-ee6a-4a48-97d3-934771b86628",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 226,
"height": 126,
"platformSettings": {},
"subMetas": {
"example": {
"ver": "1.0.4",
"uuid": "0b4b9901-b33f-486d-896a-b5f6da037535",
"rawTextureUuid": "c1f665d8-ee6a-4a48-97d3-934771b86628",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 226,
"height": 126,
"rawWidth": 226,
"rawHeight": 126,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "eca6275d-4886-4508-b957-b359c4d6c6b4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 55,
"height": 55,
"platformSettings": {},
"subMetas": {
"exitfull": {
"ver": "1.0.4",
"uuid": "0a604615-4a1e-4bb1-b106-3a95f04d3e88",
"rawTextureUuid": "eca6275d-4886-4508-b957-b359c4d6c6b4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 55,
"height": 55,
"rawWidth": 55,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2da91cfa-5880-4e41-bfbd-997e31f618c6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 73,
"height": 73,
"platformSettings": {},
"subMetas": {
"fullscreen": {
"ver": "1.0.4",
"uuid": "e6977100-ddff-47b9-8887-5f6476bdca44",
"rawTextureUuid": "2da91cfa-5880-4e41-bfbd-997e31f618c6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 73,
"height": 73,
"rawWidth": 73,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "20e3baea-7cb5-4e21-aa51-a6624e7109be",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 445,
"height": 309,
"platformSettings": {},
"subMetas": {
"item": {
"ver": "1.0.4",
"uuid": "61764693-df4c-40d8-a43a-942122ca51f7",
"rawTextureUuid": "20e3baea-7cb5-4e21-aa51-a6624e7109be",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 445,
"height": 309,
"rawWidth": 445,
"rawHeight": 309,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2f089de4-a610-4d2b-be46-25bda5705827",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 445,
"height": 309,
"platformSettings": {},
"subMetas": {
"item_active": {
"ver": "1.0.4",
"uuid": "94b231cb-631d-47a1-9a87-914df89b034d",
"rawTextureUuid": "2f089de4-a610-4d2b-be46-25bda5705827",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 445,
"height": 309,
"rawWidth": 445,
"rawHeight": 309,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9612de04-73ba-4567-9495-877d680c3343",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 790,
"height": 9,
"platformSettings": {},
"subMetas": {
"process": {
"ver": "1.0.4",
"uuid": "b035c74f-9f28-4698-8325-8fe9ec6e3db0",
"rawTextureUuid": "9612de04-73ba-4567-9495-877d680c3343",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 790,
"height": 9,
"rawWidth": 790,
"rawHeight": 9,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 11,
"borderRight": 9,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f65a0aae-287a-4aca-ac1d-357133a63dc8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 789,
"height": 9,
"platformSettings": {},
"subMetas": {
"processbg": {
"ver": "1.0.4",
"uuid": "4a11e302-ced0-4bf8-bdc3-baf51bf64c3a",
"rawTextureUuid": "f65a0aae-287a-4aca-ac1d-357133a63dc8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 789,
"height": 9,
"rawWidth": 789,
"rawHeight": 9,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 15,
"borderRight": 15,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e5fdc093-6aeb-4d46-9cf2-27908340b6ac",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 280,
"height": 125,
"platformSettings": {},
"subMetas": {
"text_tips": {
"ver": "1.0.4",
"uuid": "c4ea6240-75df-47f8-aa4e-e77c1ac4806e",
"rawTextureUuid": "e5fdc093-6aeb-4d46-9cf2-27908340b6ac",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 16,
"trimY": 9,
"width": 248,
"height": 109,
"rawWidth": 280,
"rawHeight": 125,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "14be17ee-79b4-43a8-82c8-ee89af219a5e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"frameRate":24,"name":"img_audio","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"armatureName","aabb":{"x":-27.5,"y":-21,"width":55,"height":42},"bone":[{"name":"root"},{"length":14,"name":"1","parent":"root","transform":{"x":-25.4036,"skX":-90,"skY":-90}},{"length":14,"name":"2","parent":"root","transform":{"x":-19.3116,"skX":-90,"skY":-90}},{"length":19,"name":"3","parent":"root","transform":{"x":-12.9746,"skX":-90,"skY":-90}},{"length":15,"name":"4","parent":"root","transform":{"x":-7.1302,"skX":-90,"skY":-90}},{"length":21,"name":"5","parent":"root","transform":{"x":-0.9168,"skX":-90,"skY":-90}},{"length":17,"name":"6","parent":"root","transform":{"x":5.4841,"skX":-90,"skY":-90}},{"length":18,"name":"7","parent":"root","transform":{"x":12.4269,"skX":-90,"skY":-90}},{"length":16,"name":"8","parent":"root","transform":{"x":19.0094,"skX":-90,"skY":-90}},{"length":17,"name":"9","parent":"root","transform":{"x":25.5843,"skX":-90,"skY":-90}}],"slot":[{"name":"9","parent":"9"},{"name":"8","parent":"8"},{"name":"7","parent":"7"},{"name":"6","parent":"6"},{"name":"5","parent":"5"},{"name":"4","parent":"4"},{"name":"3","parent":"3"},{"name":"2","parent":"2"},{"name":"1","parent":"1"}],"skin":[{"slot":[{"name":"6","display":[{"name":"6","transform":{"y":0.02,"skX":90,"skY":90}}]},{"name":"7","display":[{"name":"7","transform":{"y":0.07,"skX":90,"skY":90}}]},{"name":"8","display":[{"name":"8","transform":{"x":0.5,"y":-0.51,"skX":90,"skY":90}}]},{"name":"1","display":[{"name":"1","transform":{"y":0.4,"skX":90,"skY":90}}]},{"name":"2","display":[{"name":"2","transform":{"y":-0.19,"skX":90,"skY":90}}]},{"name":"3","display":[{"name":"3","transform":{"y":-0.03,"skX":90,"skY":90}}]},{"name":"4","display":[{"name":"4","transform":{"x":0.5,"y":-0.37,"skX":90,"skY":90}}]},{"name":"9","display":[{"name":"9","transform":{"y":-0.58,"skX":90,"skY":90}}]},{"name":"5","display":[{"name":"5","transform":{"y":-0.08,"skX":90,"skY":90}}]}]}],"animation":[{"duration":24,"playTimes":0,"name":"newAnimation","bone":[{"name":"1","scaleFrame":[{"duration":6,"tweenEasing":0},{"duration":18,"tweenEasing":0,"x":0.3},{"duration":0}]},{"name":"2","scaleFrame":[{"duration":8,"tweenEasing":0},{"duration":16,"tweenEasing":0,"x":0.15},{"duration":0}]},{"name":"3","scaleFrame":[{"duration":10,"tweenEasing":0},{"duration":14,"tweenEasing":0,"x":0.1},{"duration":0}]},{"name":"4","scaleFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"x":0.2},{"duration":0}]},{"name":"5","scaleFrame":[{"duration":14,"tweenEasing":0},{"duration":10,"tweenEasing":0,"x":0.3},{"duration":0}]},{"name":"6","scaleFrame":[{"duration":16,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":0.2},{"duration":0}]},{"name":"7","scaleFrame":[{"duration":18,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":0.1},{"duration":0}]},{"name":"8","scaleFrame":[{"duration":20,"tweenEasing":0},{"duration":4,"tweenEasing":0,"x":0.25},{"duration":0}]},{"name":"9","scaleFrame":[{"duration":6,"tweenEasing":0},{"duration":18,"tweenEasing":0,"x":0.25},{"duration":0}]}]}],"defaultActions":[{"gotoAndPlay":"newAnimation"}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "e0b19bd2-9adc-4f60-8a47-028b69ed67d2",
"subMetas": {}
}
\ No newline at end of file
{"name":"img_audio","SubTexture":[{"name":"9","x":16,"height":12,"y":50,"width":5},{"name":"8","x":24,"height":21,"y":27,"width":6},{"name":"7","x":1,"height":42,"y":1,"width":6},{"name":"6","x":16,"height":26,"y":1,"width":6},{"name":"5","x":9,"height":12,"y":43,"width":5},{"name":"4","x":16,"height":19,"y":29,"width":6},{"name":"3","x":9,"height":40,"y":1,"width":5},{"name":"2","x":24,"height":24,"y":1,"width":6},{"name":"1","x":1,"height":12,"y":45,"width":5}],"height":64,"imagePath":"img_audio_tex.png","width":32}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b53f4b5c-4a0b-4ea7-a795-7db518a4acd9",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "24075352-59b1-4dc8-9299-7d7808ef812f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 32,
"height": 64,
"platformSettings": {},
"subMetas": {
"img_audio_tex": {
"ver": "1.0.4",
"uuid": "4372f410-62b5-4c40-a38f-fa7820bd5e81",
"rawTextureUuid": "24075352-59b1-4dc8-9299-7d7808ef812f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 1,
"trimY": 1,
"width": 29,
"height": 61,
"rawWidth": 32,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{"name":"loading","version":"5.5","armature":[{"name":"Armature","ik":[],"bone":[{"name":"root","transform":{}},{"name":"组_1","transform":{"x":2.05,"skY":-90,"y":40.15,"skX":-90},"length":65,"parent":"root"},{"name":"A","transform":{"x":74.1475,"skY":90,"y":-2.05,"skX":90},"parent":"组_1"}],"aabb":{"x":-139.5,"height":180,"y":-90,"width":279},"defaultActions":[{"gotoAndPlay":"ufo"}],"animation":[{"name":"ufo","frame":[],"bone":[{"name":"root","rotateFrame":[],"translateFrame":[],"scaleFrame":[]},{"name":"组_1","rotateFrame":[{"duration":15,"rotate":8.3771,"curve":[0,0,0.5,1]},{"duration":15,"rotate":10.9763,"tweenEasing":0},{"duration":0,"rotate":8.3771}],"translateFrame":[{"curve":[0,0,0.5,1],"duration":15},{"tweenEasing":0,"y":13.0573,"duration":15},{"duration":0}],"scaleFrame":[]},{"name":"A","rotateFrame":[{"duration":10,"tweenEasing":0},{"duration":10,"rotate":-9.1133,"tweenEasing":0},{"duration":10,"rotate":-13.9913,"tweenEasing":0},{"duration":0}],"translateFrame":[{"tweenEasing":0,"duration":10},{"tweenEasing":0,"x":-6.4977,"y":1.2205,"duration":10},{"tweenEasing":0,"x":4.0509,"y":-0.6604,"duration":10},{"duration":0}],"scaleFrame":[]}],"playTimes":0,"ffd":[],"slot":[{"name":"组_1","displayFrame":[],"colorFrame":[]},{"name":"A","displayFrame":[{"duration":10},{"duration":10,"value":1},{"duration":10,"value":2},{"duration":0}],"colorFrame":[]}],"ik":[],"duration":30}],"slot":[{"name":"组_1","color":{},"parent":"组_1"},{"name":"A","color":{},"z":1,"parent":"A"}],"skin":[{"name":"","slot":[{"name":"A","display":[{"name":"ufo/A","transform":{"skY":-0.0263,"y":-1.0025,"skX":-0.0263},"type":"image","path":"ufo/A"},{"name":"ufo/B","transform":{"x":4.5,"skY":-0.0263,"y":-1.0025,"skX":-0.0263},"type":"image","path":"ufo/B"},{"name":"ufo/C","transform":{"x":-4.5,"skY":-0.0263,"y":-0.5025,"skX":-0.0263},"type":"image","path":"ufo/C"}]},{"name":"组_1","display":[{"name":"ufo/组_1","transform":{"x":40.15,"skY":89.9737,"y":-2.05,"skX":89.9737},"type":"image","path":"ufo/组_1"}]}]}],"frameRate":24,"type":"Armature"}],"frameRate":24,"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "288acd69-22c1-4220-a10c-2478978214fa",
"subMetas": {}
}
\ No newline at end of file
{"name":"loading","imagePath":"loading_tex.png","SubTexture":[{"name":"ufo/组_1","x":1,"height":180,"y":1,"width":279},{"name":"ufo/A","x":282,"height":80,"y":1,"width":83},{"name":"ufo/B","x":282,"height":80,"y":83,"width":60},{"name":"ufo/C","x":367,"height":83,"y":1,"width":58}],"height":256,"width":512}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "65279454-8940-4cc5-aebb-41989f70e57f",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f2d76ff5-c16f-4361-9362-661c20800248",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 256,
"platformSettings": {},
"subMetas": {
"loading_tex": {
"ver": "1.0.4",
"uuid": "c8e21a8a-5f7f-4a9c-a0ba-4fefc26d652f",
"rawTextureUuid": "f2d76ff5-c16f-4361-9362-661c20800248",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -43,
"offsetY": 37,
"trimX": 1,
"trimY": 1,
"width": 424,
"height": 180,
"rawWidth": 512,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "6ee3be57-355f-4b0f-a280-1132563ae163",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "aa4ea06d-7e3c-48a4-82e6-c8e0aff48c90",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "ef89c836-f5d9-4ed6-831a-e10c13c2b801",
"subMetas": {}
}
\ No newline at end of file
...@@ -30597,9 +30597,6 @@ ...@@ -30597,9 +30597,6 @@
"loginPage": { "loginPage": {
"__id__": 45 "__id__": 45
}, },
"JJ_Video_01_template": {
"__uuid__": "59286199-6a11-47ed-8d48-f792c3448a8f"
},
"_id": "dc27P7CmJKL7vJ/gzFAByK" "_id": "dc27P7CmJKL7vJ/gzFAByK"
} }
] ]
\ No newline at end of file
...@@ -14,9 +14,6 @@ export default class NewClass extends middleLayerBase { ...@@ -14,9 +14,6 @@ export default class NewClass extends middleLayerBase {
@property(cc.Node) @property(cc.Node)
loginPage: cc.Node = null; loginPage: cc.Node = null;
@property(cc.Prefab)
JJ_Video_01_template:cc.Prefab = null;
role; role;
// 统一释放异步资源的方法 // 统一释放异步资源的方法
...@@ -85,7 +82,6 @@ export default class NewClass extends middleLayerBase { ...@@ -85,7 +82,6 @@ export default class NewClass extends middleLayerBase {
// setTimeout(() => { // setTimeout(() => {
// this.showFinish(); // this.showFinish();
// }, 2000); // }, 2000);
this.loadTemplate();
} }
onHomeworkFinish(d1 = null, d2 = null) { onHomeworkFinish(d1 = null, d2 = null) {
...@@ -160,23 +156,18 @@ export default class NewClass extends middleLayerBase { ...@@ -160,23 +156,18 @@ export default class NewClass extends middleLayerBase {
} }
backPageNode: cc.Node = null; // 从绘本里返回的界面 backPageNode: cc.Node = null; // 从绘本里返回的界面
exitGame(data?, isLocalTemplate=false) { exitGame() {
if (isLocalTemplate){ // 加载的bundle
// 模板已经放到项目内 cc.audioEngine.stopAll();
this.hideTemplateByName(data.templateName); (<any>window).courseware.freeAllOcMethod();
} else { this.hideTips();
// 加载的bundle // 切换到空场景
cc.audioEngine.stopAll(); cc.director.loadScene('middleLayer_for_kyxq', () => {
(<any>window).courseware.freeAllOcMethod(); this.initSize();
// this.node.scale = 1;
this.backPageNode.active = true;
this.hideTips(); this.hideTips();
// 切换到空场景 })
cc.director.loadScene('middleLayer_for_kyxq', () => {
this.initSize();
// this.node.scale = 1;
this.backPageNode.active = true;
this.hideTips();
})
}
} }
getPageInfo() { getPageInfo() {
...@@ -378,37 +369,4 @@ export default class NewClass extends middleLayerBase { ...@@ -378,37 +369,4 @@ export default class NewClass extends middleLayerBase {
} }
} }
} }
loadTemplate(){
this.hideTemplateByName("JJ_Video_01");
}
hideTemplateByName(name=""){
if (name=="JJ_Video_01"){
this.hide_JJ_Video_01_template()
}
}
showTemplateByName(name=""){
if (name=="JJ_Video_01"){
this.show_JJ_Video_01_template()
}
}
private m_JJ_Video_01_template
show_JJ_Video_01_template(){
// 每次加载新资源,需要刷新数据
this.m_JJ_Video_01_template = cc.instantiate(this.JJ_Video_01_template);
this.m_JJ_Video_01_template.parent=this.node.parent;
this.m_JJ_Video_01_template.active=true;
this.node.active=false;
}
hide_JJ_Video_01_template(){
this.node.active=true;
if(this.backPageNode)
this.backPageNode.active = true;
if(this.m_JJ_Video_01_template){ // 释放资源
this.m_JJ_Video_01_template.removeFromParent();
cc.assetManager.releaseAsset(this.m_JJ_Video_01_template);
this.m_JJ_Video_01_template=null;
}
}
} }
...@@ -332,17 +332,10 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -332,17 +332,10 @@ export abstract class middleLayerBase extends cc.Component {
callback && callback(false); callback && callback(false);
return; return;
} }
if (this.courseItem.template_name == "JJ_Video_01"){
this.hidePreloadWaiting(); this.loadPageBundle(() => {
cc.find('middleLayer').getComponent("middleLayer").showTemplateByName(this.courseItem.template_name);
this.IS_BUNDLE_LOADING = false;
callback && callback(true); callback && callback(true);
return; });
} else {
this.loadPageBundle(() => {
callback && callback(true);
});
}
// this.loadPageBundle(() => { // this.loadPageBundle(() => {
// callback && callback(true); // callback && callback(true);
// }); // });
......
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