Commit 82b0b9a4 authored by wildfirecode's avatar wildfirecode

1

parent cc299faa
module.exports = {
opn: 1,
devPort: 8080,
proxy: {
'/ngapi/*': 'http://localhost:3000',
'/plugin/*': 'http://localhost:3000',
'/ngame/*': 'http://localhost:3000',
'/activityCommon/*': 'http://localhost:3000',
'/ctool/*': 'http://localhost:3000',
'/activityVist/*': 'http://localhost:3000',
'/collectGoods/*': 'http://localhost:3000',
'/activityPlugDrawInfo/*': 'http://localhost:3000',
'/collectRule/*': 'http://localhost:3000',
'/hdtool/*': 'http://localhost:3000',
'/activityPlugin/*': 'http://localhost:3000',
'/summer/*': 'http://localhost:3000'
}
}
\ No newline at end of file
...@@ -25,4 +25,4 @@ node_modules ...@@ -25,4 +25,4 @@ node_modules
bin-release bin-release
.DS_Store .DS_Store
egret/.DS_Store egret/.DS_Store
**/*/.tmproject **/*/.tmproject
\ No newline at end of file
registry = http://npm.dui88.com/
\ No newline at end of file
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080/egret/index.html",
"webRoot": "${workspaceFolder}"
}
]
}
\ 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.
// Type definitions for tween.js r12
// Project: https://github.com/sole/tween.js/
// Definitions by: sunetos <https://github.com/sunetos>, jzarnikov <https://github.com/jzarnikov>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module TWEEN {
export var REVISION: string;
export function getAll(): Tween[];
export function removeAll(): void;
export function add(tween:Tween): void;
export function remove(tween:Tween): void;
export function update(time?:number): boolean;
export class Tween {
constructor(object?:any);
to(properties:any, duration:number): Tween;
start(time?:number): Tween;
stop(): Tween;
delay(amount:number): Tween;
easing(easing: (k: number) => number): Tween;
interpolation(interpolation: (v:number[], k:number) => number): Tween;
chain(...tweens:Tween[]): Tween;
onStart(callback: (object?: any) => void): Tween;
onUpdate(callback: (object?: any) => void): Tween;
onComplete(callback: (object?: any) => void): Tween;
update(time: number): boolean;
repeat(times: number): Tween;
yoyo(enable: boolean): Tween;
}
export var Easing: TweenEasing;
export var Interpolation: TweenInterpolation;
}
interface TweenEasing {
Linear: {
None(k:number): number;
};
Quadratic: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Cubic: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Quartic: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Quintic: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Sinusoidal: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Exponential: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Circular: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Elastic: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Back: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
Bounce: {
In(k:number): number;
Out(k:number): number;
InOut(k:number): number;
};
}
interface TweenInterpolation {
Linear(v:number[], k:number): number;
Bezier(v:number[], k:number): number;
CatmullRom(v:number[], k:number): number;
Utils: {
Linear(p0:number, p1:number, t:number): number;
Bernstein(n:number, i:number): number;
Factorial(n): number;
};
}
// tween.js - http://github.com/sole/tween.js
'use strict';void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});
var TWEEN=TWEEN||function(){var a=[];return{REVISION:"13",getAll:function(){return a},removeAll:function(){a=[]},add:function(c){a.push(c)},remove:function(c){c=a.indexOf(c);-1!==c&&a.splice(c,1)},update:function(c){if(0===a.length)return!1;for(var b=0,c=void 0!==c?c:"undefined"!==typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();b<a.length;)a[b].update(c)?b++:a.splice(b,1);return!0}}}();
TWEEN.Tween=function(a){var c={},b={},d={},e=1E3,g=0,h=!1,j=!1,q=0,m=null,w=TWEEN.Easing.Linear.None,x=TWEEN.Interpolation.Linear,n=[],r=null,s=!1,t=null,u=null,k=null,v;for(v in a)c[v]=parseFloat(a[v],10);this.to=function(a,c){void 0!==c&&(e=c);b=a;return this};this.start=function(e){TWEEN.add(this);j=!0;s=!1;m=void 0!==e?e:"undefined"!==typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();m+=q;for(var f in b){if(b[f]instanceof Array){if(0===
b[f].length)continue;b[f]=[a[f]].concat(b[f])}c[f]=a[f];!1===c[f]instanceof Array&&(c[f]*=1);d[f]=c[f]||0}return this};this.stop=function(){if(!j)return this;TWEEN.remove(this);j=!1;null!==k&&k.call(a);this.stopChainedTweens();return this};this.stopChainedTweens=function(){for(var a=0,b=n.length;a<b;a++)n[a].stop()};this.delay=function(a){q=a;return this};this.repeat=function(a){g=a;return this};this.yoyo=function(a){h=a;return this};this.easing=function(a){w=a;return this};this.interpolation=function(a){x=
a;return this};this.chain=function(){n=arguments;return this};this.onStart=function(a){r=a;return this};this.onUpdate=function(a){t=a;return this};this.onComplete=function(a){u=a;return this};this.onStop=function(a){k=a;return this};this.update=function(p){var f;if(p<m)return!0;!1===s&&(null!==r&&r.call(a),s=!0);var i=(p-m)/e,i=1<i?1:i,j=w(i);for(f in b){var k=c[f]||0,l=b[f];l instanceof Array?a[f]=x(l,j):("string"===typeof l&&(l=k+parseFloat(l,10)),"number"===typeof l&&(a[f]=k+(l-k)*j))}null!==t&&
t.call(a,j);if(1==i)if(0<g){isFinite(g)&&g--;for(f in d)"string"===typeof b[f]&&(d[f]+=parseFloat(b[f],10)),h&&(i=d[f],d[f]=b[f],b[f]=i),c[f]=d[f];m=p+q}else{null!==u&&u.call(a);f=0;for(i=n.length;f<i;f++)n[f].start(p);return!1}return!0}};
TWEEN.Easing={Linear:{None:function(a){return a}},Quadratic:{In:function(a){return a*a},Out:function(a){return a*(2-a)},InOut:function(a){return 1>(a*=2)?0.5*a*a:-0.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return 1>(a*=2)?0.5*a*a*a:0.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return 1>(a*=2)?0.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a*
a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return 1>(a*=2)?0.5*a*a*a*a*a:0.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 1-Math.cos(a*Math.PI/2)},Out:function(a){return Math.sin(a*Math.PI/2)},InOut:function(a){return 0.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:1>(a*=2)?0.5*Math.pow(1024,a-1):0.5*(-Math.pow(2,-10*(a-1))+2)}},Circular:{In:function(a){return 1-
Math.sqrt(1-a*a)},Out:function(a){return Math.sqrt(1- --a*a)},InOut:function(a){return 1>(a*=2)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)}},Elastic:{In:function(a){var c,b=0.1;if(0===a)return 0;if(1===a)return 1;!b||1>b?(b=1,c=0.1):c=0.4*Math.asin(1/b)/(2*Math.PI);return-(b*Math.pow(2,10*(a-=1))*Math.sin((a-c)*2*Math.PI/0.4))},Out:function(a){var c,b=0.1;if(0===a)return 0;if(1===a)return 1;!b||1>b?(b=1,c=0.1):c=0.4*Math.asin(1/b)/(2*Math.PI);return b*Math.pow(2,-10*a)*Math.sin((a-c)*
2*Math.PI/0.4)+1},InOut:function(a){var c,b=0.1;if(0===a)return 0;if(1===a)return 1;!b||1>b?(b=1,c=0.1):c=0.4*Math.asin(1/b)/(2*Math.PI);return 1>(a*=2)?-0.5*b*Math.pow(2,10*(a-=1))*Math.sin((a-c)*2*Math.PI/0.4):0.5*b*Math.pow(2,-10*(a-=1))*Math.sin((a-c)*2*Math.PI/0.4)+1}},Back:{In:function(a){return a*a*(2.70158*a-1.70158)},Out:function(a){return--a*a*(2.70158*a+1.70158)+1},InOut:function(a){return 1>(a*=2)?0.5*a*a*(3.5949095*a-2.5949095):0.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)}},Bounce:{In:function(a){return 1-
TWEEN.Easing.Bounce.Out(1-a)},Out:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375},InOut:function(a){return 0.5>a?0.5*TWEEN.Easing.Bounce.In(2*a):0.5*TWEEN.Easing.Bounce.Out(2*a-1)+0.5}}};
TWEEN.Interpolation={Linear:function(a,c){var b=a.length-1,d=b*c,e=Math.floor(d),g=TWEEN.Interpolation.Utils.Linear;return 0>c?g(a[0],a[1],d):1<c?g(a[b],a[b-1],b-d):g(a[e],a[e+1>b?b:e+1],d-e)},Bezier:function(a,c){var b=0,d=a.length-1,e=Math.pow,g=TWEEN.Interpolation.Utils.Bernstein,h;for(h=0;h<=d;h++)b+=e(1-c,d-h)*e(c,h)*a[h]*g(d,h);return b},CatmullRom:function(a,c){var b=a.length-1,d=b*c,e=Math.floor(d),g=TWEEN.Interpolation.Utils.CatmullRom;return a[0]===a[b]?(0>c&&(e=Math.floor(d=b*(1+c))),g(a[(e-
1+b)%b],a[e],a[(e+1)%b],a[(e+2)%b],d-e)):0>c?a[0]-(g(a[0],a[0],a[1],a[1],-d)-a[0]):1<c?a[b]-(g(a[b],a[b],a[b-1],a[b-1],d-b)-a[b]):g(a[e?e-1:0],a[e],a[b<e+1?b:e+1],a[b<e+2?b:e+2],d-e)},Utils:{Linear:function(a,c,b){return(c-a)*b+a},Bernstein:function(a,c){var b=TWEEN.Interpolation.Utils.Factorial;return b(a)/b(c)/b(a-c)},Factorial:function(){var a=[1];return function(c){var b=1,d;if(a[c])return a[c];for(d=c;1<d;d--)b*=d;return a[c]=b}}(),CatmullRom:function(a,c,b,d,e){var a=0.5*(b-a),d=0.5*(d-c),g=
e*e;return(2*c-2*b+a+d)*e*g+(-3*c+3*b-2*a-d)*g+a*e+c}}};
export default () => window['resPath'] || ''; export default () => resPath || '';
\ No newline at end of file \ No newline at end of file
...@@ -18,14 +18,12 @@ import SceneCtrl from "./ctrls/sceneCtrl"; ...@@ -18,14 +18,12 @@ import SceneCtrl from "./ctrls/sceneCtrl";
import showAlertPanel from "./ctrls/showAlertPanel"; import showAlertPanel from "./ctrls/showAlertPanel";
import { ModuleTypes } from "./types/sceneTypes"; import { ModuleTypes } from "./types/sceneTypes";
import layers from "./views/layers"; import layers from "./views/layers";
import NoPrizePanel from "./components/NoPrizePanel";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
super(); super();
check_webp_feature(); check_webp_feature();
Loading.instace.loadImage(); Loading.instace.loadImage();
console.log(window['CFG'])
DataManager.ins.gameCfgData = window['CFG']; DataManager.ins.gameCfgData = window['CFG'];
DataManager.ins.gameCfgData.gameInfo.gameId = window["gameId"]; DataManager.ins.gameCfgData.gameInfo.gameId = window["gameId"];
this.getData(); this.getData();
...@@ -39,7 +37,6 @@ export default class MainBase extends eui.UILayer { ...@@ -39,7 +37,6 @@ export default class MainBase extends eui.UILayer {
[ModuleTypes.OPTIONS_PANEL, { cls: OptionsPanel }], [ModuleTypes.OPTIONS_PANEL, { cls: OptionsPanel }],
[ModuleTypes.PRIZE_PANEL, { cls: PrizePanel }], [ModuleTypes.PRIZE_PANEL, { cls: PrizePanel }],
[ModuleTypes.RANK_PANEL, { cls: RankPanel }], [ModuleTypes.RANK_PANEL, { cls: RankPanel }],
[ModuleTypes.NOPRIZE_PANEL, { cls: NoPrizePanel }],
]; ];
const scenes = [ const scenes = [
......
export default class Loading extends egret.Sprite { export default class Loading extends egret.Sprite {
private static _parent: eui.UILayer; private static _parent: egret.Sprite;
private static _instance: Loading; private static _instance: Loading;
private static bg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAC0CAYAAAATiCegAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQwIDc5LjE2MDQ1MSwgMjAxNy8wNS8wNi0wMTowODoyMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNCQzYyMjY2QTc2NDExRTg5QTUzRjU2RkQ3RDBDQzhDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNCQzYyMjY3QTc2NDExRTg5QTUzRjU2RkQ3RDBDQzhDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0JDNjIyNjRBNzY0MTFFODlBNTNGNTZGRDdEMENDOEMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0JDNjIyNjVBNzY0MTFFODlBNTNGNTZGRDdEMENDOEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4bbLCYAAACQklEQVR42uzZT0rDQBTA4fwBodssPEO3XiAH6Mqjuip0m2v0DrlBwYlkMJRUU6vzEL4PHlmUuhh+vGawrrY7zM9+fnYVfBrn5zA/j1u+VG8MrxccPwhy+C7EWnhEhth+Ed9rmp3z40FTQ/s0lzTnLQHm+OA3rUbYio/ICFvxERlhs/igdzYU0l9vwGn7vTgXCl5MPrZgY/sRuQVb24/ILdg4ByI1fn6J/Bm2AQnfgP7XS5TOBiR8A4IAESAIEAGCABEgCBABggARIAgQAYIAESAIEAGCABEgCBABggARIAgQAYIAESAIEAGCABEgCBABIkAQIAIEASJAECACBAEiQBAgAgQBIkAQIAIEASJAECACBAEiQBAgAgQBIkAQIAIEASJAECACRIAgQAQIAkSAIEAECAJEgCBABAgCRIAgQAQIAkSAIEAECAJEgCBABAgCRIAgQAQIAkSAIEAECAJEgAgQBIgAQYAIEASIAEGACBAEiABBgAgQBIgAQYAIEASIAEGACBAEiABBgAgQBIgAQYAIEASIAEGACBABggARIAgQAYIAESAIEAGCABEgCBABggARIAgQAYIAESAIkP8V4OgYCDLagIRq0zyl2TsKApxsQMLfAY/eA4l4/5vayxtwcB4UNuQNWNmCRGy/ZYC2IMW3X74FZ+c0Fzdi/thb3n7XAYqQovGtBShCisV3K8BlhM9pds6OBy8cp7X4JvWGP3BI06fpnCV3hjfcCu+eAJchVnOMlSBZCW55wz1u+dK7AAMAr747P8Ezfo0AAAAASUVORK5CYII='; private static bg = 'data:image/png;base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NjVBNzY0MTFFODlBNTNGNTZGRDdEMENDOEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4bbLCYAAACQklEQVR42uzZT0rDQBTA4fwBodssPEO3XiAH6Mqjuip0m2v0DrlBwYlkMJRUU6vzEL4PHlmUuhh+vGawrrY7zM9+fnYVfBrn5zA/j1u+VG8MrxccPwhy+C7EWnhEhth+Ed9rmp3z40FTQ/s0lzTnLQHm+OA3rUbYio/ICFvxERlhs/igdzYU0l9vwGn7vTgXCl5MPrZgY/sRuQVb24/ILdg4ByI1fn6J/Bm2AQnfgP7XS5TOBiR8A4IAESAIEAGCABEgCBABggARIAgQAYIAESAIEAGCABEgCBABggARIAgQAYIAESAIEAGCABEgCBABIkAQIAIEASJAECACBAEiQBAgAgQBIkAQIAIEASJAECACBAEiQBAgAgQBIkAQIAIEASJAECACRIAgQAQIAkSAIEAECAJEgCBABAgCRIAgQAQIAkSAIEAECAJEgCBABAgCRIAgQAQIAkSAIEAECAJEgAgQBIgAQYAIEASIAEGACBAEiABBgAgQBIgAQYAIEASIAEGACBAEiABBgAgQBIgAQYAIEASIAEGACBABggARIAgQAYIAESAIEAGCABEgCBABggARIAgQAYIAESAIkP8V4OgYCDLagIRq0zyl2TsKApxsQMLfAY/eA4l4/5vayxtwcB4UNuQNWNmCRGy/ZYC2IMW3X74FZ+c0Fzdi/thb3n7XAYqQovGtBShCisV3K8BlhM9pds6OBy8cp7X4JvWGP3BI06fpnCV3hjfcCu+eAJchVnOMlSBZCW55wz1u+dK7AAMAr747P8Ezfo0AAAAASUVORK5CYII=';
private static progress = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i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oujxEkQBEFcD0coWTCfAPalvZhlQx/bPEQAQMyyoc8xAQ8hDohZNvQRefGle47l0LbTKdSpFsMaTdfzwejHZ5hpGWMmTwqEJoSU4kxE6jotrJoQUojTiQzahJDslOeESF0TgpZQjUBixQsrJuoXPTokkASSwCsR6NLpFIIfAQYAmaA+/cC+3MAAAAAASUVORK5CYII=';
...@@ -45,21 +45,17 @@ export default class Loading extends egret.Sprite { ...@@ -45,21 +45,17 @@ export default class Loading extends egret.Sprite {
} }
show() { show() {
Loading._parent.visible = true;
Loading._parent.addChild(this); Loading._parent.addChild(this);
this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this); this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
} }
hide() { hide() {
if (this.parent){ if (this.parent)
Loading._parent.visible = false;
Loading._parent.removeChild(this); Loading._parent.removeChild(this);
}
this.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this); this.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
} }
static init(parent: eui.UILayer) { static init(parent: egret.Sprite) {
Loading._parent = parent; Loading._parent = parent;
} }
......
import showLog from "../../new_tw/ctrls/showLog";
import { LotteryType } from "../../tw/enum/LotteryType";
import { DataManager } from "../../tw/manager/DataManager";
import { NetManager } from "../../tw/manager/NetManager";
import Panel from "./Panel";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
export default class NoPrizePanel extends Panel {
get skinKey() { return 'NoPrize' }
start(data) {
this.data = data;
this.scoreTxt.text = `${this.data && this.data.score ? this.data.score : 0}`;
NetManager.ins.getInfo();
}
public closeBtn:eui.Button;
public againBtn:eui.Button;
public scoreTxt:eui.Label;
initEvents() {
super.initEvents();
this.againBtn.once(egret.TouchEvent.TOUCH_TAP, this.onTap_againBtn, this);
this.closeBtn.once(egret.TouchEvent.TOUCH_TAP, this.onTap_closeBtn, this);
}
onTap_againBtn():any{
}
onTap_closeBtn(): any {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}
protected get closeBtns(): eui.Button[] {
return [this['closeBtn']]
}
}
\ No newline at end of file
...@@ -2,19 +2,18 @@ import { ModuleTypes } from "../types/sceneTypes"; ...@@ -2,19 +2,18 @@ import { ModuleTypes } from "../types/sceneTypes";
import Panel from "../components/Panel"; import Panel from "../components/Panel";
import Loading from "../components/Loading"; import Loading from "../components/Loading";
export default class PanelCtrl { export default class PanelCtrl {
private _parent: eui.UILayer; private _parent: egret.Sprite;
private _mask: egret.Sprite; private _mask: egret.Sprite;
static _instance: PanelCtrl; static _instance: PanelCtrl;
static get instance() { static get instance() {
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl()) return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl())
} }
init(parent: eui.UILayer) { init(parent: egret.Sprite) {
this._parent = parent; this._parent = parent;
} }
show(type: ModuleTypes, data?) { show(type: ModuleTypes, data?) {
this._parent.visible = true;
const cls = this._panelClassMap[type]; const cls = this._panelClassMap[type];
const panel: Panel = new cls(data); const panel: Panel = new cls(data);
this.addMask(); this.addMask();
...@@ -68,10 +67,8 @@ export default class PanelCtrl { ...@@ -68,10 +67,8 @@ export default class PanelCtrl {
const tw = egret.Tween.get(panel); const tw = egret.Tween.get(panel);
tw.to({ y: panel.stage.stageHeight }, 300, egret.Ease.quartIn) tw.to({ y: panel.stage.stageHeight }, 300, egret.Ease.quartIn)
.call(() => { .call(() => {
this._parent.removeChild(panel); this._parent.removeChild(panel);
this.removeMask(); this.removeMask();
this._parent.visible =false;
}, this); }, this);
} }
......
...@@ -2,7 +2,7 @@ import { ModuleTypes } from "../types/sceneTypes"; ...@@ -2,7 +2,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import Scene from "../components/Scene"; import Scene from "../components/Scene";
import Loading from "../components/Loading"; import Loading from "../components/Loading";
export default class SceneCtrl { export default class SceneCtrl {
private _parent: eui.UILayer; private _parent: egret.Sprite;
private _currentScene: Scene; private _currentScene: Scene;
private _mask: egret.Sprite; private _mask: egret.Sprite;
...@@ -10,7 +10,7 @@ export default class SceneCtrl { ...@@ -10,7 +10,7 @@ export default class SceneCtrl {
static get instance() { static get instance() {
return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl()) return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl())
} }
init(parent: eui.UILayer) { init(parent: egret.Sprite) {
this._parent = parent; this._parent = parent;
} }
......
...@@ -3,11 +3,9 @@ export enum ModuleTypes { ...@@ -3,11 +3,9 @@ export enum ModuleTypes {
PLAY_SCENE, PLAY_SCENE,
ALERT_PANEL, ALERT_PANEL,
MSG_PANEL,
RULE_PANEL, RULE_PANEL,
HTML_RULE_PANEL, HTML_RULE_PANEL,
OPTIONS_PANEL, OPTIONS_PANEL,
PRIZE_PANEL, PRIZE_PANEL,
RANK_PANEL, RANK_PANEL
NOPRIZE_PANEL
} }
\ No newline at end of file
class Layers extends eui.UILayer { class Layers extends eui.UILayer {
private _topLayer: eui.UILayer; private _topLayer: egret.Sprite;
private _popupLayer: eui.UILayer; private _popupLayer: egret.Sprite;
private _sceneLayer: eui.UILayer; private _sceneLayer: egret.Sprite;
private _bottomLayer: eui.UILayer; private _bottomLayer: egret.Sprite;
init(root: eui.UILayer) { init(root: eui.UILayer) {
root.addChild(this); root.addChild(this);
this._topLayer = new eui.UILayer(); this._topLayer = new egret.Sprite();
this._popupLayer = new eui.UILayer(); this._popupLayer = new egret.Sprite();
this._sceneLayer = new eui.UILayer(); this._sceneLayer = new egret.Sprite();
this._bottomLayer = new eui.UILayer(); this._bottomLayer = new egret.Sprite();
this._topLayer.visible = false;
this._popupLayer.visible = false;
this._bottomLayer.visible = false;
this.addChild(this._bottomLayer); this.addChild(this._bottomLayer);
this.addChild(this._sceneLayer); this.addChild(this._sceneLayer);
this.addChild(this._popupLayer); this.addChild(this._popupLayer);
......
{ {
"type": "activity", "type": "activity",
"name": "gravityBall1.0" "name": "game"
} }
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"alert","version":5,"files":["..\\assets\\alert\\alertbg.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"alert","version":5,"files":["../assets/alert/alertbg.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"options","version":5,"files":["..\\assets\\option\\X-1.png","..\\assets\\option\\prizeBg.png","..\\assets\\option\\line2.png","..\\assets\\option\\line.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"options","version":5,"files":["../assets/option/line2.png","../assets/option/prizeBg.png","../assets/option/X-1.png","../assets/option/line.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"play","version":5,"files":["..\\assets\\playscene\\testbtn.png","..\\assets\\playscene\\音乐开启.png","..\\assets\\playscene\\音乐关闭.png","..\\assets\\playscene\\轮子1.png","..\\assets\\playscene\\火箭.png","..\\assets\\playscene\\火.png","..\\assets\\playscene\\发弹雾气.png","..\\assets\\playscene\\大炮的头.png","..\\assets\\playscene\\大炮板子.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"play","version":5,"files":["../assets/playscene/testbtn.png","../assets/playscene/音乐开启.png","../assets/playscene/音乐关闭.png","../assets/playscene/轮子1.png","../assets/playscene/火箭.png","../assets/playscene/火.png","../assets/playscene/发弹雾气.png","../assets/playscene/大炮的头.png","../assets/playscene/大炮板子.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["..\\assets\\playscene\\+1.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/startScene/e4.png","../assets/startScene/e3.png","../assets/startScene/e2.png","../assets/startScene/e1.png","../assets/startScene/文案.png","../assets/文案.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["..\\assets\\prize\\PrizePanelX.png","..\\assets\\prize\\prizePanelUseBtn.png","..\\assets\\prize\\prizePanelbg.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["../assets/prize/prizePanelbg.png","../assets/prize/PrizePanelX.png","../assets/prize/prizePanelUseBtn.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rank","version":5,"files":["..\\assets\\rank\\userItemBg.png","..\\assets\\rank\\rankTitle.png","..\\assets\\rank\\num3.png","..\\assets\\rank\\num2.png","..\\assets\\rank\\num1.png","..\\assets\\rank\\dog.png","..\\assets\\rank\\commonPanelBg.png","..\\assets\\rank\\closeBtn.png","..\\assets\\rank\\bottomLine.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rank","version":5,"files":["../assets/rank/userItemBg.png","../assets/rank/rankTitle.png","../assets/rank/num3.png","../assets/rank/num2.png","../assets/rank/num1.png","../assets/rank/dog.png","../assets/rank/commonPanelBg.png","../assets/rank/closeBtn.png","../assets/rank/bottomLine.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["..\\assets\\rule\\X.png","..\\assets\\rule\\ruleBg.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["../assets/rule/X.png","../assets/rule/ruleBg.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["..\\assets\\startScene\\start_btn.png","..\\assets\\startScene\\start_btn_gray.png","..\\assets\\startScene\\ruleBtn.png","..\\assets\\startScene\\recordbtn.png","..\\assets\\startScene\\rankBtn.png","..\\assets\\startScene\\optionBtn.png","..\\assets\\startScene\\e4.png","..\\assets\\startScene\\e3.png","..\\assets\\startScene\\e2.png","..\\assets\\startScene\\e1.png","..\\assets\\startScene\\文案.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/optionBtn.png","../assets/startScene/rankBtn.png","../assets/startScene/recordbtn.png","../assets/startScene/ruleBtn.png","../assets/startScene/start_btn_gray.png","../assets/startScene/start_btn.png","../assets/startScene/文案.png","../assets/startScene/e1.png","../assets/startScene/e2.png","../assets/startScene/e3.png","../assets/startScene/e4.png"]}
\ No newline at end of file \ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"waiting","version":5,"files":["..\\assets\\waiting\\bg.png","..\\assets\\waiting\\progress.png"]}
\ No newline at end of file
egret/resource/assets/文案.png

28.1 KB | W: | H:

egret/resource/assets/文案.png

22 KB | W: | H:

egret/resource/assets/文案.png
egret/resource/assets/文案.png
egret/resource/assets/文案.png
egret/resource/assets/文案.png
  • 2-up
  • Swipe
  • Onion skin
{ {
"groups": [ "groups": [
{ {
"keys": "start_btn_png,start_btn_gray_png,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,e4_png,e3_png,e2_png,e1_png", "keys": "optionBtn_png,rankBtn_png,recordbtn_png,ruleBtn_png,start_btn_gray_png,start_btn_png,文案_png,e1_png,e2_png,e3_png,e4_png",
"name": "start" "name": "start"
}, },
{ {
"keys": "X-1_png,prizeBg_png,line2_png,line_png", "keys": "line2_png,prizeBg_png,X-1_png,line_png",
"name": "options" "name": "options"
}, },
{ {
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
"name": "alert" "name": "alert"
}, },
{ {
"keys": "PrizePanelX_png,prizePanelUseBtn_png,prizePanelbg_png", "keys": "prizePanelbg_png,PrizePanelX_png,prizePanelUseBtn_png",
"name": "prize" "name": "prize"
}, },
{ {
"keys": "testbtn_png,playscenebg_jpg,音乐开启_png,音乐关闭_png,轮子1_png,火箭_png,火_png,发弹雾气_png,大炮的头_png,大炮板子_png", "keys": "testbtn_png,音乐开启_png,音乐关闭_png,轮子1_png,火箭_png,火_png,发弹雾气_png,大炮的头_png,大炮板子_png",
"name": "play" "name": "play"
}, },
{ {
...@@ -27,30 +27,38 @@ ...@@ -27,30 +27,38 @@
{ {
"keys": "X_png,ruleBg_png", "keys": "X_png,ruleBg_png",
"name": "rule" "name": "rule"
}
],
"resources": [
{
"url": "assets/rule/X.png",
"type": "image",
"name": "X_png"
}, },
{ {
"keys": "bg_png,progress_png", "url": "assets/rule/ruleBg.png",
"name": "waiting" "type": "image",
"name": "ruleBg_png"
}, },
{ {
"keys": "startSceneBg_jpg,+1_png,againBtn_png,gameOverBg_png,gameOverCloseBtn_png,gameOverTitle_png", "url": "assets/startScene/optionBtn.png",
"name": "preload" "type": "image",
"name": "optionBtn_png"
}, },
{ {
"keys": "againBtn_png,gameOverBg_png,gameOverCloseBtn_png,gameOverTitle_png", "url": "assets/startScene/ruleBtn.png",
"name": "noPrize" "type": "image",
} "name": "ruleBtn_png"
], },
"resources": [
{ {
"url": "assets/文案.png", "url": "assets/option/line2.png",
"type": "image", "type": "image",
"name": "文案_png" "name": "line2_png"
}, },
{ {
"url": "assets/alert/alertbg.png", "url": "assets/option/prizeBg.png",
"type": "image", "type": "image",
"name": "alertbg_png" "name": "prizeBg_png"
}, },
{ {
"url": "assets/option/X-1.png", "url": "assets/option/X-1.png",
...@@ -63,24 +71,39 @@ ...@@ -63,24 +71,39 @@
"name": "line_png" "name": "line_png"
}, },
{ {
"url": "assets/option/line2.png", "url": "assets/alert/alertbg.png",
"type": "image", "type": "image",
"name": "line2_png" "name": "alertbg_png"
}, },
{ {
"url": "assets/option/prizeBg.png", "url": "assets/prize/prizePanelbg.png",
"type": "image", "type": "image",
"name": "prizeBg_png" "name": "prizePanelbg_png"
}, },
{ {
"url": "assets/playscene/playscenebg.jpg", "url": "assets/prize/PrizePanelX.png",
"type": "image", "type": "image",
"name": "playscenebg_jpg" "name": "PrizePanelX_png"
}, },
{ {
"url": "assets/playscene/testbtn.png", "url": "assets/prize/prizePanelUseBtn.png",
"type": "image", "type": "image",
"name": "testbtn_png" "name": "prizePanelUseBtn_png"
},
{
"url": "assets/startScene/start_btn_gray.png",
"type": "image",
"name": "start_btn_gray_png"
},
{
"url": "assets/startScene/start_btn.png",
"type": "image",
"name": "start_btn_png"
},
{
"url": "assets/startScene/recordbtn.png",
"type": "image",
"name": "recordbtn_png"
}, },
{ {
"url": "assets/playscene/发弹雾气.png", "url": "assets/playscene/发弹雾气.png",
...@@ -123,40 +146,20 @@ ...@@ -123,40 +146,20 @@
"name": "音乐开启_png" "name": "音乐开启_png"
}, },
{ {
"url": "assets/prize/PrizePanelX.png", "url": "assets/startScene/rankBtn.png",
"type": "image",
"name": "PrizePanelX_png"
},
{
"url": "assets/prize/prizePanelUseBtn.png",
"type": "image",
"name": "prizePanelUseBtn_png"
},
{
"url": "assets/prize/prizePanelbg.png",
"type": "image", "type": "image",
"name": "prizePanelbg_png" "name": "rankBtn_png"
}, },
{ {
"url": "assets/rank/bottomLine.png", "url": "assets/rank/bottomLine.png",
"type": "image", "type": "image",
"name": "bottomLine_png" "name": "bottomLine_png"
}, },
{
"url": "assets/rank/closeBtn.png",
"type": "image",
"name": "closeBtn_png"
},
{ {
"url": "assets/rank/commonPanelBg.png", "url": "assets/rank/commonPanelBg.png",
"type": "image", "type": "image",
"name": "commonPanelBg_png" "name": "commonPanelBg_png"
}, },
{
"url": "assets/rank/dog.png",
"type": "image",
"name": "dog_png"
},
{ {
"url": "assets/rank/num1.png", "url": "assets/rank/num1.png",
"type": "image", "type": "image",
...@@ -183,39 +186,24 @@ ...@@ -183,39 +186,24 @@
"name": "userItemBg_png" "name": "userItemBg_png"
}, },
{ {
"url": "assets/rule/X.png", "url": "assets/rank/closeBtn.png",
"type": "image",
"name": "X_png"
},
{
"url": "assets/rule/ruleBg.png",
"type": "image",
"name": "ruleBg_png"
},
{
"url": "assets/waiting/bg.png",
"type": "image",
"name": "bg_png"
},
{
"url": "assets/waiting/progress.png",
"type": "image", "type": "image",
"name": "progress_png" "name": "closeBtn_png"
}, },
{ {
"url": "assets/startScene/e1.png", "url": "assets/rank/dog.png",
"type": "image", "type": "image",
"name": "e1_png" "name": "dog_png"
}, },
{ {
"url": "assets/startScene/e2.png", "url": "assets/playscene/testbtn.png",
"type": "image", "type": "image",
"name": "e2_png" "name": "testbtn_png"
}, },
{ {
"url": "assets/startScene/e3.png", "url": "assets/playscene/playscenebg.jpg",
"type": "image", "type": "image",
"name": "e3_png" "name": "playscenebg_jpg"
}, },
{ {
"url": "assets/startScene/e4.png", "url": "assets/startScene/e4.png",
...@@ -223,64 +211,29 @@ ...@@ -223,64 +211,29 @@
"name": "e4_png" "name": "e4_png"
}, },
{ {
"url": "assets/startScene/optionBtn.png", "url": "assets/startScene/e3.png",
"type": "image",
"name": "optionBtn_png"
},
{
"url": "assets/startScene/rankBtn.png",
"type": "image",
"name": "rankBtn_png"
},
{
"url": "assets/startScene/recordbtn.png",
"type": "image",
"name": "recordbtn_png"
},
{
"url": "assets/startScene/ruleBtn.png",
"type": "image",
"name": "ruleBtn_png"
},
{
"url": "assets/startScene/start_btn.png",
"type": "image",
"name": "start_btn_png"
},
{
"url": "assets/startScene/start_btn_gray.png",
"type": "image",
"name": "start_btn_gray_png"
},
{
"url": "assets/startSceneBg.jpg",
"type": "image",
"name": "startSceneBg_jpg"
},
{
"url": "assets/playscene/+1.png",
"type": "image", "type": "image",
"name": "+1_png" "name": "e3_png"
}, },
{ {
"url": "assets/gameover/againBtn.png", "url": "assets/startScene/e2.png",
"type": "image", "type": "image",
"name": "againBtn_png" "name": "e2_png"
}, },
{ {
"url": "assets/gameover/gameOverBg.png", "url": "assets/startScene/e1.png",
"type": "image", "type": "image",
"name": "gameOverBg_png" "name": "e1_png"
}, },
{ {
"url": "assets/gameover/gameOverCloseBtn.png", "url": "assets/startScene/文案.png",
"type": "image", "type": "image",
"name": "gameOverCloseBtn_png" "name": "文案_png"
}, },
{ {
"url": "assets/gameover/gameOverTitle.png", "url": "assets/startScene/startscenebg.jpg",
"type": "image", "type": "image",
"name": "gameOverTitle_png" "name": "startscenebg_jpg"
} }
] ]
} }
\ No newline at end of file
{ {
"skins": {}, "skins": {},
"autoGenerateExmlsList": true, "autoGenerateExmlsList": true,
"exmls": [ "exmls": [
"resource/skins/AlertSkin.exml", "resource/skins/AlertSkin.exml",
"resource/skins/OptionItemSkin.exml", "resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml", "resource/skins/OptionsSkin.exml",
"resource/skins/NoPrizeSkin.exml", "resource/skins/PlaySkin.exml",
"resource/skins/PlaySkin.exml", "resource/skins/PrizeSkin.exml",
"resource/skins/PrizeSkin.exml", "resource/skins/RankItemSkin.exml",
"resource/skins/RankItemSkin.exml", "resource/skins/RankSkin.exml",
"resource/skins/RankSkin.exml", "resource/skins/RuleSkin.exml",
"resource/skins/RuleSkin.exml", "resource/skins/StartSkin.exml",
"resource/skins/StartSkin.exml", "resource/skins/VScrollBarSkin.exml"
"resource/skins/VScrollBarSkin.exml", ],
"resource/skins/component/ResultPanel.exml", "path": "resource/default.thm.json"
"resource/skins/component/VirtualJoystickSkin.exml",
"resource/skins/component/WheelBg.exml",
"resource/skins/component/WheelGift.exml",
"resource/skins/ui/IconButtonSkin.exml",
"resource/skins/ui/ProgressBarSkin.exml",
"resource/skins/ui/StartButtonSkin.exml"
],
"path": "resource/default.thm.json"
} }
\ No newline at end of file
This diff is collapsed.
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
# (assimp v3.1.187496374)
newmtl %%%DEFAULT
Kd 0.3 0.3 0.3
Ka 0 0 0
Ks 0 0 0
Ke 0 0 0
d 1
illum 1
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="NoPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect id="mask0" width="750" height="1624" fillAlpha="0.3" top="0" x="0"/>
<e:Image id="bg" source="gameOverBg_png" horizontalCenter="0" verticalCenter="0"/>
<e:Button id="closeBtn" label="" y="1006.79" skinName="ui.IconButtonSkin" icon="gameOverCloseBtn_png" horizontalCenter="0.5" anchorOffsetX="25.76" anchorOffsetY="24.24"/>
<e:Image id="title" source="gameOverTitle_png" y="490" horizontalCenter="0.5"/>
<e:Button id="againBtn" label="" y="828.7" skinName="ui.IconButtonSkin" icon="againBtn_png" anchorOffsetX="165.15" anchorOffsetY="51.52" horizontalCenter="0"/>
<e:Label id="scoreTxt" text="55" y="603" textColor="0xf2a235" fontFamily="Microsoft YaHei" bold="true" size="140" verticalAlign="middle" horizontalCenter="0.5"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="PlaySkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" > <e:Skin class="PlaySkin" width="750" height="1663" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Button id="testBtn" label="点击出奖" y="409" scaleX="1" scaleY="1" horizontalCenter="18.5">
<e:Rect id="touchPlane" width="750" height="1624" x="0" y="0" fillColor="0x000000" fillAlpha="0" strokeAlpha="0"/> <e:skinName>
<e:Label id="scoreTxt" text="0" size="100" fontFamily="Microsoft YaHei" top="50" horizontalCenter="0"/> <e:Skin states="up,down,disabled">
<e:Image id="scoreTip" source="+1_png" anchorOffsetX="45" anchorOffsetY="36" alpha="0" horizontalCenter="0" y="604"/> <e:Image width="100%" height="100%" source="testbtn_png" source.down="testbtn_png" source.disabled="testbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group x="0" top="20" width="100%">
<e:Group y="0" right="20">
<e:Button id="musicon" label="" x="0" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="音乐开启_png" source.down="音乐开启_png" source.disabled="音乐开启_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="musicoff" label="">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="音乐关闭_png" source.down="音乐关闭_png" source.disabled="音乐关闭_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Group x="201" y="0">
<e:Image source="火_png" x="0" y="0"/>
<e:Label text="20%" x="41" y="0" verticalAlign="middle" textAlign="center" width="96" height="100%" fontFamily="Helvetica"/>
</e:Group>
<e:Group x="22" top="0">
<e:Image source="火箭_png" left="0" top="0"/>
<e:Label text="10" x="41" verticalCenter="0" height="100%" verticalAlign="middle" textAlign="center" width="96" fontFamily="Helvetica"/>
</e:Group>
<e:Label id="score" text="123456789" y="63" verticalAlign="middle" textAlign="center" width="100%" size="65" bold="true" fontFamily="Helvetica"/>
</e:Group>
<e:Group id="car" x="329" width="93" verticalCenter="357">
<e:Image source="大炮板子_png" y="125" anchorOffsetX="46.5" x="46.5"/>
<e:Image source="大炮的头_png" y="51" anchorOffsetX="35" width="70" horizontalCenter="0"/>
<e:Image id="lunzi1" source="轮子1_png" anchorOffsetX="22.5" anchorOffsetY="22.5" x="10" y="142.5"/>
<e:Image id="lunzi2" source="轮子1_png" anchorOffsetX="22.5" anchorOffsetY="22.5" x="82" y="142.5"/>
<e:Image id="fireEffect" source="发弹雾气_png" y="29" horizontalCenter="0"/>
</e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
<e:Image id="title" y="268.69" horizontalCenter="1.5" source="rankTitle_png"/> <e:Image id="title" y="268.69" horizontalCenter="1.5" source="rankTitle_png"/>
<e:Image id="dog" source="dog_png" x="440" y="169"/>
<e:Label id="rankNum" text="排名" x="112" y="375" textColor="0x000000" bold="true" fontFamily="Microsoft YaHei" anchorOffsetX="0" width="162" textAlign="center"/> <e:Label id="rankNum" text="排名" x="112" y="375" textColor="0x000000" bold="true" fontFamily="Microsoft YaHei" anchorOffsetX="0" width="162" textAlign="center"/>
<e:Label id="userIdtxt" text="用户" x="274" y="375" textColor="0x000000" bold="true" fontFamily="Microsoft YaHei" anchorOffsetX="0" width="200" textAlign="center"/> <e:Label id="userIdtxt" text="用户" x="274" y="375" textColor="0x000000" bold="true" fontFamily="Microsoft YaHei" anchorOffsetX="0" width="200" textAlign="center"/>
<e:Label id="scoretxt" text="分数" x="474" y="375" textColor="0x000000" bold="true" fontFamily="Microsoft YaHei" anchorOffsetX="0" width="164" textAlign="center"/> <e:Label id="scoretxt" text="分数" x="474" y="375" textColor="0x000000" bold="true" fontFamily="Microsoft YaHei" anchorOffsetX="0" width="164" textAlign="center"/>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StartSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="StartSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16705cb4eec"/> <w:Config id="16705cb4eec"/>
<e:Image id="bg" source="startSceneBg_jpg" bottom="0" horizontalCenter="0"/>
<e:Group id="elements" horizontalCenter="0" verticalCenter="-172" height="664" width="756"> <e:Group id="elements" horizontalCenter="0" verticalCenter="-172" height="664" width="756">
<e:Image id="e1" source="e1_png" x="154.5" y="124" anchorOffsetX="38" anchorOffsetY="35.5"/> <e:Image id="e1" source="e1_png" x="154.5" y="124" anchorOffsetX="38" anchorOffsetY="35.5"/>
<e:Image id="e2" source="e2_png" x="756" y="531.5" anchorOffsetX="122" anchorOffsetY="131.5"/> <e:Image id="e2" source="e2_png" x="756" y="531.5" anchorOffsetX="122" anchorOffsetY="131.5"/>
...@@ -9,7 +8,7 @@ ...@@ -9,7 +8,7 @@
<e:Image id="e4" source="e4_png" x="0" y="436.5" anchorOffsetY="69.5"/> <e:Image id="e4" source="e4_png" x="0" y="436.5" anchorOffsetY="69.5"/>
<e:Image id="logo" source="文案_png" x="378" y="266" anchorOffsetX="221.5" anchorOffsetY="145.5"/> <e:Image id="logo" source="文案_png" x="378" y="266" anchorOffsetX="221.5" anchorOffsetY="145.5"/>
</e:Group> </e:Group>
<e:Group horizontalCenter="0.5" bottom="120"> <e:Group horizontalCenter="0" verticalCenter="32">
<e:Button id="startBtn" label="" scaleX="1" scaleY="1" anchorOffsetX="152.5" anchorOffsetY="49.5" y="108.21" horizontalCenter="0"> <e:Button id="startBtn" label="" scaleX="1" scaleY="1" anchorOffsetX="152.5" anchorOffsetY="49.5" y="108.21" horizontalCenter="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
...@@ -21,8 +20,8 @@ ...@@ -21,8 +20,8 @@
<e:Label id="countTxt" text="1/1" width="100%" verticalAlign="middle" textAlign="center" y="183.39" horizontalCenter="0"/> <e:Label id="countTxt" text="1/1" width="100%" verticalAlign="middle" textAlign="center" y="183.39" horizontalCenter="0"/>
<e:Label id="countdownTxt" text="" width="100%" verticalAlign="middle" textAlign="center" y="0" horizontalCenter="0"/> <e:Label id="countdownTxt" text="" width="100%" verticalAlign="middle" textAlign="center" y="0" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:Label id="exemptionTxt" text="*兑换项与活动均与设备制造商Apple Inc.公司无关*" width="100%" horizontalCenter="0" bottom="20" <e:Label id="exemptionTxt" text="*兑换项与活动均与设备制造商Apple Inc.公司无关*" width="100%" horizontalCenter="0" bottom="5"
verticalAlign="middle" textAlign="center" size="18" textColor="0xc6c6c6"/> verticalAlign="middle" textAlign="center" textColor="0x333333" size="18" />
<e:Button id="recordBtn" label="奖品记录" y="16" scaleX="1" scaleY="1" right="23"> <e:Button id="recordBtn" label="奖品记录" y="16" scaleX="1" scaleY="1" right="23">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="component.ResultPanel" width="378" height="164" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="bg" source="earnPanel_png" x="0" y="0"/>
<e:Label id="credits" text="0" x="41.5" y="65" size="64" anchorOffsetX="0" width="292" textAlign="center"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="VirtualJoystickSkin" width="150" height="150" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="joystickBg" source="joystickBg_png" width="150" height="150" anchorOffsetX="75" anchorOffsetY="75" verticalCenter="0" horizontalCenter="0"/>
<e:Image id="joystickBall" width="80" height="80" anchorOffsetX="0" anchorOffsetY="0" x="35" y="35" source="joystickBall_png"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="WheelBg" width="603" height="603" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="wheelBg" source="wheelBg2_png" anchorOffsetX="301.5" anchorOffsetY="301.5" left="0" top="0"/>
<e:Image source="gift_png" x="176.5" y="76.5" rotation="-22.5"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="WheelGift" width="92" height="300" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="gift" source="gift_png" y="61" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ui.IconButtonSkin" xmlns:e="http://ns.egret.com/eui" xmlns:ns1="*" states="up,down,disabled" >
<e:Image id="iconDisplay" source="" horizontalCenter="0" verticalCenter="0" scaleX.down="0.95" scaleY.down="0.95"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ui.ProgressBarSkin" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="thumb" source="loading_progress_thumb" x="3" y="3"/>
<e:Image id="track" source="loading_progress_track" scale9Grid="16,13,2,2" width="404"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ui.StartButtonSkin" xmlns:e="http://ns.egret.com/eui" xmlns:ns1="*" states="up,down,disabled,wating" >
<e:Image id="iconDisplay" source="" horizontalCenter="0" verticalCenter="0" scaleX.down="0.95" scaleY.down="0.95"/>
<e:Image source="startBtnBg_png" includeIn="wating" x="0" y="0"/>
<e:Image source="wating_png" includeIn="wating" horizontalCenter="0" verticalCenter="23.5"/>
<e:Image source="startBtnBg_png" includeIn="disabled" x="0" y="0"/>
<e:Image source="go_png" includeIn="disabled" x="62" y="143"/>
<e:Image source="startBtnBg_png" includeIn="down" x="0" y="0" scaleX="0.95" scaleY="0.95"/>
<e:Image source="go_png" includeIn="down" horizontalCenter="0.5" verticalCenter="25.5" scaleX="0.95" scaleY="0.95"/>
<e:Image source="startBtnBg_png" includeIn="up" horizontalCenter="0" verticalCenter="0"/>
<e:Image source="go_png" includeIn="up" horizontalCenter="0.5" verticalCenter="25.5"/>
</e:Skin>
\ No newline at end of file
import { NetManager } from './../libs/tw/manager/NetManager';
import { ModuleTypes } from './../libs/new_wx/types/sceneTypes';
import StartScene from "./startScene/StartScene"; import StartScene from "./startScene/StartScene";
import PlayScene from "./playScene/PlayScene"; import PlayScene from "./playScene/PlayScene";
import MainBase from "../libs/new_wx/MainBase"; import MainBase from "../libs/new_wx/MainBase";
import PanelCtrl from '../libs/new_wx/ctrls/panelCtrl';
import SceneCtrl from '../libs/new_wx/ctrls/sceneCtrl';
import showAlertPanel from '../libs/new_wx/ctrls/showAlertPanel';
import ExNoPrizePanel from './NoPrizePanel/ExNoPrizePanel';
import RankPanel from '../libs/new_wx/components/RankPanel';
import PrizePanel from '../libs/new_wx/components/PrizePanel';
import OptionsPanel from '../libs/new_wx/components/OptionsPanel';
import HTMLRulePanel from '../libs/new_wx/components/HTMLRulePanel';
import RulePanel from '../libs/new_wx/components/RulePanel';
import Alert from '../libs/new_wx/components/Alert';
class Main extends MainBase { class Main extends MainBase {
protected get startSceneConfig() { protected get startSceneConfig() {
...@@ -21,30 +9,6 @@ class Main extends MainBase { ...@@ -21,30 +9,6 @@ class Main extends MainBase {
protected get playSceneConfig() { protected get playSceneConfig() {
return { cls: PlayScene } return { cls: PlayScene }
} }
protected registerModules() {
const panels = [
[ModuleTypes.ALERT_PANEL, { cls: Alert }],
[ModuleTypes.RULE_PANEL, { cls: RulePanel }],
[ModuleTypes.HTML_RULE_PANEL, { cls: HTMLRulePanel }],
[ModuleTypes.OPTIONS_PANEL, { cls: OptionsPanel }],
[ModuleTypes.PRIZE_PANEL, { cls: PrizePanel }],
[ModuleTypes.RANK_PANEL, { cls: RankPanel }],
[ModuleTypes.NOPRIZE_PANEL, { cls: ExNoPrizePanel }],
];
const scenes = [
[ModuleTypes.START_SCENE, this.startSceneConfig],
[ModuleTypes.PLAY_SCENE, this.playSceneConfig]
];
panels.forEach(item => PanelCtrl.instance.registerPanel(item[0], item[1]));
scenes.forEach(item => SceneCtrl.instance.registerScene(item[0], item[1]));
NetManager.ins.onNotSuccess = (msg) => {
showAlertPanel(msg)
}
}
} }
......
import { DataManager } from './../../libs/tw/manager/DataManager';
import { NetManager } from './../../libs/tw/manager/NetManager';
import NoPrizePanel from "../../libs/new_wx/components/NoPrizePanel";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import PanelCtrl from '../../libs/new_wx/ctrls/panelCtrl';
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
export default class ExNoPrziePanel extends NoPrizePanel {
onTap_againBtn(){
this.againBtn.touchEnabled = false;
if(DataManager.ins.getInfoData.status.code == 3){
// 参与次数已用完
let data = {msg:`今日次数已用完\n明日再来吧~`, type:'err'}
PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, data)
return;
}else if(DataManager.ins.getInfoData.status.code == 2){
// 积分不足
let data = {msg:`积分不足\n去赚积分吧`, type:'creditsOut'}
PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, data)
return;
}else if(DataManager.ins.getInfoData.status.code == 1){
// 未登录
let data = {msg:`未登录账号\n请先登录`, type:'requirelogin'}
PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, data)
return;
}else{
this.doStart(this.doStartResult.bind(this),false)
}
}
public doStart(callback: Function, isAgain = false, credits?: number, customizedType?: number): void {
if(window['requirelogin']) {
window['requirelogin']();
return;
}
NetManager.ins.doStart((success: boolean) => {
if(success) {
this.getStartOrderStatus(callback, customizedType);
} else {
callback(success);
}
},
isAgain,
credits,
customizedType);
}
private getStartOrderStatus(callback: Function, customizedType?: number): void {
NetManager.ins.getStartStatus(
callback,
DataManager.ins.doStartData.ticketId,
() => { return DataManager.ins.getStartStatusData.code == 0; },
5,
customizedType);
}
// 开始的回调
private doStartResult(success:boolean){
if(!success) {
return;
}
PanelCtrl.instance.closeCurrent();
setTimeout(() => {
SceneCtrl.instance.change(ModuleTypes.PLAY_SCENE);
this.againBtn.touchEnabled = true;
}, 1000);
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
import StartSceneBase from "../../libs/new_wx/components/StartSceneBase"; import StartSceneBase from "../../libs/new_wx/components/StartSceneBase";
import prePlayScene from "../playScene/prePlayScene";
export default class StartScene extends StartSceneBase { export default class StartScene extends StartSceneBase {
async start(){
super.start();
if(!prePlayScene.instance.canvasWebgl){
prePlayScene.instance.initScene();
}
}
} }
\ No newline at end of file
{
"defaultSeverity": "error",
"extends": [
// "tslint:recommended"
],
"jsRules": {},
"rules": {
"only-arrow-functions": true,
"no-namespace": true,
"no-var-keyword": true,
"prefer-const": true,
"no-conditional-assignment": true,
"prefer-for-of": true,
"no-inferrable-types": true,
// "no-magic-numbers": true,
"cyclomatic-complexity": true
},
"rulesDirectory": []
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment