Commit 8584e29e authored by wjf's avatar wjf

l

parents
# project ignores
node_modules
released
.DS_Store
psd
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<!-- <meta name="viewport" content="width=device-width,minimum-scale=1.0,user-scalable=no"> -->
<!-- <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> -->
<!-- 小程序分享得用这个 -->
<!-- <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> -->
<!-- 易盾js -->
<!-- <script type="text/javascript" src="//cstaticdun.126.net/load.min.js"></script> -->
<!-- <script src="libs/zepto.min.js"></script> -->
<!-- <script src="libs/p2.js"></script> -->
<script src="libs/fyge.min.js"></script>
<script src="libs/svgaParser.min.js"></script>
<!-- <script src="libs/svgaParser.min1.js"></script> -->
<style>
html,
body {
padding: 0;
margin: 0;
border: 0;
width: 100%;
height: 100%;
overflow: hidden;
position: absolute;
/* background-color: #000000; */
/* background: linear-gradient(#93dbb7,#ff0,#b5d89a); */
background: linear-gradient(#93dbb7,#b5d89a);
}
</style>
</head>
<body>
<script src="output.js"></script>
<!-- <div id="__loading__" style="position:absolute;left:50%;top:50%;margin-left:-45px;color:#ffffff">拼命加载中...</div> -->
<!-- <img src="" id="img" /> -->
<div id="cusEngine" style="line-height:0;font-size:0">
<canvas id="canvas" style="width: 100%;height: 100%"></canvas>
</div>
</body>
<!-- 帧率检测 -->
<!-- <script src="libs/stats.js"></script> -->
<script>
window.addEventListener("load", function () {
//获取canvas
var canvas = document.getElementById("canvas");
canvas.width = document.body.clientWidth * (window.devicePixelRatio || 1)
canvas.height = document.body.clientHeight * (window.devicePixelRatio || 1)
var main = new Main(canvas);
console.log(main.stage)
var mouseEvent = main.stage.onMouseEvent.bind(main.stage);
canvas.addEventListener("touchstart", mouseEvent, false);
canvas.addEventListener('touchmove', mouseEvent, false);
canvas.addEventListener('touchend', mouseEvent, false);
})
</script>
</html>
import { Main } from './Main';
Page({
//暂时先不用吧,有问题
data: {
},
onLoad(query) {
// 页面加载
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
},
onReady() {
return
my.development = true;
// my._createCanvas({
// id: 'canvas',
// success: (ccc) => {
// const dpr = my.getSystemInfoSync().pixelRatio
// const windowWidth = my.getSystemInfoSync().windowWidth;
// const windowHeight = my.getSystemInfoSync().windowHeight;
// ccc.width = windowWidth * dpr;
// ccc.height = windowHeight * dpr;
// // const context = canvas.getContext("2d");
// console.log(ccc.width, ccc.height, dpr)
// //初始化
// FYGE.initedByCanvas(ccc);
// //测试
// var aa = ccc.createImage();
// aa.src = "https://yun.duiba.com.cn/db_games/activity/etc/optionImages/%E5%8D%8E%E4%B8%BAP30.jpg";
// console.log(aa)
// //帧率控制
// FYGE.Stage.addFPS("canva4stats")
// this.main = new Main(ccc)
// console.log(ccc.width, ccc.height)
// }
// })
},
onCanvasReady() {
my.development = true;
my._createCanvas({
id: 'canvas',
success: (ccc) => {
const dpr = my.getSystemInfoSync().pixelRatio
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr;
ccc.height = windowHeight * dpr;
this.main = new Main(ccc)
}
})
},
onShow() {
// 页面显示
// FYGE.Stage.pause = false
if (this.main) this.main.run();
},
onHide() {
// 页面隐藏
// FYGE.Stage.pause = true
if (this.main) this.main.pause();
},
onUnload() {
// 页面被关闭
// Stage.stop()
this.main.destroy();
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
log(e) {
if (this.main) this.main.stage.onMouseEvent(e)
},
});
This diff is collapsed.
declare module SvgaParser {
/**
* 加载方法
* @param url 资源路径
* @param success
* @param failure
*/
export function loadSvga(url: string, success: (videoItem: VideoEntity) => void, failure?: (err: string) => void): void;
/**
* 导出只是当作类型接口用
*/
export interface VideoEntity {
/**
* SVGA 文件版本
*/
version: string;
/**
* 影片尺寸
*/
videoSize: {
width: number;
height: number;
};
/**
* 帧率,60,30等每秒
*/
FPS: number;
/**
* 总帧数
*/
frames: number;
/**
* base64图片数据记录
*/
images: {
[key: string]: string
};
/**
* 图片是否已被缓存,缓存全局,注意名字覆盖
*/
hasBeenCached: boolean;
/**
* sprite对象数据
*/
sprites: SpriteEntity[];
}
interface SpriteEntity {
/**
* 标识
*/
matteKey: string;
/**
* 图片key值
*/
imageKey: string;
/**
* 帧数据数组
*/
frames: FrameEntity[];
}
/**
* 还有很多其他数据,暂不需要,比如矢量路径和遮罩路径暂时都无
*/
interface FrameEntity {
/**
* 透明度
*/
alpha: number;
/**
* 2维矩阵数据
*/
transform: {
a: number,
b: number,
c: number,
d: number,
tx: number,
ty: number,
};
}
}
declare module "svga-parser" { export = SvgaParser; }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
var Stats = function () {
var startTime = Date.now(), prevTime = startTime;
var ms = 0, msMin = Infinity, msMax = 0;
var fps = 0, fpsMin = Infinity, fpsMax = 0;
var frames = 0, mode = 0;
var container = document.createElement('div');
container.id = 'stats';
container.addEventListener('mousedown', function (event) { event.preventDefault(); setMode(++mode % 2) }, false);
container.style.cssText = 'width:80px;opacity:0.9;cursor:pointer';
var fpsDiv = document.createElement('div');
fpsDiv.id = 'fps';
fpsDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#002';
container.appendChild(fpsDiv);
var fpsText = document.createElement('div');
fpsText.id = 'fpsText';
fpsText.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
fpsText.innerHTML = 'FPS';
fpsDiv.appendChild(fpsText);
var fpsGraph = document.createElement('div');
fpsGraph.id = 'fpsGraph';
fpsGraph.style.cssText = 'position:relative;width:74px;height:30px;background-color:#0ff';
fpsDiv.appendChild(fpsGraph);
while (fpsGraph.children.length < 74) {
var bar = document.createElement('span');
bar.style.cssText = 'width:1px;height:30px;float:left;background-color:#113';
fpsGraph.appendChild(bar);
}
var msDiv = document.createElement('div');
msDiv.id = 'ms';
msDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#020;display:none';
container.appendChild(msDiv);
var msText = document.createElement('div');
msText.id = 'msText';
msText.style.cssText = 'color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
msText.innerHTML = 'MS';
msDiv.appendChild(msText);
var msGraph = document.createElement('div');
msGraph.id = 'msGraph';
msGraph.style.cssText = 'position:relative;width:74px;height:30px;background-color:#0f0';
msDiv.appendChild(msGraph);
while (msGraph.children.length < 74) {
var bar = document.createElement('span');
bar.style.cssText = 'width:1px;height:30px;float:left;background-color:#131';
msGraph.appendChild(bar);
}
var setMode = function (value) {
mode = value;
switch (mode) {
case 0:
fpsDiv.style.display = 'block';
msDiv.style.display = 'none';
break;
case 1:
fpsDiv.style.display = 'none';
msDiv.style.display = 'block';
break;
}
}
var updateGraph = function (dom, value) {
var child = dom.appendChild(dom.firstChild);
child.style.height = value + 'px';
}
return {
REVISION: 11,
domElement: container,
setMode: setMode,
begin: function () {
startTime = Date.now();
},
end: function () {
var time = Date.now();
ms = time - startTime;
msMin = Math.min(msMin, ms);
msMax = Math.max(msMax, ms);
msText.textContent = ms + ' MS (' + msMin + '-' + msMax + ')';
updateGraph(msGraph, Math.min(30, 30 - (ms / 200) * 30));
frames++;
if (time > prevTime + 1000) {
fps = Math.round((frames * 1000) / (time - prevTime));
fpsMin = Math.min(fpsMin, fps);
fpsMax = Math.max(fpsMax, fps);
fpsText.textContent = fps + ' FPS (' + fpsMin + '-' + fpsMax + ')';
updateGraph(fpsGraph, Math.min(30, 30 - (fps / 100) * 30));
prevTime = time;
frames = 0;
}
return time;
},
update: function () {
startTime = this.end();
}
}
};
//执行
var stats = new Stats();
stats.domElement.style.position = 'absolute';
stats.domElement.style.top = '0px';
document.body.appendChild(stats.domElement);
aa();
function aa() {
stats.update();
requestAnimationFrame(aa)
}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
const path = require('path');
const config = {
'/ngame/new/datapash': {
data: './json/datapash.json'
}
}
for (let item in config) {
if (config.hasOwnProperty(item))
config[item].path = path.resolve(__dirname, config[item].data);
}
module.exports = config;
\ No newline at end of file
{
"success": true
}
\ No newline at end of file
{
"success": true,
"data":"啊是大"
}
\ No newline at end of file
{
"success": true,
"data": {
"avatar": "string",
"nickName": "我啊是大请问",
"activityId": "string",
"openId": "string",
"inviteId": "string",
"isFollow": true
}
}
\ No newline at end of file
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"isMember": true,
"memberUrl": "https://www.tmall.com"
}
}
\ No newline at end of file
{
"success":true,
"code":"000000",
"message":"成功",
"data":true
}
\ No newline at end of file
{
"success":true,
"code":"000000",
"message":"成功",
"data":true
}
\ No newline at end of file
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"upgradeExp":9000,
"exp": 2000,
"level": 3,
"leftTime": 120,
"endCredits": 20
}
}
\ No newline at end of file
{
"success": true,
"code": "000000",
"message": "成功",
"data": true
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": true
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"startTime": 1590732971345,
"endTime": 1653012000000,
"rule": "活动规则",
"noticeInfo": {
"image": "https://yun.duiba.com.cn/db_games/activity/wengyang/share_1_1.png",
"link": "https://www.tmall.com"
}
}
}
\ No newline at end of file
{
"success":true,
"code":"000000",
"message":"成功",
"data":{
"credits":6666
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"signTotal": 4,
"curDay": 4,
"signPrize": {
"prize2": false,
"prize3": false,
"prize4": false
},
"signStatus": [
{
"day": 1,
"status": true,
"credits": 100
},
{
"day": 2,
"status": false,
"credits": 200
},
{
"day": 3,
"status": true,
"credits": 1
},
{
"day": 4,
"status": true,
"credits": 22
},
{
"day": 5,
"status": false,
"credits": 9999
},
{
"day": 6,
"status": false,
"credits": 600
},
{
"day": 7,
"status": false,
"credits": 700
}
]
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"squirrelType": 3,
"squirrelName": "阿三的",
"level": 3,
"credits": 120,
"exp": 0,
"upgradeExp": 1000,
"feedStatus": {
"leftTime": 0,
"leftCredits": 0,
"endCredits": 36,
"totalTime":120
},
"dress": [
{
"id": "dress1",
"status": 2
}
],
"tools": {
"speedCard": {
"count": 1
}
}
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"taskList": {
"attentionStoreTask": {
"value": 10,
"status": 2
},
"browseTask": {
"type": 1,
"value": 10,
"taskTotal": 3,
"taskCount": 0,
"status": 1
},
"collectTask": {
"type": 2,
"value": 10,
"taskTotal": 3,
"taskCount": 0,
"status": 2
},
"inviteTask": {
"type": 2,
"value": 10,
"taskTotal": 1,
"taskCount": 0,
"status": 3
},
"secretTask": {
"url": "https://www.tmall.com"
},
"messageTask": {
"url": "https://www.tmall.com"
},
"buyTask": {
"url": "https://www.tmall.com"
}
}
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"id": "abc123",
"image": "//yun.duiba.com.cn/images/202003/5d7lemv4ws.jpg",
"name": "奖品名112e1231称",
"type": 1
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"credits": 100
}
}
{
"success":true,
"code":"000000",
"message":"成功",
"data":{
"speedTime":50
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": true
}
{
"success":true,
"code":"000000",
"message":"成功",
"data":null
}
{
"success":true,
"code":"000000",
"message":"成功",
"data":true
}
{
"code": "000000",
"data": {
"image": "https://img.alicdn.com/imgextra/i2/676606897/O1CN01FAbkRm20osGd7qUlz_!!676606897-2-miniprogram.png",
"name": "看i的味道完成",
"id": "5ede07641cea440ff72c816b",
"type": 1
},
"success": true,
"message": "成功"
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"total": 100,
"list": [
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 2,
"message": "动态消息",
"createTime": "1592250649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1512550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1192550649378"
},
{
"value": 10,
"valueStatus": 2,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1292550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 2,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1512554297711"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592552297711"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592554297211"
},
{
"value": 10,
"valueStatus": 2,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592552297711"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592154297711"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592554287711"
},
{
"type": 1,
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592550649378"
},
{
"value": 10,
"valueStatus": 1,
"message": "动态消息",
"createTime": "1592554197711"
},
{
"value": 10,
"valueStatus": 2,
"message": "动态消息",
"createTime": "1592553297711"
}
]
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": {
"needRecordTime": true,
"dress": [
{
"id": "dress1",
"image": "//yun.duiba.com.cn/taobaomini/squirrelAdopt/dress1.png",
"name": "装扮1名称",
"desc": "装扮1描述说明",
"status": 1,
"value": 1111,
"itemId": null,
"type": 1
},
{
"id": "dress2",
"image": "//yun.duiba.com.cn/taobaomini/squirrelAdopt/dress1.png",
"name": "装扮2名称",
"desc": "装扮2描述说明",
"status": 1,
"value": 1000,
"itemId": 1111,
"type": 2
},
{
"id": "dress3",
"image": "//yun.duiba.com.cn/taobaomini/squirrelAdopt/dress1.png",
"name": "装扮3名称",
"desc": "装扮3描述说明",
"status": 1,
"value": 1000,
"itemId": null,
"type": 1
}
],
"tools": [
{
"id": "resignCard",
"name": "补签卡",
"value": 66666,
"count": 11,
"desc": "补签卡描述补签卡描述补签卡描述签卡描述补签卡描述补签卡描述",
"type": 1
},
{
"id": "speedCard",
"name": "加速卡",
"value": 88888,
"count": 111,
"desc": "补签卡描述",
"type": 2
}
]
}
}
{
"success": true,
"code": "000000",
"message": "成功",
"data": true
}
{
"code": "000000",
"data": {
"list": [
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "11",
"name": "兑换奖品1",
"status": 1,
"level": 4,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "23",
"name": "兑换奖",
"status": 2,
"level": 4,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "24563456345",
"name": "兑换奖品1",
"status": 2,
"level": 2,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "111",
"name": "兑品1",
"status": 1,
"level": 1,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "898678",
"name": "奖品1",
"status": 1,
"level": 1,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "645",
"name": "兑换1",
"status": 1,
"level": 1,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "3",
"name": "换奖品1",
"status": 1,
"level": 111,
"desc": "兑换描述"
},
{
"id": "5ea7d803e02b025431aeeb85",
"image": "//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"type": 1,
"credits": "4567678",
"name": "兑换奖品1",
"status": 1,
"level": 1,
"desc": "兑换描述"
}
]
},
"success": true,
"message": "成功"
}
{
"success":true,
"code":"000000",
"message":"成功",
"data":true
}
{
"success":true,
"code":"000000",
"message":"成功",
"data":true
}
This diff is collapsed.
import { destroyWaiting } from "./waitingCtrl";
import { Panel } from "../views/Panel";
import PanelCtrl from "./panelCtrl";
import SceneCtrl from "./sceneCtrl";
import { Scene } from "../views/Scene";
import { destroyToast } from "./toastCtrl";
import IConfirmPanel from "../../src/common/IConfirmPanel";
import ConfirmPanel from "../../src/common/IConfirmPanel";
import panelCtrl from "./panelCtrl";
export { showToast } from "./toastCtrl";
export * from "./waitingCtrl";
/**
* 展示弹框
* @param panel 弹框类
* @param data 数据
*/
export const showPanel = (panel: any, data?: any) => {
return PanelCtrl.instance.show(panel, data)
}
export const showConfirm = (panel: any, data?: any) => {
const confirmPanel: ConfirmPanel = PanelCtrl.instance.show(panel, data);
return confirmPanel.makePromise();
}
/**
* 关闭所有弹框
*/
export const closeAllPanels = () => {
PanelCtrl.instance.closeAll();
}
/**
* 关闭当前弹框
*/
export const closeCurrentPanel = () => {
PanelCtrl.instance.closeCurrent();
}
/**
* 替换场景
* @param scene
* @param data
*/
export const changeScene = (scene: any, data?: any) => {
SceneCtrl.instance.change(scene, data)
}
/**
* 获取当前场景
*/
export function getCurrentScene(): any {
return SceneCtrl.instance.currentScene
}
/**
* 淘宝小程序的alert
* @param {string} title
* @param {string} content
*/
export const showAlert = (title?: string, content?: string) => {
//@ts-ignore
if (my) {
//@ts-ignore
my.alert({
title: title || "",
content: content || ""
});
} else {
console.log(title, content)
}
}
/**
* 替换setTimeout 因为页面销毁时setTimeout不会停
* 所以干脆用Tween的
* @param {Function} callback
* @param {number} time 毫秒计
*/
export function wait(callback: () => void, time: number): {} {
let obj = {};
FYGE.Tween.get(obj)
.wait(time)
.call(callback)
return obj
}
export function clearWait(obj: {}) {
obj && FYGE.Tween.removeTweens(obj);
}
/**
* 递归清除显示对象里面所有的Tween
* @param obj
* @param isRecursive 默认true,递归移除子级
*/
export function removeTweens(obj, isRecursive: boolean = true) {
if (!obj) return
FYGE.Tween.removeTweens(obj);
if (!isRecursive || !obj.children || !obj.children.length) return
obj.children.forEach(child => {
removeTweens(child)
});
}
/**
* 销毁方法
*/
export function destroyAllCtrls() {
destroyToast();
destroyWaiting();
PanelCtrl.instance.destroy();
SceneCtrl.instance.destroy();
}
import { Panel } from "../views/Panel";
import { layers } from "../views/layers";
import { showWaiting, hideWaiting } from "./waitingCtrl";
import { showToast } from "./toastCtrl";
export default class PanelCtrl {
/**
* 父级容器
*/
private _parent: FYGE.Container;
/**
* 半透明黑色背景
*/
private _bg: FYGE.Graphics;
/**
* 所有的弹框
*/
private stacks: Panel[] = [];
private static _instance: PanelCtrl;
static get instance() {
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl())
}
init(parent: FYGE.Container) {
this._parent = parent;
let bg = new FYGE.Graphics();
bg.beginFill(0, 1);
bg.drawRect(//引用适配
layers.stageOffsetX - parent.x,
layers.stageOffsetY - parent.y,
layers.stageWidth,
layers.stageHeight
);
bg.endFill();
bg.visible = false;
this._parent.addChild(bg);
this._bg = bg;
}
/**
* 关闭所有弹框
*/
closeAll() {
this.stacks.forEach(e => e.hidePanel());
}
show<T extends Panel>(cls: any, data?: any): T {
showWaiting()
const panel: T = new cls(data);
this.add(panel);
this.stacks.push(panel);
panel.onLoaded = () => {
hideWaiting();
this.updateView();
//start只执行一边
panel.start(data);
}
//资源加载失败时
panel.onLoadError = () => {
hideWaiting();
showToast("资源加载失败")
panel.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(panel);
}
return panel;
}
private updateView() {
if (!this.stacks.length) {
this._bg.visible = false;
this._current = null;
this._parent.visible = false;
} else {
//显示弹框层
this._parent.visible = true;
//如果首次出现弹框,加个动画
if (this._bg.visible === false) {
this._bg.visible = true;
this._bg.alpha = 0;
FYGE.Tween.removeTweens(this._bg);
FYGE.Tween.get(this._bg).to({ alpha: 0.7 }, 200, FYGE.Ease.cubicOut)
}
}
for (let i = 0; i < this.stacks.length; i++) {
if (i < this.stacks.length - 1) {
this.stacks[i].visible = false;
} else {
this.stacks[i].visible = true;
this.stacks[i].showAni();
this._current = this.stacks[i];
}
}
}
/**
* 添加进父级并添加事件
* @param panel
*/
private add(panel: Panel) {
this._parent.addChild(panel);
panel.addEventListener('onDestroy', this.onPanelHide, this);
}
/**
* 移除
* @param panel
*/
private remove(panel: Panel) {
this._parent.removeChild(panel);
this.stacks = this.stacks.filter(e => e != panel);
}
/**
* 弹框移除时执行
* @param e
*/
private onPanelHide(e: FYGE.Event) {
const panel = e.target as Panel;
panel.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(panel);
this.updateView();
}
//当前弹框
private _current: Panel;
/**
* 关闭当前弹框
*/
closeCurrent() {
if (this._current) {
this._current.hidePanel();
// this._current.removeEventListener('onDestroy', this.onPanelHide, this);
// this.remove(this._current);
// this.updateView();
}
}
destroy() {
PanelCtrl._instance = null;
this.stacks = null;
this._current = null;
this._parent = null;
this._bg.destroy();
this._bg = null;
}
}
\ No newline at end of file
import { Panel } from "../views/Panel";
import { layers } from "../views/layers";
import { showWaiting, hideWaiting } from "./waitingCtrl";
import { showToast } from "./toastCtrl";
export default class PanelCtrl {
/**
* 父级容器
*/
private _parent: FYGE.Container;
/**
* 半透明黑色背景
*/
private _bg: FYGE.Graphics; //FYGE.Shape;
/**
* 所有的弹框
*/
private stacks: Panel[] = [];
private static _instance: PanelCtrl;
static get instance() {
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl())
}
init(parent: FYGE.Container) {
this._parent = parent;
let bg = new FYGE.Graphics()//Shape();
bg.beginFill(0, 1);
bg.drawRect(//引用适配
layers.stageOffsetX - parent.x,
layers.stageOffsetY - parent.y,
layers.stageWidth,
layers.stageHeight
);
bg.endFill();
bg.visible = false;
this._parent.addChild(bg);
this._bg = bg;
}
/**
* 关闭所有弹框
*/
closeAll() {
this.stacks.forEach(e => e.hidePanel());
}
show<T extends Panel>(cls: any, data?: any): T {
showWaiting()
const panel: T = new cls(data);
this.add(panel);
this.stacks.push(panel);
panel.onLoaded = () => {
hideWaiting();
this.updateView(false);//这里更新不显示动画先,自行判断是否显示
//start只执行一边
panel.start(data);
//如果是最后一个才显示动画
if (panel.visible) panel.showAni();
}
//资源加载失败时
panel.onLoadError = () => {
hideWaiting();
showToast("资源加载失败")
panel.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(panel);
}
return panel;
}
private bgAni: "hide" | "show";
private updateView(showPanelAni: boolean = true) {
//没有弹框的时候
if (!this.stacks.length) {
// this._bg.visible = false;
// this._current = null;
// this._parent.visible = false;
if (this._bg.visible) {//原先背景存在时,待测试
this.bgAni = "hide"
FYGE.Tween.removeTweens(this._bg);
FYGE.Tween.get(this._bg)
.to({ alpha: 0 }, 200, FYGE.Ease.cubicOut)
.call(() => {
this._bg.visible = false;
this._current = null;
this._parent.visible = false;
})
}
} else {
//显示弹框层
this._parent.visible = true;
if (this.bgAni == "hide") {//如果正在执行蒙层消失动画,
this.bgAni = "show"
FYGE.Tween.removeTweens(this._bg);
this._bg.alpha = 0.7;
}
//如果首次出现弹框,加个动画
if (this._bg.visible === false) {
this._bg.visible = true;
this._bg.alpha = 0;
FYGE.Tween.get(this._bg).to({ alpha: 0.7 }, 200, FYGE.Ease.cubicOut)
}
}
for (let i = 0; i < this.stacks.length; i++) {
if (i < this.stacks.length - 1) {
this.stacks[i].visible = false;
} else {
this.stacks[i].visible = true;
if (showPanelAni) this.stacks[i].showAni();
this._current = this.stacks[i];
}
}
}
/**
* 添加进父级并添加事件
* @param panel
*/
private add(panel: Panel) {
this._parent.addChild(panel);
panel.addEventListener('onDestroy', this.onPanelHide, this);
}
/**
* 移除
* @param panel
*/
private remove(panel: Panel) {
this._parent.removeChild(panel);
this.stacks = this.stacks.filter(e => e != panel);
}
/**
* 弹框移除时执行
* @param e
*/
private onPanelHide(e: FYGE.Event) {
const panel = e.target as Panel;
panel.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(panel);
this.updateView();
}
//当前弹框
private _current: Panel;
/**
* 关闭当前弹框
*/
closeCurrent() {
if (this._current) {
this._current.hidePanel();
// this._current.removeEventListener('onDestroy', this.onPanelHide, this);
// this.remove(this._current);
// this.updateView();
}
}
destroy() {
PanelCtrl._instance = null;
this.stacks = null;
this._current = null;
this._parent = null;
FYGE.Tween.removeTweens(this._bg);
this._bg = null;
}
}
\ No newline at end of file
import { Scene } from "../views/Scene";
import { showWaiting, hideWaiting } from "./waitingCtrl";
import { showToast } from "./toastCtrl";
export default class SceneCtrl {
private _parent: FYGE.Container;
private _currentScene: Scene;
private static _instance: SceneCtrl;
static get instance() {
return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl())
}
init(parent: FYGE.Container) {
this._parent = parent;
}
change(cls: any, data?: any) {
//如果是同一个场景,考虑是替换还是return
if (this._currentScene && this._currentScene instanceof cls) return;
let scene: Scene = new cls(data);
scene.visible = false;
showWaiting();
let preScene: Scene = this._currentScene;
scene.onLoaded = () => {
hideWaiting();
scene.showAni(() => {
if (preScene) preScene.destroy();
})
scene.visible = true;
//start里可能处理资源信息,所以在onLoaded后执行
scene.start();
}
//加载失败,继续用之前的场景,移除scene
scene.onLoadError = () => {
hideWaiting();
showToast("资源加载失败")
this._currentScene = preScene || null;
this._parent.removeChild(scene);
}
this._currentScene = scene;
this._parent.addChild(scene);
}
get currentScene() {
return this._currentScene
}
destroy() {
SceneCtrl._instance = null;
this._currentScene = null;
this._parent = null;
}
}
\ No newline at end of file
import { layers } from "../views/layers";
import { RES } from "../RES";
let inited = false;
let _toast: Toast;
let _parent: FYGE.Container;
let startY: number
let endY: number
const initToast = () => {
if (!inited) {
inited = true;
_toast = new Toast();
_parent = layers.toastLayer;
_toast.alpha = 0;
_toast.x = layers.stageOffsetX - _parent.x + (layers.stageWidth - _toast.width) / 2;
var h = _toast.height;
var y = layers.stageOffsetY - _parent.y;
startY = y - h;
endY = y + (layers.stageHeight - h) / 2;
}
}
export const showToast = (msg: string) => {
initToast();
_toast.show(msg)
_parent.addChild(_toast);
FYGE.Tween.removeTweens(_toast);
FYGE.Tween.get(_toast)//动画看需求
.set({ y: startY, alpha: 1 })
.to({ y: endY }, 500, FYGE.Ease.quartOut)
.wait(800)
.to({ alpha: 0 }, 300)
.call(() => {
_parent.removeChild(_toast);
})
}
/**
* 对于之前淘宝小程序遇到的问题,需要销毁,否则会出问题
*/
export const destroyToast = () => {
if (inited && _toast && !_toast.destroyed) {
_toast.destroy();
_toast = null;
_parent = null;
inited = false;
}
}
/**
* toast类,不对外导出,适配居中有问题,有时间改
* 自身居中,
*/
class Toast extends FYGE.Container {
msg: FYGE.TextField;
bg: FYGE.Sprite;
PADDING = 40;
constructor() {
super();
this.mouseChildren = false;
this.mouseEnable = false;
var toastBgTexture: FYGE.Texture = RES.getRes("toastBg.png");
this.bg = new FYGE.Sprite(toastBgTexture);
// this.bg.x = (750 - 460) / 2// (layers.stageWidth - this.bg.width) / 2
this.addChild(this.bg);
this.msg = new FYGE.TextField();
this.msg.size = 28;
this.msg.fillColor = "0xffffff";
this.msg.text = "";
this.msg.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
this.msg.textHeight = toastBgTexture.height;
this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
this.addChild(this.msg)
}
/**
* 显示时调用
* @param msg
*/
show(msg: string) {
this.msg.text = msg;
//文本居中适配
this.msg.x = (this.bg.width - this.msg.textWidth) / 2//(layers.stageWidth - this.msg.textWidth) / 2;
//是否需要根据文本宽度缩放背景
// this.bg.width = Math.min(this.msg.textWidth + this.PADDING * 2, 523);
//背景居中适配,由于上面一行注释,那这行就构造函数里只执行一次吧
// this.bg.x = (layers.stageWidth - this.bg.width) / 2
}
destroy() {
super.destroy();
this.msg = null
this.bg = null;
}
}
\ No newline at end of file
import { RES } from "../RES";
import { layers } from "../views/layers";
import { showAlert } from ".";
let inited = false;
let _waiting: Waiting;
let _parent: FYGE.Container
const initWaiting = () => {
if (!inited) {
inited = true;
const waiting = new Waiting();
_parent = layers.topLayer;
_waiting = waiting;
//居中偏移
var offX = (layers.stageWidth - 160/*_waiting.width*/) / 2;
var offY = (layers.stageHeight - _waiting.height) / 2;
//位置适配
_waiting.x = layers.stageOffsetX - _parent.x + offX;
_waiting.y = layers.stageOffsetY - _parent.y + offY;
//阻止事件用
var bg: FYGE.Graphics = new FYGE.Graphics()
.beginFill(0x000000)
.drawRect(-offX, -offY, layers.stageWidth, layers.stageHeight)
.endFill();
bg.alpha = 0;
_waiting.addChildAt(bg, 0);
}
}
/**
* 显示菊花圈
* @param msg 尽量三个字
*/
export const showWaiting = (msg?: string) => {
initWaiting();
_waiting.show(msg)
_parent.addChild(_waiting);
}
/**
* 隐藏菊花圈
*/
export const hideWaiting = () => {
_parent.removeChild(_waiting);
}
export const destroyWaiting = () => {
if (inited && _waiting && !_waiting.destroyed) {
_waiting.destroy();
_waiting = null;
_parent = null;
inited = false;
}
}
/**
* 菊花圈,有机会重写,应该适应所有场景居中
*/
class Waiting extends FYGE.Container {
msg: FYGE.TextField;
constructor() {
super();
//圆角矩形背景
var rectBgTexture: FYGE.Texture = RES.getRes("waitingBg.png")
var rectBg = new FYGE.Sprite(rectBgTexture);
this.addChild(rectBg);
var rotTexture: FYGE.Texture = RES.getRes("waitingRot.png")
let rot = new FYGE.Sprite(rotTexture);
rot.x = (rectBgTexture.width - rotTexture.width) / 2
rot.y = 47//533;
rot.anchorX = rotTexture.width / 2;
rot.anchorY = rotTexture.height / 2;
this.addChild(rot);
let count = 0;
rot.addEventListener(FYGE.Event.ENTER_FRAME, () => {
count++;
if (count % 30 == 0) rot.rotation += 45;
}, this)
this.msg = new FYGE.TextField();
this.msg.y = 125;
this.msg.textWidth = rectBgTexture.width;
this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
this.msg.size = 26
this.msg.fillColor = "#ffffff";
this.addChild(this.msg);
}
show(msg: string = "加载中") {
this.msg.text = msg;
}
destroy() {
super.destroy();
this.msg = null;
}
}
const _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
/**
* base64编码汉字,
* 一般用于链接参数传递,
* 先base64.encode,再encodeURIComponent后带入,取参数时会decodeURIComponent,然后再base64.decode后
* 直接调用Base64.ins
*/
export class Base64 {
// private property
// _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
private static instance: Base64;
public static get ins(): Base64 {
if (!this.instance) {
this.instance = new Base64();
}
return this.instance;
}
constructor() {
}
// public method for encoding
encode(input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
input = this._utf8_encode(input);
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output +
_keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
_keyStr.charAt(enc3) + _keyStr.charAt(enc4);
}
return output;
}
// public method for decoding
decode(input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = _keyStr.indexOf(input.charAt(i++));
enc2 = _keyStr.indexOf(input.charAt(i++));
enc3 = _keyStr.indexOf(input.charAt(i++));
enc4 = _keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = this._utf8_decode(output);
return output;
}
// private method for UTF-8 encoding
private _utf8_encode(string) {
string = string.replace(/\r\n/g, "\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
} else if ((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
} else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
}
// private method for UTF-8 decoding
private _utf8_decode(utftext) {
var string = "";
var i = 0;
var c = 0;
var c2 = 0;
var c3 = 0
while (i < utftext.length) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
} else if ((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i + 1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
} else {
c2 = utftext.charCodeAt(i + 1);
c3 = utftext.charCodeAt(i + 2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}
\ No newline at end of file
/**
* 回收池
*/
export class GPool {
private static pool = {};
/**
* 取出
* @param name
*/
public static takeOut(name: string) {
if (this.pool[name] && this.pool[name].length) {
return this.pool[name].shift();
}
return null;
}
/**
* 回收
* @param name
* @param obj
*/
public static recover(name: string, obj) {
if (!this.pool[name]) {
this.pool[name] = [];
}
this.pool[name].push(obj);
}
}
\ No newline at end of file
/**
* 用到的和业务相关的
* 各种静态方法汇总
*
* 获取修改链接参数
* 获取cookie
* 缓存相关
* 数组相关
*
*/
export class GTool {
/**
* 替换或添加url里的参数
* @param url 修改的url
* @param arg 参数名
* @param arg_val 参数值
*/
public static changeURLArg(url: string, arg: string, arg_val: string | number) {
var pattern = arg + '=([^&]*)';
var replaceText = arg + '=' + arg_val;
if (url.match(pattern)) {
var tmp = '/(' + arg + '=)([^&]*)/gi';
// tmp = url.replace(eval(tmp), replaceText);
tmp = url.replace(new RegExp(tmp), replaceText);
return tmp;
} else {
if (url.match('[\?]')) {
return url + '&' + replaceText;
} else {
return url + '?' + replaceText;
}
}
}
/**
* 读取缓存 用到时重写
*/
public static readCache(key: string/*, type: string = 'localStorage'*/) {
//@ts-ignore
return my ? my.getStorageSync({ key: key }).data : localStorage.getItem(key);
// if (!window.localStorage) {
// return false;
// }
// return window[type].getItem(key);
}
/**
* 写缓存 用到时重写
*/
public static writeCache(key: string, value: any = 'true'/*, type: string = 'localStorage'*/) {
//@ts-ignore
my ? my.setStorageSync({ key: key, data: value }) : localStorage.setItem(key, value);
// if (!window.localStorage) {
// // trace(Func.replace(SysLang.lang_012, [type]));
// return;
// }
// window[type].setItem(key, value);
}
/**
* 获得cacheKey今日次数
* 第二天归0重新计数 用到时重写
* @param cacheKey
*/
public static returnTodayTimes(cacheKey: string): number {
var year1 = this.readCache("year" + cacheKey);
var month1 = this.readCache("month" + cacheKey);
var day1 = this.readCache("day" + cacheKey);
var date = new Date();
var year2 = date.getFullYear().toString();
var month2 = date.getMonth().toString();
var day2 = date.getDate().toString();
if (this.int(year2) <= this.int(year1)) {
if (this.int(month2) <= this.int(month1)) {
if (this.int(day2) <= this.int(day1)) {
return this.int(this.readCache(cacheKey));
}
}
}
//如果不是同一天了,归0
var today = "0";
this.writeCache("year" + cacheKey, year2);
this.writeCache("month" + cacheKey, month2);
this.writeCache("day" + cacheKey, day2);
this.writeCache(cacheKey, today);
return 0;
}
/**
* 随机,两个参数时是数值范围,比如randomT(1,10),一个参数时是数组
* @param e
* @param n
*/
public static randomT(e, n?) {
return e && "number" == typeof e.length && e.length ? e[Math.floor(Math.random() * e.length)] : ("number" != typeof n && (n = e || 1, e = 0), e + Math.random() * (n - e))
}
/**
* 从数组中移除一个元素
* @param e 元素
* @param arr 数组
*/
public static removeEle(e, arr) {
var index = arr.indexOf(e);
if (index >= 0) {
arr.splice(index, 1)
}
}
/**
* 数组中插入一个数值,按顺序的
* 数组是从小到大的
* @param num
* @param arr
*/
public static insert(num, arr) {
for (var i = arr.length - 1; i >= 0; i--) {
if (num > arr[i]) {
//在arr[i]后加num
arr.splice(i + 1, 0, num);
break
}
}
}
/**
* 获取start到end里的n个整数
* @param start 0
* @param end 19
* @param n 3
*/
public static getRandomNumber(start: number, end: number, n: number): number[] {
var arr = [];
for (var i = 0; i < n; i++) {
var number = Math.floor(Math.random() * (end - start + 1) + start);
if (arr.indexOf(number) < 0) {
arr.push(number);
} else {
i--;
}
}
return arr;
}
/**
* 打乱数字数组,改变原数组
* @param arr
*/
public static disturbNumberArr(arr: number[]) {
arr.sort(function () {
return (0.5 - Math.random());
});
}
/**
* 其实打乱数组取前几个就行
* 随机取数组arr中count个元素,不改变原数组
* @param arr
* @param count
*/
public static getRandomArrayElements(arr: any[], count: number) {
var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index;
//如果count大于等于数组长度,返回所有数组
if (min <= 0) return shuffled;
if (count <= 0) return [];
//随机排序,然后取出后面的元素
while (i-- > min) {
index = Math.floor((i + 1) * Math.random());
temp = shuffled[index];
shuffled[index] = shuffled[i];
shuffled[i] = temp;
}
return shuffled.slice(min);
}
/**
* 随机取数组arr中count个元素,原数组减少count个
* @param arr
* @param count
*/
public static getRandomArrayElementsEx(arr: any[], count: number): any[] {
//如果count大于等于数组长度,返回所有数组
if (arr.length <= count) return arr.slice();
if (count <= 0) return [];
var arrCopy = arr.slice();
var outArr = [];
while (count--) {
var rand = Math.floor(Math.random() * arrCopy.length);
var ele = arrCopy.splice(rand, 1)[0];
outArr.push(ele);
}
return outArr
}
/**
* 向下取整,或把字符串执行parseInt(字符串转数字取整数部分)
* @param n 数字或字符串
*/
private static int(n: any): number {
return n >> 0;//~~n
};
/**
* emoji正则式
*/
public static emojiReg = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig
/**
* 在字符串间加空格
* @param str
*/
public static addSpaceInString(str: string) {
if (!str.length || str.length == 1) return str;
var txt = "";
//每个字符后加空格
for (var i = 0; i < str.length - 1; i++) {
txt = txt + str[i] + " ";
}
txt = txt + str[str.length - 1]
return txt
}
/**
* 毫秒剩余时间转成时分秒
* 1小时1分1秒
* @param timeStamp
*/
public static getShiFenMiaoByTimeStamp(timeStamp: number) {
var hours: any = Math.floor((timeStamp % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes: any = Math.floor((timeStamp % (1000 * 60 * 60)) / (1000 * 60));
// var seconds: any = (timeStamp % (1000 * 60)) / 1000;
var seconds: any = Math.floor((timeStamp % (1000 * 60)) / 1000);
hours = hours < 10 ? ('0' + hours) : hours;
minutes = minutes < 10 ? ('0' + minutes) : minutes;
seconds = seconds < 10 && seconds >= 1 ? ('0' + seconds) : seconds;
// return hours + " :" + minutes + " :" + seconds;
return hours + "小时" + minutes + "分" + seconds + "秒";
}
}
\ No newline at end of file
import { RES } from "../RES";
/**
* 暂时用列表的接口
*/
export class Item extends FYGE.Container implements FYGE.IScrollListItem {
get skinName(): string { return null };
constructor(data?) {
super();
if (this.skinName) RES.initSkinDisplay(this, this.skinName, this);
setTimeout(() => { this.initUi(data); })//考虑是否可以不加延时,加了会有问题,自行调用的updateData会先执行
}
/**
* 自定义的初始布局方法
*/
initUi(data?) {
}
/**
* 自行调用的更新数据方法
*/
updateData(data?) {
}
/**
* 滚动列表的数据更新方法
* @param id
* @param data
*/
initData(id: number, data: any): void {
this.resetData();
}
id: number;
data: number;
/**
* 滚动列表ScrollList里专用
* 重置item里属性及显示对象属性的方法,
* 在每次initData会调用
*/
resetData() {
}
}
import { RES } from "../RES";
import { removeTweens } from "../ctrls";
/**
*
*/
export class Module extends FYGE.Container {
protected data: any;
constructor(data?: any) {
super();
this.data = data;
this.init();
}
/**
* 初始化资源和皮肤
*/
private init() {
this.preLoadRes().then(
() => {
//添加皮肤配置
if (this.skinName) RES.initSkinDisplay(this, this.skinName, this);
this.initUi();
this.onLoaded && this.onLoaded();
},
() => {
this.onLoadError && this.onLoadError();
}
);
}
/**
* 提前加载的资源
*/
protected preLoadRes() {
return new Promise((resolve, reject) => {
if (this.groupNames && this.groupNames.length) {
var arr: Promise<any>[] = [];
for (var i = 0; i < this.groupNames.length; i++) {
arr.push(RES.loadGroup(this.groupNames[i]))
}
Promise.all(arr).then(resolve, reject)
} else {
resolve()
}
})
}
/**
* 初始化ui
* 子类修改
*/
protected initUi() {
}
/**
* 资源加载完成后执行,用于场景及弹框控制
*/
onLoaded: () => void
/**
* 资源加载失败时执行,用于场景及弹框控制
*/
onLoadError: () => void;
/**
* 可以有多个组
*/
get groupNames(): string[] { return null }
/**
* 皮肤名字
*/
get skinName(): string { return null };
/**
* 在构造函数后执行
*/
start(data?: any) {
this.initEvents();
}
/**
* 添加事件
*/
initEvents(): void {
}
/**
* 移除事件
*/
removeEvents(): void {
}
/**
* 鼠标事件
* @param enable
*/
protected enableMouseEvt(enable: boolean): void {
this.mouseEnable = enable;
this.mouseChildren = enable;
}
/**
* 延时防连点
* @param target
* @param {number} delay
*/
protected btnDelay(target, delay = 2000) {
target.mouseEnable = false;
target.mouseChildren = false;
setTimeout(()=>{
target.mouseEnable = true;
target.mouseChildren = true;
}, delay);
}
public destroy(): void {
//以防有些地方用了showAni
removeTweens(this);
this.data = null;//看情况吧,有时候hidePanel后用了data,注意
//移除事件
this.removeEvents();
//派发销毁事件,主要用于场景及弹框控制
this.dispatchEvent("onDestroy");
super.destroy();
}
}
import { Module } from "./Module";
export class Panel extends Module {
protected isShowing: boolean
showAni() {
if (this.isShowing) return;
this.isShowing = true;
let oriY = this.y || 0;
this.y = -200;
FYGE.Tween.get(this)
.to({y: oriY}, 500, FYGE.Ease.quartOut)
.call(() => {
this.isShowing = false;
})
}
initEvents() {
this.closeBtns.forEach(
btn => {
if (btn) btn.addEventListener(FYGE.MouseEvent.CLICK, this.hidePanel, this)
}
)
}
removeEvents() {
this.closeBtns.forEach(
btn => {
if (btn) btn.removeEventListener(FYGE.MouseEvent.CLICK, this.hidePanel, this)
}
)
}
/**
* 需要的放入,不重复写关闭按钮事件
*/
protected get closeBtns(): any[] {
return [this['closeBtn']]
}
hidePanel() {
this.destroy();
}
}
import { Module } from "./Module";
export class Scene extends Module {
/**
* 显示动画
* 继承时注意,回调要加
* 因为这种动画基本原场景最好不消失
*/
showAni(callback: Function) {
callback()
}
/**
* 统一更新方法
*/
updateScene() {
}
}
\ No newline at end of file
import PanelCtrl from "../ctrls/panelCtrl";
import SceneCtrl from "../ctrls/sceneCtrl";
/**
* 添加进舞台的所有层级
* 仿白鹭的那套
*/
class Layers extends FYGE.Container {
private _bottomLayer: FYGE.Container;
private _sceneLayer: FYGE.Container;
private _popupLayer: FYGE.Container;
private _toastLayer: FYGE.Container;
private _topLayer: FYGE.Container;
private _shareLayer: FYGE.Container;
init(stage: FYGE.Stage) {
stage.addChild(this);
var arr = [
"_bottomLayer",
"_sceneLayer",
"_popupLayer",
"_toastLayer",
"_topLayer",
"_shareLayer"
];
for (var i = 0; i < arr.length; i++) {
this[arr[i]] = new FYGE.Container();
//有些时候,定宽的时候,部分layer置顶,部分居中,再处理
//为了都置顶和置左,stage的方式永远居中视窗,要么改stage永远左上为00
// this[arr[i]].y = this.stageOffsetY;
//如果定宽这里没必要,肯定是0
// this[arr[i]].x = this.stageOffsetX;//去掉,定高时就居中了
this.addChild(this[arr[i]]);
}
//都以底部适配
this.sceneLayer.y = -this.stageOffsetY;
// this.popupLayer.y = -this.stageOffsetY;
this.popupLayer.y -= 420 / 2;
this.shareLayer.y = -this.stageOffsetY;
//初始化场景层级
SceneCtrl.instance.init(this.sceneLayer)
//初始化弹框层级
PanelCtrl.instance.init(this.popupLayer)
}
/**
* 底图所在层级,比如统一的背景
*/
get bottomLayer() { return this._bottomLayer }
/**
* 场景
*/
get sceneLayer() { return this._sceneLayer }
/**
* 弹框
*/
get popupLayer() { return this._popupLayer }
/**
* toast所在层级
*/
get toastLayer() { return this._toastLayer }
/**
* 顶层,比如统一标题栏等
*/
get topLayer() { return this._topLayer }
/**
* 分享引导层
*/
get shareLayer() { return this._shareLayer }
/**
* 舞台信息都放在layers里吧
* 舞台可见高度,初始化后才能使用
*/
get stageHeight() {
if (!this.stage) return 0;
return this.stage.viewRect.height;
}
/**
* 舞台可见宽度
*/
get stageWidth() {
if (!this.stage) return 0;
return this.stage.viewRect.width;
}
/**
* 适配方式x两边偏移的量,固定宽度x为0
*/
get stageOffsetX() {
if (!this.stage) return 0;
return this.stage.viewRect.x;
}
get stageOffsetY() {
if (!this.stage) return 0;
return this.stage.viewRect.y;
}
/**
* 舞台中心点位置x
*/
// get stageCenterX(): number {
// return this.stage.viewRect.x + this.stage.viewRect.width >> 1;
// }
/**
* 舞台中心点位置y,layer位置做过偏移的就不对了,所以还是自行算吧
*/
// get stageCenterY(): number {
// return this.stage.viewRect.y + this.stage.viewRect.height >> 1;
// }
}
export const layers = new Layers();
//先执行,在淘宝小程序中重新进入会再次初始化
export function destroyLayers() {
//所有层级移除,init会重新建
layers.removeChildren();
//从父级stage移除自己,init会重新加
if (layers.parent) layers.parent.removeChild(layers)
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"name": "tbgame",
"version": "1.0.0",
"description": "",
"main": "index.html",
"devDependencies": {
"ali-oss": "^4.11.4",
"chalk": "^2.3.0",
"co": "^4.6.0",
"del": "^2.2.1",
"fs": "0.0.2",
"imagemin": "^7.0.1",
"imagemin-mozjpeg": "^8.0.0",
"imagemin-pngquant": "^8.0.0",
"mock-webpack-plugin": "^2.0.0",
"path": "^0.12.7",
"progress": "^2.0.0",
"ts-loader": "^4.0.0",
"tslint": "^5.9.1",
"typescript": "^2.7.2",
"webpack": "^4.1.0",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.0",
"webpack-merge": "^4.1.2",
"uglifyjs-webpack-plugin": "^2.1.2",
"psd": "^3.2.0"
},
"dependencies": {},
"scripts": {
"psd": "node scripts/psdH.js && node scripts/flushRes",
"createModule": "node scripts/createModule",
"flushRes": "node scripts/flushRes",
"handleRes": "node scripts/delRel && node scripts/copyRes && node scripts/createTm && node scripts/textureMerge && node scripts/delTm && node scripts/imageMin",
"upload": "node scripts/upload",
"build": "npm run handleRes && node scripts/mergeJson && npm run upload && npm run buildTS",
"watch": "webpack --watch",
"dev": "webpack-dev-server --open --config webpack.dev.js --host 0.0.0.0",
"buildTS": "webpack --config webpack.prod.js && node scripts/mergeJs",
"copyJs": "node scripts/copyJs"
},
"author": "MrKwon",
"license": "ISC"
}
\ No newline at end of file
{
"type": "activity",
"name": "threeSquirrels"
}
\ No newline at end of file
clearWait判断obj是否存在
sendTbNet里 dispatchEvent({ type: "onMessage" }需要放在addEvent之后
taobaomini里的onMessage 里的var app =getApp();
本地缓存方式修改
\ No newline at end of file
{
"groups": [
{
"keys": "comCloseBtn.png,jumpAdBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,立即领取.png",
"name": "common"
},
{
"keys": "guide1.png,guide2.png,guide3.png,guide4.png,guideHand.png,guideKnowBtn.png,nextStep.png",
"name": "guide"
},
{
"keys": "proBg.png,头1.png,头2.png,头3.png,进度条.png",
"name": "loading"
},
{
"keys": "rule1.jpg,rule2.jpg,rule3.jpg,ruleReturnBtn.png",
"name": "rulePanel"
},
{
"keys": "butterfly0.svga,butterfly1.svga,genParticles.svga,xiaojian_a_c.svga,xiaojian_a_f.svga,xiaojian_k_c.svga,xiaojian_k_f.svga,xiaoku_a_c.svga,xiaoku_a_f.svga,xiaoku_k_c.svga,xiaoku_k_f.svga,xiaomei_a_c.svga,xiaomei_a_f.svga,xiaomei_k_c.svga,xiaomei_k_f.svga",
"name": "svgas"
},
{
"keys": "task_bg.png,task_item_bg.png,task_今日签到.png,task_任务完成松子币.png,task_关注店铺.png,task_分享好友.png,task_加入会员.png,task_去完成.png,task_去看看.png,task_完善资料.png,task_已完成.png,task_待领取.png,task_收藏商品.png,task_松鼠密令.png,task_浏览商品.png,task_购买商品.png",
"name": "taskPanel"
},
{
"keys": "jianf_body_1.png,jianf_body_2.png,jianf_body_3.png,jianf_face_3.png,jianf_head_1.png,jianf_head_2.png,jianf_head_3.png,jianf_heye_2.png,jianf_leftHando_1.png,jianf_leftHando_3.png,jianf_leftHand_1.png,jianf_leftHand_3.png,jianf_rightHando_1.png,jianf_rightHando_3.png,jianf_rightHand_1.png,jianf_rightHand_3.png,jian_body_1.png,jian_body_2.png,jian_body_3.png,jian_head_1.png,jian_head_2.png,jian_head_3.png,jian_leftEar_3.png,jian_leftHand0_3.png,jian_leftHando_1.png,jian_leftHand_1.png,jian_leftHand_3.png,jian_rightHand_1.png,jian_rightHand_3.png",
"name": "xiaojianDress"
},
{
"keys": "kuf_bodyo_1.png,kuf_bodyo_2.png,kuf_body_1.png,kuf_body_2.png,kuf_body_3.png,kuf_head_1.png,kuf_head_2.png,kuf_head_3.png,kuf_leftEar_2.png,kuf_rightEar_2.png,kuf_wing_1.png,kuf_wing_2.png,ku_body_1.png,ku_body_2.png,ku_body_3.png,ku_head_1.png,ku_head_2.png,ku_head_3.png,ku_leftHando_2.png,ku_rightHando_2.png,ku_wing_1.png,ku_wing_2.png",
"name": "xiaokuDress"
},
{
"keys": "meif_body_1.png,meif_body_2.png,meif_body_3.png,meif_head_1.png,meif_head_2.png,meif_head_3.png,meif_leftHando_1.png,meif_leftHando_2.png,meif_leftHand_2.png,meif_rightHando_1.png,meif_rightHando_2.png,meif_rightHand_2.png,meif_wing_3.png,mei_body_1.png,mei_body_2.png,mei_body_3.png,mei_face_2.png,mei_face_3.png,mei_head_1.png,mei_head_2.png,mei_head_3.png,mei_leftHand_1.png,mei_leftHand_2.png,mei_leftHand_3.png,mei_rightHand_1.png,mei_rightHand_2.png,mei_rightHand_3.png,mei_wing_3.png",
"name": "xiaomeiDress"
},
{
"keys": "兑换成功背景.png",
"name": "兑换成功弹窗"
},
{
"keys": "我要加入会员按钮.png,松鼠头.png",
"name": "加入会员弹窗"
},
{
"keys": "升级toast.png,升级弹窗背景.png,好的.png,小美.png,小贱.png,小酷.png",
"name": "升级弹窗"
},
{
"keys": "productItemBg.png,商城背景.png,已兑完.png,我的奖品商城.png,无法兑换按钮.png,矩形1669.png,矩形3.png,立即兑换.png,赚松子币商城.png",
"name": "商城弹窗"
},
{
"keys": "跳过按钮.png",
"name": "广告位弹窗"
},
{
"keys": "小美领养状态.png,小贱领养状态.png,小酷领养状态.png,成功领养背景.png",
"name": "成功领养弹窗"
},
{
"keys": "part1.png,part2.png,part3.png,star.png,starP1.png,starP2.png,故事页跳过.png,星星眼睛1.png,星星眼睛3.png",
"name": "故事页"
},
{
"keys": "取消.png,松子币不足背景.png,确认.png",
"name": "松子币不足弹窗"
},
{
"keys": "松鼠动态背景.png,矩形半圆角.png",
"name": "松鼠动态弹窗"
},
{
"keys": "adoptBg.jpg,图层 1487.png,小美card.png,小贱card.png,小酷card.png,立即领养按钮.png,领养页文案.png",
"name": "松鼠领养页"
},
{
"keys": "bubbleBg.png,coin1.png,coin2.png,coin3.png,coin4.png,coin5.png,coin6.png,coin7.png,coin8.png,coinLight.png,noGenLightBg.png,proIcon.png,xiaojianS.png,xiaokuS.png,xiaomeiS.png,任务.png,可收取松子币.png,商店.png,喂食.png,头像底图.png,小游戏.png,未生成松子币toast.png,松子币底图.png,松子币生成背景.png,松鼠动态.png,松鼠攻略.png,每日打卡.png,生成器未解锁.png,生成进度底图.png,秒针.png,背包.png,进食倒计时底图.png,首页背景.jpg",
"name": "活动首页"
},
{
"keys": "再想想.png,确认使用.png,确认使用道具背景.png",
"name": "确认使用道具卡弹窗"
},
{
"keys": "圆角矩形2053.png,所需兑换等级:.png,确认兑换商品按钮.png",
"name": "确认兑换弹窗"
},
{
"keys": "兑换失败toast.png,兑换成功toast.png,确认兑换.png,确认兑换道具弹窗.png",
"name": "确认兑换道具弹窗"
},
{
"keys": "再想想按钮.png,确认为你的小松鼠换上新装扮吗?.png,确认装扮按钮.png",
"name": "确认装扮弹窗"
},
{
"keys": "小美头像.png,小贱头像.png,小酷头像.png,确认领养.png,确认领养弹窗背景.png,重新选择.png",
"name": "确认领养弹窗"
},
{
"keys": "0.png,1.png,2.png,3.png,4.png,5.png,6.png,7.png,8.png,9.png,signItemBg.png,sign_progress_fill.png,周一.png,周三.png,周二.png,周五.png,周六.png,周四.png,周日.png,圆角矩形20533.png,子.png,宝箱点亮.png,宝箱置灰.png,已签到按钮.png,币.png,松.png,立即签到按钮.png,签到完成状态.png,签到背景.png,补签.png",
"name": "签到弹窗"
},
{
"keys": "propItemBg.png,兑换失败toast.png,兑换成功toast.png,兑换成功特殊字体toast.png,加速卡.png,去下单得装扮按钮.png,取消装扮.png,已解锁.png,当前不需要补签哦,留着下次用吧~.png,正在加速生成松子币~.png,正在加速生成松子币中,请稍后再用.png,矩形 2.png,立即使用道具按钮.png,立即兑换装扮按钮.png,立即兑换道具按钮.png,立即装扮按钮.png,背包弹框背景.png,补签卡.png,补签成功toast.png,装扮未选中.png,装扮选中.png,赚松子币.png,道具未选中.png,道具选中.png,锁.png,需要升级才能装扮toast.png",
"name": "背包弹窗"
},
{
"keys": "快去装扮吧.png,解锁装扮背景.png",
"name": "解锁装扮弹窗"
},
{
"keys": "signCredits.png,连续签到背景.png",
"name": "连续签到奖励弹窗"
}
],
"path": "./resource/"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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