Commit 2e30037d by tianpan1

首次提交

parent 08e61c0e
File added
declare namespace particle {
class ParticleSystem extends egret.DisplayObject {
/**
* @private
*/
protected _emitterX: number;
protected _emitterY: number;
private _emitterBounds;
/**
* 相对当前显示对象坐标系下的内容边界
* @private
*/
protected relativeContentBounds: egret.Rectangle;
/**
* 表示粒子出现总时间,单位毫秒,取值范围(0,Number.MAX_VALUE],-1表示无限时间
* @member {number} particle.ParticleSystem#emissionTime
* @default -1
*/
emissionTime: number;
/**
* 表示粒子出现间隔,单位毫秒,取值范围(0,Number.MAX_VALUE]
* @member {number} particle.ParticleSystem#emissionRate
*/
emissionRate: number;
/**
* 表示粒子所使用的纹理
* @member {egret.Texture} particle.ParticleSystem#texture
*/
texture: egret.Texture;
/**
* 表示粒子系统最大粒子数,超过该数量将不会继续创建粒子,取值范围[1,Number.MAX_VALUE]
* @member {number} particle.ParticleSystem#maxParticles
* @default 200
*/
maxParticles: number;
/**
* 表示粒子类,如果设置创建粒子时将创建该类
* @member {number} particle.ParticleSystem#particleClass
*/
particleClass: any;
$particleConfig: any;
constructor(texture: egret.Texture, emissionRate: number);
initConfig(emissionRate: number, emitterX: number, emitterY: number): void;
protected createWebAssemblyNode(): void;
/**
* 开始创建粒子
* @param duration {number} 粒子出现总时间
*/
start(duration?: number): void;
stop(clear?: boolean): void;
setCurrentParticles(num: number): void;
onPropertyChanges(): void;
/**
* 表示粒子出现点X坐标,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.ParticleSystem#emitterX
* @default 0
*/
emitterX: number;
/**
* 表示粒子出现点Y坐标,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.ParticleSystem#emitterY
* @default 0
*/
emitterY: number;
/**
* 更新当前显示对象坐标系下的边框界限
* @param emitterRect {egret.Rectangle} 相对发射点坐标系下的界限
*/
private updateRelativeBounds(emitterRect);
/**
* 表示当前粒子系统中发射粒子的渲染边界范围,使用以发射点为基准的坐标系
* @member {egret.Rectangle} particle.ParticleSystem#emitterBounds
*/
emitterBounds: egret.Rectangle;
changeTexture(texture: egret.Texture): void;
}
}
declare namespace particle {
class GravityParticleSystem extends ParticleSystem {
/**
* 表示粒子初始坐标 x 差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#emitterXVariance
*/
private emitterXVariance;
/**
* 表示粒子初始坐标 y 差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#emitterYVariance
*/
private emitterYVariance;
/**
* 表示粒子存活时间,单位毫秒,取值范围(0,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#lifespan
*/
private lifespan;
/**
* 表示粒子存活时间差值,单位毫秒,取值范围(0,Number.MAX_VALUE]且不大于 lifespan
* @member {number} particle.GravityParticleSystem#lifespanVariance
*/
private lifespanVariance;
/**
* 表示粒子出现时大小,取值范围(0,Number.MAX_VALUE],粒子将会在存活时间内由 startSize 慢慢变为 endSize
* @member {number} particle.GravityParticleSystem#startSize
*/
private startSize;
/**
* 表示粒子出现时大小差值,取值范围(0,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#startSizeVariance
*/
private startSizeVariance;
/**
* 表示粒子消失时大小,取值范围(0,Number.MAX_VALUE],粒子将会在存活时间内由 startSize慢慢变为 endSize
* @member {number} particle.GravityParticleSystem#endSize
*/
private endSize;
/**
* 表示粒子消失时大小差值,取值范围(0,Number.MAX_VALUE],且不大于endSize
* @member {number} particle.GravityParticleSystem#endSizeVariance
*/
private endSizeVariance;
/**
* 表示粒子出现时的角度,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#emitAngle
*/
private emitAngle;
/**
* 表示粒子出现时的角度差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#emitAngleVariance
*/
private emitAngleVariance;
/**
* 表示粒子出现时旋转值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE],粒子将会在存活时间内由 startRotation 慢慢变为 endRotation
* @member {number} particle.GravityParticleSystem#startRotation
*/
private startRotation;
/**
* 表示粒子出现时旋转值差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#startRotationVariance
*/
private startRotationVariance;
/**
* 表示粒子消失时旋转值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE],粒子将会在存活时间内由 startRotation 慢慢变为 endRotation
* @member {number} particle.GravityParticleSystem#endRotation
*/
private endRotation;
/**
* 表示粒子消失时旋转值差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#endRotationVariance
*/
private endRotationVariance;
/**
* 表示粒子出现时速度,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#speed
*/
private speed;
/**
* 表示粒子出现时速度差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#speedVariance
*/
private speedVariance;
/**
* 表示粒子水平重力,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#gravityX
*/
private gravityX;
/**
* 表示粒子垂直重力,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#gravityX
*/
private gravityY;
/**
* 表示粒子径向加速度,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#radialAcceleration
*/
private radialAcceleration;
/**
* 表示粒子径向加速度差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#radialAccelerationVariance
*/
private radialAccelerationVariance;
/**
* 表示粒子切向加速度,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#tangentialAcceleration
*/
private tangentialAcceleration;
/**
* 表示粒子切向加速度差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#tangentialAccelerationVariance
*/
private tangentialAccelerationVariance;
/**
* 表示粒子出现时的 Alpha 透明度值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE],粒子将会在存活时间内由 startAlpha 慢慢变为 endAlpha
* @member {number} particle.GravityParticleSystem#startAlpha
*/
private startAlpha;
/**
* 表示粒子出现时的 Alpha 透明度差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#startAlphaVariance
*/
private startAlphaVariance;
/**
* 表示粒子消失时的 Alpha 透明度值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE],粒子将会在存活时间内由 startAlpha 慢慢变为 endAlpha
* @member {number} particle.GravityParticleSystem#endAlpha
*/
private endAlpha;
/**
* 表示粒子消失时的 Alpha 透明度差值,取值范围[-Number.MAX_VALUE,Number.MAX_VALUE]
* @member {number} particle.GravityParticleSystem#endAlphaVariance
*/
private endAlphaVariance;
/**
* 表示粒子使用的混合模式
* @member {number} particle.GravityParticleSystem#blendMode
*/
private particleBlendMode;
/**
* 是否完成解析json数据
*/
private $init;
constructor(texture: egret.Texture, config: any);
start(duration?: number): void;
setCurrentParticles(num: number): void;
onPropertyChanges(): void;
private $parseConfig(config);
}
}
var __reflect=this&&this.__reflect||function(t,e,i){t.__class__=e,i?i.push(e):i=[e],t.__types__=t.__types__?i.concat(t.__types__):i},__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),particle;!function(t){var e=function(t){function e(e,i){var n=t.call(this)||this;return n._emitterX=0,n._emitterY=0,n.emissionTime=-1,n.maxParticles=200,n.particleClass=null,n.$particleConfig=null,n.initConfig(i,0,0),n.changeTexture(e),n}return __extends(e,t),e.prototype.initConfig=function(t,e,i){this.$particleConfig=[t,e,i,0,200],this.emissionRate=t,this._emitterX=e,this._emitterY=i},e.prototype.createWebAssemblyNode=function(){this.$waNode=new egret.WebAssemblyNode(10)},e.prototype.start=function(t){void 0===t&&(t=-1),0!=this.emissionRate&&(this.emissionTime=t),this.$particleConfig[3]=t,this.$waNode.setCustomData(this.$particleConfig)},e.prototype.stop=function(t){void 0===t&&(t=!1),this.$waNode.setStopToParticle(t)},e.prototype.setCurrentParticles=function(t){t>=this.maxParticles},e.prototype.onPropertyChanges=function(){this.$waNode.setCustomData(this.$particleConfig)},Object.defineProperty(e.prototype,"emitterX",{get:function(){return this._emitterX},set:function(t){this._emitterX=t,this.updateRelativeBounds(this.emitterBounds),this.onPropertyChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"emitterY",{get:function(){return this._emitterY},set:function(t){this._emitterY=t,this.updateRelativeBounds(this.emitterBounds),this.onPropertyChanges()},enumerable:!0,configurable:!0}),e.prototype.updateRelativeBounds=function(t){t?(null==this.relativeContentBounds&&(this.relativeContentBounds=new egret.Rectangle),this.relativeContentBounds.copyFrom(t),this.relativeContentBounds.x+=this.emitterX,this.relativeContentBounds.y+=this.emitterY):this.relativeContentBounds=null},Object.defineProperty(e.prototype,"emitterBounds",{get:function(){return this._emitterBounds},set:function(t){this._emitterBounds=t,this.updateRelativeBounds(t),this.onPropertyChanges()},enumerable:!0,configurable:!0}),e.prototype.changeTexture=function(t){this.texture!=t&&(this.texture=t,this.$waNode.setBitmapDataToParticle(t))},e}(egret.DisplayObject);t.ParticleSystem=e,__reflect(e.prototype,"particle.ParticleSystem")}(particle||(particle={}));var particle;!function(t){var e=function(t){function e(e,i){var n=t.call(this,e,200)||this;return n.particleBlendMode=0,n.$init=!1,n.$parseConfig(i),n.emissionRate=n.lifespan/n.maxParticles,n.$init=!0,n}return __extends(e,t),e.prototype.start=function(t){void 0===t&&(t=-1),0!=this.emissionRate&&(this.emissionTime=t),this.$particleConfig[2]=t;var e=[],i=0;for(var n in this.$particleConfig)e.push(i++),e.push(this.$particleConfig[n]);this.$waNode.setCustomData(e)},e.prototype.setCurrentParticles=function(t){if(!(t>this.maxParticles)){var e=[];e.push(35),e.push(t),this.$waNode.setCustomData(e)}},e.prototype.onPropertyChanges=function(){if(0!=this.$init){var t=[];t.push(0),this.$particleConfig[0]=this._emitterX,t.push(this._emitterX),t.push(1),this.$particleConfig[1]=this._emitterY,t.push(this._emitterY),this.relativeContentBounds&&(t.push(31),this.$particleConfig[31]=this.relativeContentBounds.x,t.push(this.relativeContentBounds.x),t.push(32),this.$particleConfig[32]=this.relativeContentBounds.y,t.push(this.relativeContentBounds.y),t.push(33),this.$particleConfig[33]=this.relativeContentBounds.width,t.push(this.relativeContentBounds.width),t.push(34),this.$particleConfig[34]=this.relativeContentBounds.height,t.push(this.relativeContentBounds.height)),this.$waNode.setCustomData(t)}},e.prototype.$parseConfig=function(t){function e(t){return"undefined"==typeof t?0:t}if(this._emitterX=e(t.emitter.x),this._emitterY=e(t.emitter.y),this.emitterXVariance=e(t.emitterVariance.x),this.emitterYVariance=e(t.emitterVariance.y),this.gravityX=e(t.gravity.x),this.gravityY=e(t.gravity.y),1==t.useEmitterRect){var i=new egret.Rectangle;i.x=e(t.emitterRect.x),i.y=e(t.emitterRect.y),i.width=e(t.emitterRect.width),i.height=e(t.emitterRect.height),this.emitterBounds=i}this.maxParticles=e(t.maxParticles),this.speed=e(t.speed),this.speedVariance=e(t.speedVariance),this.lifespan=Math.max(.01,e(t.lifespan)),this.lifespanVariance=e(t.lifespanVariance),this.emitAngle=e(t.emitAngle),this.emitAngleVariance=e(t.emitAngleVariance),this.startSize=e(t.startSize),this.startSizeVariance=e(t.startSizeVariance),this.endSize=e(t.endSize),this.endSizeVariance=e(t.endSizeVariance),this.startRotation=e(t.startRotation),this.startRotationVariance=e(t.startRotationVariance),this.endRotation=e(t.endRotation),this.endRotationVariance=e(t.endRotationVariance),this.radialAcceleration=e(t.radialAcceleration),this.radialAccelerationVariance=e(t.radialAccelerationVariance),this.tangentialAcceleration=e(t.tangentialAcceleration),this.tangentialAccelerationVariance=e(t.tangentialAccelerationVariance),this.startAlpha=e(t.startAlpha),this.startAlphaVariance=e(t.startAlphaVariance),this.endAlpha=e(t.endAlpha),this.endAlphaVariance=e(t.endAlphaVariance),t.blendMode&&(this.particleBlendMode=t.blendMode),this.$particleConfig={0:this.emitterX,1:this.emitterY,2:-1,3:this.maxParticles,4:this.emitterXVariance,5:this.emitterYVariance,6:this.gravityX,7:this.gravityY,8:this.speed,9:this.speedVariance,10:this.lifespan,11:this.lifespanVariance,12:this.emitAngle,13:this.emitAngleVariance,14:this.startSize,15:this.startSizeVariance,16:this.endSize,17:this.endSizeVariance,18:this.startRotation,19:this.startRotationVariance,20:this.endRotation,21:this.endRotationVariance,22:this.radialAcceleration,23:this.radialAccelerationVariance,24:this.tangentialAcceleration,25:this.tangentialAccelerationVariance,26:this.startAlpha,27:this.startAlphaVariance,28:this.endAlpha,29:this.endAlphaVariance,30:this.particleBlendMode,31:t.useEmitterRect?this.relativeContentBounds.x:0,32:t.useEmitterRect?this.relativeContentBounds.y:0,33:t.useEmitterRect?this.relativeContentBounds.width:0,34:t.useEmitterRect?this.relativeContentBounds.height:0,35:0}},e}(t.ParticleSystem);t.GravityParticleSystem=e,__reflect(e.prototype,"particle.GravityParticleSystem")}(particle||(particle={}));
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "egret",
"version": "2.5.0"
}
\ No newline at end of file
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
module particle {
export class GravityParticle extends Particle {
public startX:number;
public startY:number;
public velocityX:number;
public velocityY:number;
public radialAcceleration:number;
public tangentialAcceleration:number;
public rotationDelta:number;
public scaleDelta:number;
public alphaDelta:number;
public reset():void {
super.reset();
this.startX = 0;
this.startY = 0;
this.velocityX = 0;
this.velocityY = 0;
this.radialAcceleration = 0;
this.tangentialAcceleration = 0;
this.rotationDelta = 0;
this.scaleDelta = 0;
}
}
}
\ No newline at end of file
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
module particle {
export class Particle {
/**
* 表示 Particle 实例相对于父级本地坐标的 x 坐标。
* @member {number} particle.Particle#x
*/
public x:number;
/**
* 表示粒子实例相对于父级本地坐标的 y 坐标。
* @member {number} particle.Particle#y
*/
public y:number;
/**
* 表示从注册点开始应用的对象的缩放比例(百分比)。
* @member {number} particle.Particle#scale
* @default 1
*/
public scale:number;
/**
* 表示 Particle 实例距其原始方向的旋转程度,以度为单位
* @member {number} particle.Particle#rotation
* @default 0
*/
public rotation:number;
/**
* 表示粒子的 Alpha 透明度值
* @member {number} particle.Particle#alpha
* @default 1
*/
public alpha:number;
/**
* 表示粒子当前存活时间,以毫秒为单位,取值范围(0,Number.MAX_VALUE],该值超过 totalTime 时,粒子将会被销毁
* @member {number} particle.Particle#currentTime
* @default 0
*/
public currentTime:number;
/**
* 表示粒子的存活总时间,以毫秒为单位,取值范围(0,Number.MAX_VALUE]
* @member {number} particle.Particle#totalTime
* @default 1000
*/
public totalTime:number;
/**
* 表示粒子的混合模式
* @member {number} particle.Particle#blendMode
*/
public blendMode:number;
constructor() {
this.reset();
}
public reset():void {
this.x = 0;
this.y = 0;
this.scale = 1;
this.rotation = 0;
this.alpha = 1;
this.currentTime = 0;
this.totalTime = 1000;
}
private matrix:egret.Matrix = new egret.Matrix();
public $getMatrix(regX:number, regY:number):egret.Matrix {
var matrix = this.matrix;
matrix.identity();
if (this.rotation % 360) {
var r = this.rotation;
var cos = egret.NumberUtils.cos(r);
var sin = egret.NumberUtils.sin(r);
} else {
cos = 1;
sin = 0;
}
matrix.append(cos * this.scale, sin * this.scale, -sin * this.scale, cos * this.scale, this.x, this.y);
if (regX || regY) {
matrix.tx -= regX * matrix.a + regY * matrix.c;
matrix.ty -= regX * matrix.b + regY * matrix.d;
}
return matrix;
}
}
}
\ No newline at end of file
{
"compilerOptions": {
"target": "es5",
"outFile": "bin/particle/particle.js",
"declaration": true
},
"files": [
"libs/egret.d.ts",
"libs/game.d.ts",
"src/Particle.ts",
"src/ParticleSystem.ts",
"src/GravityParticle.ts",
"src/GravityParticleSystem.ts"
]
}
\ No newline at end of file
{
"15f27f9b1ef": {
"guideLinesEnabled": true,
"backgroundType": "user",
"backgroundColor": "#110d0d",
"backgroundAlpha": "90",
"guideLines": [
{
"type": "h",
"pos": -13.333
}
]
}
}
\ No newline at end of file
{
"version": "0.2.0",
"configurations": [
{
"name": "Wing 内置播放器调试",
"type": "chrome",
"request": "launch",
"file": "index.html",
"runtimeExecutable": "${execPath}",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"port":5221
},
{
"name": "使用本机 Chrome 调试",
"type": "chrome",
"request": "launch",
"file": "index.html",
"useBuildInServer": true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"preLaunchTask":"build",
"userDataDir":"${tmpdir}",
"port":5221
}
]
}
\ No newline at end of file
{
"search.exclude": {
"**/bin-debug": true,
"**/bin-release": true
}
}
\ No newline at end of file
{
"version": "0.1.0",
"command": "egret",
"isShellCommand": true,
"suppressTaskName": true,
"tasks": [
{
"taskName": "build",
"showOutput": "always",
"args": [
"build",
"-sourcemap"
],
"problemMatcher": "$tsc"
},
{
"taskName": "clean",
"showOutput": "always",
"args": [
"build",
"-e"
],
"problemMatcher": "$tsc"
},
{
"taskName": "publish",
"showOutput": "always",
"args": [
"publish"
],
"problemMatcher": "$tsc"
}
]
}
\ No newline at end of file
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var AssetAdapter = (function () {
function AssetAdapter() {
}
/**
* @language zh_CN
* 解析素材
* @param source 待解析的新素材标识符
* @param compFunc 解析完成回调函数,示例:callBack(content:any,source:string):void;
* @param thisObject callBack的 this 引用
*/
AssetAdapter.prototype.getAsset = function (source, compFunc, thisObject) {
function onGetRes(data) {
compFunc.call(thisObject, data, source);
}
if (RES.hasRes(source)) {
var data = RES.getRes(source);
if (data) {
onGetRes(data);
}
else {
RES.getResAsync(source, onGetRes, this);
}
}
else {
RES.getResByUrl(source, onGetRes, this, RES.ResourceItem.TYPE_IMAGE);
}
};
return AssetAdapter;
}());
__reflect(AssetAdapter.prototype, "AssetAdapter", ["eui.IAssetAdapter"]);
//# sourceMappingURL=AssetAdapter.js.map
\ No newline at end of file
{"version":3,"file":"AssetAdapter.js","sourceRoot":"","sources":["../src/AssetAdapter.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,EAAE;AACF,iDAAiD;AACjD,wBAAwB;AACxB,sEAAsE;AACtE,+EAA+E;AAC/E,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,0EAA0E;AAC1E,4EAA4E;AAC5E,6EAA6E;AAC7E,8CAA8C;AAC9C,6EAA6E;AAC7E,8EAA8E;AAC9E,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,wEAAwE;AACxE,gFAAgF;AAChF,sDAAsD;AACtD,EAAE;AACF,sFAAsF;;;;AAGtF;IAAA;IAyBA,CAAC;IAxBG;;;;;;OAMG;IACI,+BAAQ,GAAf,UAAgB,MAAc,EAAE,QAAiB,EAAE,UAAe;QAC9D,kBAAkB,IAAS;YACvB,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;QACD,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC9B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACP,QAAQ,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;YACD,IAAI,CAAC,CAAC;gBACF,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5C,CAAC;QACL,CAAC;QACD,IAAI,CAAC,CAAC;YACF,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;IACL,mBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBK,UAAA,YAAY,kDAyBjB,CAAA"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Background = (function (_super) {
__extends(Background, _super);
function Background() {
var _this = _super.call(this) || this;
_this._touchStatus = false; //当前触摸状态,按下时,值为true
_this._distance = new egret.Point(); //鼠标点击时,鼠标全局坐标与people的位置差
//加载背景
_this.skinName = "resource/skin/StartPanel.exml";
_this.addEventListener(egret.Event.COMPLETE, _this.onAddToStage, _this);
return _this;
//创建一个计时器对象
// var timer:egret.Timer = new egret.Timer(30,0);
// //注册事件侦听器
// timer.addEventListener(egret.TimerEvent.TIMER,this.timerFunc,this);
// timer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.timerComFunc,this);
// //开始计时
// timer.start();
// this.keyDown();
}
Background.prototype.onAddToStage = function (event) {
this.people = new People();
this.addChild(this.people);
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.clickBtn, this);
//设置显示对象可以相应触摸事件
this.people.touchEnabled = true;
//注册事件
this.people.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.mouseDown, this);
this.people.addEventListener(egret.TouchEvent.TOUCH_END, this.mouseUp, this);
};
Background.prototype.clickBtn = function (ev) {
this.removeChild(this.btn);
this.removeChild(this.title);
this.score.visible = false;
// this.addChild(this.people);
this.people.y = this.stage.stageHeight - this.people.height / 2 - 10;
this.people.x = (this.stage.stageWidth - this.people.width) / 2 + 80;
this.people.scaleX = 0.5;
this.people.scaleY = 0.5;
};
Background.prototype.mouseDown = function (evt) {
console.log("Mouse Down.");
this._touchStatus = true;
this._distance.x = evt.stageX - this.people.x;
this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE, this.mouseMove, this);
};
Background.prototype.mouseMove = function (evt) {
if (this._touchStatus) {
console.log("moving now ! Mouse: [X:" + evt.stageX + ",Y:" + evt.stageY + "]");
this.people.x = evt.stageX - this._distance.x;
console.log(this.people.x);
if (this.people.x < -20) {
this.people.x = -20;
}
else if (this.people.x > 520) {
this.people.x = 520;
}
}
};
Background.prototype.mouseUp = function (evt) {
console.log("Mouse Up.");
this._touchStatus = false;
this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE, this.mouseMove, this);
};
return Background;
}(eui.Component));
__reflect(Background.prototype, "Background");
//# sourceMappingURL=Background.js.map
\ No newline at end of file
{"version":3,"file":"Background.js","sourceRoot":"","sources":["../src/Background.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;IAAyB,8BAAa;IAKlC;QAAA,YACI,iBAAO,SAaV;QAwBM,kBAAY,GAAW,KAAK,CAAC,C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CAAA,CAAC;gBACvB,IAAI,CAAC,MAAM,CAAC,CAAC,GAAC,CAAC,EAAE,CAAA;YACjB,CAAC;YAAA,IAAI,CAAC,EAAE,CAAA,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAC,GAAG,CAAC,CAAA,CAAC;gBAC5B,IAAI,CAAC,MAAM,CAAC,CAAC,GAAC,GAAG,CAAC;YAClB,CAAC;QACL,CAAC;IACL,CAAC;IAEO,4BAAO,GAAf,UAAgB,GAAoB;QAEhC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC;IA0CL,iBAAC;AAAD,CAAC,AApHD,CAAyB,GAAG,CAAC,SAAS,GAoHrC;AApHK,UAAA,UAAU,yBAoHf,CAAA"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var LoadingUI = (function (_super) {
__extends(LoadingUI, _super);
function LoadingUI() {
var _this = _super.call(this) || this;
_this.createView();
return _this;
}
LoadingUI.prototype.createView = function () {
this.textField = new egret.TextField();
this.addChild(this.textField);
this.textField.y = 300;
this.textField.width = 480;
this.textField.height = 100;
this.textField.textAlign = "center";
};
LoadingUI.prototype.setProgress = function (current, total) {
this.textField.text = "Loading..." + current + "/" + total;
};
return LoadingUI;
}(egret.Sprite));
__reflect(LoadingUI.prototype, "LoadingUI");
//# sourceMappingURL=LoadingUI.js.map
\ No newline at end of file
{"version":3,"file":"LoadingUI.js","sourceRoot":"","sources":["../src/LoadingUI.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA;IAAwB,6BAAY;IAEhC;QAAA,YACI,iBAAO,SAEV;QADG,KAAI,CAAC,UAAU,EAAE,CAAC;;IACtB,CAAC;IAIO,8BAAU,GAAlB;QACI,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC;QAC3B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,GAAG,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,QAAQ,CAAC;IACxC,CAAC;IAEM,+BAAW,GAAlB,UAAmB,OAAc,EAAE,KAAY;QAC3C,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,eAAa,OAAO,SAAI,KAAO,CAAC;IAC1D,CAAC;IACL,gBAAC;AAAD,CAAC,AArBD,CAAwB,KAAK,CAAC,MAAM,GAqBnC;AArBK,UAAA,SAAS,wBAqBd,CAAA"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Main = (function (_super) {
__extends(Main, _super);
function Main() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.isThemeLoadEnd = false;
_this.isResourceLoadEnd = false;
return _this;
// protected startCreateScene():void{
/**实例化背景对象**/
// var bg = new Bg();
// /**将背景对象显示添加到舞台上**/
// this.addChild(bg);
// }
}
Main.prototype.createChildren = function () {
_super.prototype.createChildren.call(this);
//inject the custom material parser
//注入自定义的素材解析器
var assetAdapter = new AssetAdapter();
egret.registerImplementation("eui.IAssetAdapter", assetAdapter);
egret.registerImplementation("eui.IThemeAdapter", new ThemeAdapter());
//Config loading process interface
//设置加载进度界面
this.loadingView = new LoadingUI();
this.stage.addChild(this.loadingView);
// initialize the Resource loading library
//初始化Resource资源加载库
RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this);
RES.loadConfig("resource/default.res.json", "resource/");
};
/**
* 配置文件加载完成,开始预加载皮肤主题资源和preload资源组。
* Loading of configuration file is complete, start to pre-load the theme configuration file and the preload resource group
*/
Main.prototype.onConfigComplete = function (event) {
RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this);
// load skin theme configuration file, you can manually modify the file. And replace the default skin.
//加载皮肤主题配置文件,可以手动修改这个文件。替换默认皮肤。
var theme = new eui.Theme("resource/default.thm.json", this.stage);
theme.addEventListener(eui.UIEvent.COMPLETE, this.onThemeLoadComplete, this);
RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this);
RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this);
RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this);
RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, this.onItemLoadError, this);
RES.loadGroup("preload");
};
/**
* 主题文件加载完成,开始预加载
* Loading of theme configuration file is complete, start to pre-load the
*/
Main.prototype.onThemeLoadComplete = function () {
this.isThemeLoadEnd = true;
this.createScene();
};
/**
* preload资源组加载完成
* preload resource group is loaded
*/
Main.prototype.onResourceLoadComplete = function (event) {
if (event.groupName == "preload") {
this.stage.removeChild(this.loadingView);
RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this);
RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, this.onItemLoadError, this);
this.isResourceLoadEnd = true;
this.createScene();
}
};
Main.prototype.createScene = function () {
if (this.isThemeLoadEnd && this.isResourceLoadEnd) {
// this.startCreateScene();
var gameContainer = new game.GameContainer();
console.log(gameContainer);
this.addChild(gameContainer);
}
};
/**
* 资源组加载出错
* The resource group loading failed
*/
Main.prototype.onItemLoadError = function (event) {
console.warn("Url:" + event.resItem.url + " has failed to load");
};
/**
* 资源组加载出错
* Resource group loading failed
*/
Main.prototype.onResourceLoadError = function (event) {
//TODO
console.warn("Group:" + event.groupName + " has failed to load");
//忽略加载失败的项目
//ignore loading failed projects
this.onResourceLoadComplete(event);
};
/**
* preload资源组加载进度
* loading process of preload resource
*/
Main.prototype.onResourceProgress = function (event) {
if (event.groupName == "preload") {
this.loadingView.setProgress(event.itemsLoaded, event.itemsTotal);
}
};
return Main;
}(eui.UILayer));
__reflect(Main.prototype, "Main");
//# sourceMappingURL=Main.js.map
\ No newline at end of file
{"version":3,"file":"Main.js","sourceRoot":"","sources":["../src/Main.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA;IAAmB,wBAAW;IAA9B;QAAA,qEA6GC;QApEW,oBAAc,GAAY,KAAK,CAAC;QAShC,uBAAiB,GAAY,KAAK,CAAC;;QAqD3C,qCAAqC;QACjC,aAAa;QACjB,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACzB,IAAI;IACP,CAAC;IAvGa,6BAAc,GAAxB;QACI,iBAAM,cAAc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AI,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAChD,2BAA2B;YAC3B,IAAI,aAAa,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAC3B,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAEjC,CAAC;IACL,CAAC;IACD;;;OAGG;IACK,8BAAe,GAAvB,UAAwB,KAAwB;QAC5C,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,GAAG,qBAAqB,CAAC,CAAC;IACrE,CAAC;IACD;;;OAGG;IACK,kCAAmB,GAA3B,UAA4B,KAAwB;QAChD,MAAM;QACN,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,GAAG,qBAAqB,CAAC,CAAC;QACjE,WAAW;QACX,gCAAgC;QAChC,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD;;;OAGG;IACK,iCAAkB,GAA1B,UAA2B,KAAwB;QAC/C,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QACtE,CAAC;IACL,CAAC;IAQL,WAAC;AAAD,CAAC,AA7GD,CAAmB,GAAG,CAAC,OAAO,GA6G7B;AA7GK,UAAA,IAAI,mBA6GT,CAAA"}
\ No newline at end of file
/**
* 可以通过点击播放、暂停、结束来对声音进行控制,并可以在进度条中查看对应播
* 放进度。
*/
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Music = (function (_super) {
__extends(Music, _super);
function Music() {
var _this = _super.call(this) || this;
_this.addEventListener(egret.Event.ADDED_TO_STAGE, _this.onAddToStage, _this);
return _this;
}
Music.prototype.onAddToStage = function (event) {
this.loadSound();
};
//加载
Music.prototype.loadSound = function () {
//背景音效
// this._sound = new egret.Sound();;
// //sound 加载完成监听
// this._sound.addEventListener(egret.Event.COMPLETE, function (e: egret.Event) {
// this._sound.play();
// this.init();
// }, this);
// this._sound.load("resource/assets/a.mp3");
var music = RES.getRes("a_mp3");
console.log(music);
this._sound = RES.getRes("a_mp3");
};
//播放
Music.prototype.play = function () {
//sound 播放会返回一个 SoundChannel 对象,暂停、音量等操作请控制此对象
this._channel = this._sound.play();
};
Music.prototype.stop = function () {
if (this._channel) {
this._channel.stop();
this._channel = null;
}
};
return Music;
}(egret.DisplayObjectContainer));
__reflect(Music.prototype, "Music");
//# sourceMappingURL=Music.js.map
\ No newline at end of file
{"version":3,"file":"Music.js","sourceRoot":"","sources":["../src/Music.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;AAEH;IAAoB,yBAA4B;IAS5C;QAAA,YACI,iBAAO,SAGV;QADG,KAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,KAAI,CAAC,YAAY,EAAE,KAAI,CAAC,CAAC;;IAC/E,CAAC;IAEO,4BAAY,GAApB,UAAqB,KAAkB;QACnC,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAED,IAAI;IACI,yBAAS,GAAjB;QACI,MAAM;QACN,oCAAoC;QAEpC,iBAAiB;QACjB,iFAAiF;QACjF,0BAA0B;QAC1B,mBAAmB;QACnB,YAAY;QAEZ,6CAA6C;QAC7C,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IACD,IAAI;IACG,oBAAI,GAAX;QACI,8CAA8C;QAE/C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAEG,oBAAI,GAAZ;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACzB,CAAC;IACL,CAAC;IACL,YAAC;AAAD,CAAC,AAhDD,CAAoB,KAAK,CAAC,sBAAsB,GAgD/C;AAhDK,UAAA,KAAK,oBAgDV,CAAA"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var People = (function (_super) {
__extends(People, _super);
function People() {
var _this = _super.call(this) || this;
_this.addEventListener(egret.Event.ADDED_TO_STAGE, _this.onAddToStage, _this);
return _this;
}
People.prototype.onAddToStage = function (event) {
this.load(this.initMovieClip);
};
People.prototype.initMovieClip = function () {
/*** 本示例关键代码段开始 ***/
var mcDataFactory = new egret.MovieClipDataFactory(this._mcData, this._mcTexture);
var role = new egret.MovieClip(mcDataFactory.generateMovieClipData("attack"));
this.addChild(role);
role.gotoAndPlay(1, 3);
role.x = (this.stage.stageWidth - role.width) / 2 + 100;
role.y = this.stage.stageHeight;
role.scaleX = 0.5;
role.scaleY = 0.5;
console.log(role);
// role.width= 500;
// role.height = 600;
role.addEventListener(egret.Event.COMPLETE, function (e) {
egret.log("play over!");
}, this);
var count = 0;
role.addEventListener(egret.Event.LOOP_COMPLETE, function (e) {
egret.log("play times:" + ++count);
}, this);
role.addEventListener(egret.MovieClipEvent.FRAME_LABEL, function (e) {
egret.log("frameLabel:" + e.frameLabel);
}, this);
this.stage.addEventListener(egret.TouchEvent.TOUCH_TAP, function (e) {
count = 0;
role.gotoAndPlay(1, 3);
}, this);
/*** 本示例关键代码段结束 ***/
};
People.prototype.load = function (callback) {
var count = 0;
var self = this;
var check = function () {
count++;
if (count == 2) {
callback.call(self);
}
};
var loader = new egret.URLLoader();
loader.addEventListener(egret.Event.COMPLETE, function loadOver(e) {
var loader = e.currentTarget;
this._mcTexture = loader.data;
check();
}, this);
loader.dataFormat = egret.URLLoaderDataFormat.TEXTURE;
var request = new egret.URLRequest("resource/assets/mc/animation.png");
loader.load(request);
var loader = new egret.URLLoader();
loader.addEventListener(egret.Event.COMPLETE, function loadOver(e) {
var loader = e.currentTarget;
this._mcData = JSON.parse(loader.data);
check();
}, this);
loader.dataFormat = egret.URLLoaderDataFormat.TEXT;
var request = new egret.URLRequest("resource/assets/mc/animation.json");
loader.load(request);
};
return People;
}(egret.DisplayObjectContainer));
__reflect(People.prototype, "People");
//# sourceMappingURL=People.js.map
\ No newline at end of file
{"version":3,"file":"People.js","sourceRoot":"","sources":["../src/People.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;IAAsB,0BAA4B;IAK9C;QAAA,YACI,iBAAO,SAGV;QADG,KAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,KAAI,CAAC,YAAY,EAAE,KAAI,CAAC,CAAC;;IAC/E,CAAC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AK,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,kBAAkB,CAAC;YAC7D,IAAI,MAAM,GAAG,CAAC,CAAC,aAAa,CAAC;YAE7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAGvC,KAAK,EAAE,CAAC;QACZ,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC;QACnD,IAAI,OAAO,GAAG,IAAI,KAAK,CAAC,UAAU,CAAC,mCAAmC,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,aAAC;AAAD,CAAC,AArFL,CAAsB,KAAK,CAAC,sBAAsB,GAqF7C;AArFC,UAAA,MAAM,qBAqFP,CAAA"}
\ No newline at end of file
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var ThemeAdapter = (function () {
function ThemeAdapter() {
}
/**
* 解析主题
* @param url 待解析的主题url
* @param compFunc 解析完成回调函数,示例:compFunc(e:egret.Event):void;
* @param errorFunc 解析失败回调函数,示例:errorFunc():void;
* @param thisObject 回调的this引用
*/
ThemeAdapter.prototype.getTheme = function (url, compFunc, errorFunc, thisObject) {
function onGetRes(e) {
compFunc.call(thisObject, e);
}
function onError(e) {
if (e.resItem.url == url) {
RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, onError, null);
errorFunc.call(thisObject);
}
}
RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, onError, null);
RES.getResByUrl(url, onGetRes, this, RES.ResourceItem.TYPE_TEXT);
};
return ThemeAdapter;
}());
__reflect(ThemeAdapter.prototype, "ThemeAdapter", ["eui.IThemeAdapter"]);
//# sourceMappingURL=ThemeAdapter.js.map
\ No newline at end of file
{"version":3,"file":"ThemeAdapter.js","sourceRoot":"","sources":["../src/ThemeAdapter.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,EAAE;AACF,iDAAiD;AACjD,wBAAwB;AACxB,sEAAsE;AACtE,+EAA+E;AAC/E,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,0EAA0E;AAC1E,4EAA4E;AAC5E,6EAA6E;AAC7E,8CAA8C;AAC9C,6EAA6E;AAC7E,8EAA8E;AAC9E,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,wEAAwE;AACxE,gFAAgF;AAChF,sDAAsD;AACtD,EAAE;AACF,sFAAsF;;;;AAGtF;IAAA;IAsBA,CAAC;IApBG;;;;;;OAMG;IACI,+BAAQ,GAAf,UAAgB,GAAU,EAAC,QAAiB,EAAC,SAAkB,EAAC,UAAc;QAC1E,kBAAkB,CAAQ;YACtB,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACjC,CAAC;QACD,iBAAiB,CAAmB;YAChC,EAAE,CAAA,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;gBACtB,GAAG,CAAC,mBAAmB,CAAC,GAAG,CAAC,aAAa,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC1E,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC/B,CAAC;QACL,CAAC;QACD,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACvE,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACrE,CAAC;IACL,mBAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBK,UAAA,YAAY,kDAsBjB,CAAA"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var game;
(function (game) {
var Background = (function (_super) {
__extends(Background, _super);
function Background() {
var _this = _super.call(this) || this;
_this._touchStatus = false; //当前触摸状态,按下时,值为true
_this._distance = new egret.Point(); //鼠标点击时,鼠标全局坐标与people的位置差
//加载背景
_this.skinName = "resource/skin/StartPanel.exml";
_this.addEventListener(egret.Event.COMPLETE, _this.onAddToStage, _this);
return _this;
//创建一个计时器对象
// var timer:egret.Timer = new egret.Timer(30,0);
// //注册事件侦听器
// timer.addEventListener(egret.TimerEvent.TIMER,this.timerFunc,this);
// timer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.timerComFunc,this);
// //开始计时
// timer.start();
// this.keyDown();
}
Background.prototype.onAddToStage = function (event) {
this.people = new game.People();
this.addChild(this.people);
this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.clickBtn, this);
//设置显示对象可以相应触摸事件
this.people.touchEnabled = true;
//注册事件
this.people.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.mouseDown, this);
this.people.addEventListener(egret.TouchEvent.TOUCH_END, this.mouseUp, this);
};
Background.prototype.clickBtn = function (ev) {
this.removeChild(this.btn);
this.removeChild(this.title);
this.score.visible = false;
// this.addChild(this.people);
this.people.y = this.stage.stageHeight - this.people.height / 2 - 10;
this.people.x = (this.stage.stageWidth - this.people.width) / 2 + 80;
this.people.scaleX = 0.5;
this.people.scaleY = 0.5;
};
Background.prototype.mouseDown = function (evt) {
console.log("Mouse Down.");
this._touchStatus = true;
this._distance.x = evt.stageX - this.people.x;
this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE, this.mouseMove, this);
};
Background.prototype.mouseMove = function (evt) {
if (this._touchStatus) {
console.log("moving now ! Mouse: [X:" + evt.stageX + ",Y:" + evt.stageY + "]");
this.people.x = evt.stageX - this._distance.x;
console.log(this.people.x);
if (this.people.x < -20) {
this.people.x = -20;
}
else if (this.people.x > 520) {
this.people.x = 520;
}
}
};
Background.prototype.mouseUp = function (evt) {
console.log("Mouse Up.");
this._touchStatus = false;
this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE, this.mouseMove, this);
};
return Background;
}(eui.Component));
game.Background = Background;
__reflect(Background.prototype, "game.Background");
})(game || (game = {}));
//# sourceMappingURL=Background.js.map
\ No newline at end of file
{"version":3,"file":"Background.js","sourceRoot":"","sources":["../../src/game/Background.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,IAAO,IAAI,CAuHV;AAvHD,WAAO,IAAI;IAEV;QAAgC,8BAAa;QAK1C;YAAA,YACI,iBAAO,SAaV;YAwBM,kBAAY,GAAW,KAAK,CAAC,CAAc,mBAAmB;YAC9D,eAAS,GAAe,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,yBAAyB;YArCvE,MAAM;YACN,KAAI,CAAC,QAAQ,GAAG,+BAA+B,CAAC;YAChD,KAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAI,CAAC,YAAY,EAAE,KAAI,CAAC,CAAC;;YACrE,WAAW;YACX,iDAAiD;YACjD,YAAY;YACZ,sEAAsE;YACtE,kFAAkF;YAClF,SAAS;YACT,iBAAiB;YAEjB,kBAAkB;QACtB,CAAC;QACO,iCAAY,GAApB,UAAqB,KAAiB;YAClC,IAAI,CAAC,MAAM,GAAG,IAAI,KAAA,MAAM,EAAE,CAAC;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAC,IAAI,CAAC,QAAQ,EAAC,IAAI,CAAC,CAAC;YACxE,gBAAgB;YAChB,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,I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QAuHV"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var game;
(function (game) {
var BgMap = (function (_super) {
__extends(BgMap, _super);
function BgMap() {
var _this = _super.call(this) || this;
//背景的滚动速度
_this.speed = 2;
_this.addEventListener(egret.Event.ADDED_TO_STAGE, _this.onAddToState, _this);
return _this;
}
BgMap.prototype.onAddToState = function (eveent) {
this.removeEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToState, this);
this.stageW = this.stage.stageWidth;
this.stageH = this.stage.stageHeight;
//获取背景图资源
var texture = RES.getRes("bg_jpeg");
//获取背景图高度
this.textureH = texture.textureHeight;
console.log(this.textureH);
//计算当前屏幕需要的图片数量
this.rowCount = Math.ceil(this.stageH / this.textureH) + 1;
this.bgArr = [];
//创建背景图让其链接起来
for (var i = 0; i < this.rowCount; i++) {
var bg = new egret.Bitmap(texture);
bg.y = this.textureH * i - (this.textureH * this.rowCount - this.stageH);
this.bgArr.push(bg);
this.addChild(bg);
console.log(this.bgArr);
}
};
//背景开始滚动
BgMap.prototype.start = function () {
this.removeEventListener(egret.Event.ENTER_FRAME, this.enterFrameHandler, this);
this.addEventListener(egret.Event.ENTER_FRAME, this.enterFrameHandler, this);
};
//逐帧运动
BgMap.prototype.enterFrameHandler = function (event) {
for (var i = 0; i < this.rowCount; i++) {
var bg = this.bgArr[i];
bg.y += this.speed;
//如果超出屏幕循环
if (bg.y > this.stageH) {
bg.y = this.bgArr[0].y - this.textureH;
this.bgArr.pop();
this.bgArr.unshift(bg);
}
}
};
//停止滚动
BgMap.prototype.stop = function () {
this.removeEventListener(egret.Event.ENTER_FRAME, this.enterFrameHandler, this);
};
return BgMap;
}(egret.DisplayObjectContainer));
game.BgMap = BgMap;
__reflect(BgMap.prototype, "game.BgMap");
})(game || (game = {}));
//# sourceMappingURL=BgMap.js.map
\ No newline at end of file
{"version":3,"file":"BgMap.js","sourceRoot":"","sources":["../../src/game/BgMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,IAAO,IAAI,CAsEV;AAtED,WAAO,IAAI;IAEP;QAA2B,yBAA4B;QAevD;YAAA,YACI,iBAAO,SAGV;YATG,SAAS;YACA,WAAK,GAAQ,CAAC,CAAC;YAMxB,KAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAC,KAAI,CAAC,YAAY,EAAC,KAAI,CAAC,CAAC;;QAE7E,CAAC;QACO,4BAAY,GAApB,UAAqB,MAAkB;YACnC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAC,IAAI,CAAC,YAAY,EAAC,IAAI,CAAC,CAAC;YAC5E,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;YACrC,SAAS;YACT,IAAI,OAAO,GAAiB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAClD,SAAS;YACT,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAE3B,eAAe;YACd,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAC,IAAI,CAAC,QAAQ,CAAC,GAAC,CAAC,CAAC;YACvD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,aAAa;Y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I,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAC,IAAI,CAAC,QAAQ,CAAC;oBACrC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;oBACjB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC;QACF,CAAC;QAED,MAAM;QACE,oBAAI,GAAX;YACG,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAC,IAAI,CAAC,iBAAiB,EAAC,IAAI,CAAC,CAAC;QAEjF,CAAC;QACC,YAAC;IAAD,CAAC,AAnED,CAA2B,KAAK,CAAC,sBAAsB,GAmEtD;IAnEY,UAAK,QAmEjB,CAAA;IAnEY,UAAA,KAAK,yBAmEjB,CAAA;AACL,CAAC,EAtEM,IAAI,KAAJ,IAAI,QAsEV"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var game;
(function (game) {
var GameUtil = (function (_super) {
__extends(GameUtil, _super);
function GameUtil() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**基于矩形的碰撞检测*/
GameUtil.hitTest = function (obj1, obj2) {
var rect1 = obj1.getBounds();
var rect2 = obj2.getBounds();
rect1.x = obj1.x;
rect1.y = obj1.y;
rect2.x = obj2.x;
rect2.y = obj2.y;
return rect1.intersects(rect2);
};
return GameUtil;
}(egret.DisplayObjectContainer));
game.GameUtil = GameUtil;
__reflect(GameUtil.prototype, "game.GameUtil");
})(game || (game = {}));
//# sourceMappingURL=GameUtil.js.map
\ No newline at end of file
{"version":3,"file":"GameUtil.js","sourceRoot":"","sources":["../../src/game/GameUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,IAAO,IAAI,CAgBT;AAhBF,WAAO,IAAI;IAEP;QAA8B,4BAA4B;QAA1D;;QAaA,CAAC;QAXI,cAAc;QACD,gBAAO,GAArB,UAAsB,IAAwB,EAAC,IAAwB;YAEnE,IAAI,KAAK,GAAmB,IAAI,CAAC,SAAS,EAAE,CAAC;YAC7C,IAAI,KAAK,GAAmB,IAAI,CAAC,SAAS,EAAE,CAAC;YAC7C,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACjB,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACjB,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACjB,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;QACL,eAAC;IAAD,CAAC,AAbD,CAA8B,KAAK,CAAC,sBAAsB,GAazD;IAbY,aAAQ,WAapB,CAAA;IAbY,UAAA,QAAQ,4BAapB,CAAA;AACJ,CAAC,EAhBK,IAAI,KAAJ,IAAI,QAgBT"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var game;
(function (game) {
var Gold = (function (_super) {
__extends(Gold, _super);
//生成金币
function Gold(texture) {
var _this = _super.call(this) || this;
_this.gold = new egret.Bitmap(texture);
_this.gold.width = 80;
_this.gold.height = 80;
// this.textureName = textureName;
_this.addChild(_this.gold);
return _this;
// console.log(this.gold);
}
Gold.produce = function (textureName) {
if (game.Gold.cacheDict[textureName] == null)
game.Gold.cacheDict[textureName] = [];
var dict = game.Gold.cacheDict[textureName];
var gold;
if (dict.length > 0) {
gold = dict.pop();
}
else {
gold = new game.Gold(RES.getRes(textureName));
}
// console.log(gold);
return gold;
};
/**销毁金币*/
Gold.reclaim = function (gold, textureName) {
// var textureName: string = gold.textureName;
if (game.Gold.cacheDict[textureName] == null)
game.Gold.cacheDict[textureName] = [];
var dict = game.Gold.cacheDict[textureName];
if (dict.indexOf(gold) == -1)
dict.push(gold);
};
Gold.cacheDict = {};
return Gold;
}(egret.DisplayObjectContainer));
game.Gold = Gold;
__reflect(Gold.prototype, "game.Gold");
})(game || (game = {}));
//# sourceMappingURL=Gold.js.map
\ No newline at end of file
{"version":3,"file":"Gold.js","sourceRoot":"","sources":["../../src/game/Gold.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,IAAO,IAAI,CAgDV;AAhDD,WAAO,IAAI;IAEP;QAA0B,wBAA4B;QAOjD,MAAM;QACN,cAAmB,OAAqB;YAAxC,YACG,iBAAO,SAOhB;YANS,KAAI,CAAC,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACtC,KAAI,CAAC,IAAI,CAAC,KAAK,GAAC,EAAE,CAAC;YACnB,KAAI,CAAC,IAAI,CAAC,MAAM,GAAC,EAAE,CAAC;YAC7B,kCAAkC;YACzB,KAAI,CAAC,QAAQ,CAAC,KAAI,CAAC,IAAI,CAAC,CAAC;;YACzB,4BAA4B;QACtC,CAAC;QAGmB,YAAO,GAArB,UAAsB,WAAkB;YACvC,EAAE,CAAA,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC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__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var game;
(function (game) {
var People = (function (_super) {
__extends(People, _super);
function People() {
var _this = _super.call(this) || this;
_this.addEventListener(egret.Event.ADDED_TO_STAGE, _this.onAddToStage, _this);
return _this;
}
People.prototype.onAddToStage = function (event) {
this.load(this.initMovieClip);
};
People.prototype.initMovieClip = function () {
/*** 本示例关键代码段开始 ***/
var mcDataFactory = new egret.MovieClipDataFactory(this._mcData, this._mcTexture);
var role = new egret.MovieClip(mcDataFactory.generateMovieClipData("Ubbie"));
this.addChild(role);
role.gotoAndPlay(1, -1);
role.x = (this.stage.stageWidth - role.width) / 2 + 100;
role.y = this.stage.stageHeight;
role.scaleX = 0.5;
role.scaleY = 0.5;
console.log(role);
// role.width= 500;
// role.height = 600;
role.addEventListener(egret.Event.COMPLETE, function (e) {
egret.log("play over!");
}, this);
var count = 0;
role.addEventListener(egret.Event.LOOP_COMPLETE, function (e) {
egret.log("play times:" + ++count);
}, this);
role.addEventListener(egret.MovieClipEvent.FRAME_LABEL, function (e) {
egret.log("frameLabel:" + e.frameLabel);
}, this);
this.stage.addEventListener(egret.TouchEvent.TOUCH_TAP, function (e) {
count = 0;
role.gotoAndPlay(1, -1);
}, this);
/*** 本示例关键代码段结束 ***/
};
People.prototype.load = function (callback) {
var count = 0;
var self = this;
var check = function () {
count++;
if (count == 2) {
callback.call(self);
}
};
var loader = new egret.URLLoader();
loader.addEventListener(egret.Event.COMPLETE, function loadOver(e) {
var loader = e.currentTarget;
this._mcTexture = loader.data;
check();
}, this);
loader.dataFormat = egret.URLLoaderDataFormat.TEXTURE;
var request = new egret.URLRequest("resource/assets/mc/animation.png");
loader.load(request);
var loader = new egret.URLLoader();
loader.addEventListener(egret.Event.COMPLETE, function loadOver(e) {
var loader = e.currentTarget;
this._mcData = JSON.parse(loader.data);
check();
}, this);
loader.dataFormat = egret.URLLoaderDataFormat.TEXT;
var request = new egret.URLRequest("resource/assets/mc/animation.json");
loader.load(request);
};
return People;
}(egret.DisplayObjectContainer));
game.People = People;
__reflect(People.prototype, "game.People");
})(game || (game = {}));
//# sourceMappingURL=People.js.map
\ No newline at end of file
{"version":3,"file":"People.js","sourceRoot":"","sources":["../../src/game/People.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,IAAO,IAAI,CAwFV;AAxFD,WAAO,IAAI;IAEP;QAA6B,0BAA4B;QAKzD;YAAA,YACI,iBAAO,SAGV;YADG,KAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,KAAI,CAAC,YAAY,EAAE,KAAI,CAAC,CAAC;;QAC/E,CAAC;QAEO,6BAAY,GAApB,UAAqB,KAAkB;YACnC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAClC,CAAC;QAEO,8BAAa,GAArB;YACI,oBAAoB;YACpB,IAAI,aAAa,GAAG,IAAI,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YAClF,IAAI,IAAI,GAAmB,IAAI,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7F,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpB,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAExB,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAC,IAAI,CAAC,KAAK,CAAC,GAAC,CAAC,GA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,sBAAsB,GAqFxD;IArFY,WAAM,SAqFlB,CAAA;IArFY,UAAA,MAAM,0BAqFlB,CAAA;AACL,CAAC,EAxFM,IAAI,KAAJ,IAAI,QAwFV"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var game;
(function (game) {
var ScorePanel = (function (_super) {
__extends(ScorePanel, _super);
function ScorePanel() {
return _super !== null && _super.apply(this, arguments) || this;
}
return ScorePanel;
}(egret.DisplayObjectContainer));
game.ScorePanel = ScorePanel;
__reflect(ScorePanel.prototype, "game.ScorePanel");
})(game || (game = {}));
//# sourceMappingURL=ScorePanel.js.map
\ No newline at end of file
{"version":3,"file":"ScorePanel.js","sourceRoot":"","sources":["../../src/game/ScorePanel.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,IAAO,IAAI,CAMV;AAND,WAAO,IAAI;IAEP;QAAgC,8BAA4B;QAA5D;;QAGA,CAAC;QAAD,iBAAC;IAAD,CAAC,AAHD,CAAgC,KAAK,CAAC,sBAAsB,GAG3D;IAHY,eAAU,aAGtB,CAAA;IAHY,UAAA,UAAU,8BAGtB,CAAA;AACL,CAAC,EANM,IAAI,KAAJ,IAAI,QAMV"}
\ No newline at end of file
var __reflect = (this && this.__reflect) || function (p, c, t) {
p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var game;
(function (game) {
var SoundMenager = (function () {
function SoundMenager() {
// this._click = new egret.Sound();
this._bgm = RES.getRes("Music_mp3");
this._click = RES.getRes("buttonclick_mp3");
this._right = RES.getRes("right_mp3");
// this._click.load("resource/sound/buttonclick.mp3");
// this._bgm = new egret.Sound();
// this._bgm.load("resource/sound/Music.mp3");
// this._right = new egret.Sound();
// this._right.load("resource/sound/right.mp3");
// this._wrong = new egret.Sound();
// this._wrong.load("resource/sound/wrong.mp3");
// this._word = new egret.Sound();
// this._word.load("resource/sound/type_word.mp3");
}
SoundMenager.Shared = function () {
if (SoundMenager.shared == null)
SoundMenager.shared = new SoundMenager();
return SoundMenager.shared;
};
SoundMenager.prototype.PlayBGM = function () {
if (this.IsMusic) {
this._bgm_channel = this._bgm.play(0, 0);
}
};
SoundMenager.prototype.StopBGM = function () {
if (this._bgm_channel != null) {
this._bgm_channel.stop();
}
};
SoundMenager.prototype.PlayClick = function () {
if (this.IsSound) {
this._click.play(0, 1);
}
};
SoundMenager.prototype.PlayRight = function () {
if (this.IsSound) {
this._right.play(0, 1);
}
};
Object.defineProperty(SoundMenager.prototype, "IsMusic", {
get: function () {
var b = egret.localStorage.getItem("ismusic");
if (b == null || b == "") {
return true;
}
else {
return b == "1";
}
},
// public PlayWrong() {
// if(this.IsSound) {
// this._wrong.play(0,1);
// }
// }
// public PlayWord() {
// if(this.IsSound) {
// this._word.play(0,1);
// }
// }
//音乐是否播放,保存设置
set: function (value) {
if (!value) {
egret.localStorage.setItem("ismusic", "0");
this.StopBGM();
}
else {
egret.localStorage.setItem("ismusic", "1");
this.PlayBGM();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(SoundMenager.prototype, "IsSound", {
get: function () {
var b = egret.localStorage.getItem("isSound");
if (b == null || b == "") {
return true;
}
else {
return b == "1";
}
},
//声效是否播放,保存设置
set: function (value) {
if (value) {
egret.localStorage.setItem("isSound", "1");
}
else {
egret.localStorage.setItem("isSound", "0");
}
},
enumerable: true,
configurable: true
});
return SoundMenager;
}());
game.SoundMenager = SoundMenager;
__reflect(SoundMenager.prototype, "game.SoundMenager");
})(game || (game = {}));
//# sourceMappingURL=SoundMenager.js.map
\ No newline at end of file
{"version":3,"file":"SoundMenager.js","sourceRoot":"","sources":["../../src/game/SoundMenager.ts"],"names":[],"mappings":";;;AAAA,IAAO,IAAI,CAkIV;AAlID,WAAO,IAAI;IAEP;QA6CA;YACI,mCAAmC;YAClC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACpC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACvC,sDAAsD;YACtD,iCAAiC;YACjC,8CAA8C;YAC9C,mCAAmC;YACnC,gDAAgD;YAChD,mCAAmC;YACnC,gDAAgD;YAChD,kCAAkC;YAClC,mDAAmD;QACvD,CAAC;QAzBa,mBAAM,GAApB;YACI,EAAE,CAAA,CAAC,YAAY,CAAC,MAAM,IAAI,IAAI,CAAC;gBAC3B,YAAY,CAAC,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;YAC7C,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;QAC/B,CAAC;QAsBM,8BAAO,GAAd;YACI,EAAE,CAAA,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,CAAC;gBACb,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;YAC5C,CAAC;QAEL,CAAC;QACM,8BAAO,GAAd;YACI,EAAE,CAAA,CAAC,IAAI,CAAC,YAAY,IAAG,IAAI,CAAC,CAAA,CAAC;gBACzB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAC7B,CAAC;QACL,CAAC;QACM,gCAAS,GAAhB;YACI,EAAE,CAAA,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,CAAC;gBACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAC,C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E,CAAC,CAAC,CAAC;oBACtB,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;gBACD,IAAI,CAAC,CAAC;oBACF,MAAM,CAAC,CAAC,IAAI,GAAG,CAAC;gBACpB,CAAC;YACL,CAAC;YAhBD,aAAa;iBACb,UAAmB,KAAK;gBACpB,EAAE,CAAA,CAAC,KAAK,CAAC,CAAC,CAAC;oBACP,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAC,GAAG,CAAC,CAAC;gBAC9C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAC,GAAG,CAAC,CAAC;gBAC9C,CAAC;YACL,CAAC;;;WAAA;QAUL,mBAAC;IAAD,CAAC,AA/HG,IA+HH;IA/HgB,iBAAY,eA+H5B,CAAA;IA/HgB,UAAA,YAAY,gCA+H5B,CAAA;AACD,CAAC,EAlIM,IAAI,KAAJ,IAAI,QAkIV"}
\ No newline at end of file
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Egret</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" />
<style>
html, body {
-ms-touch-action: none;
background: #888888;
padding: 0;
border: 0;
margin: 0;
height: 100%;
}
</style>
</head>
<body>
<div style="margin: auto;width: 100%;height: 100%;" class="egret-player"
data-entry-class="Main"
data-orientation="auto"
data-scale-mode="showAll"
data-frame-rate="30"
data-content-width="640"
data-content-height="1136"
data-show-paint-rect="false"
data-multi-fingered="2"
data-show-fps="false" data-show-log="false"
data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
</div>
<script>
var loadScript = function (list, callback) {
var loaded = 0;
var loadNext = function () {
loadSingleScript(list[loaded], function () {
loaded++;
if (loaded >= list.length) {
callback();
}
else {
loadNext();
}
})
};
loadNext();
};
var loadSingleScript = function (src, callback) {
var s = document.createElement('script');
s.async = false;
s.src = src;
s.addEventListener('load', function () {
s.parentNode.removeChild(s);
s.removeEventListener('load', arguments.callee, false);
callback();
}, false);
document.body.appendChild(s);
};
var xhr = new XMLHttpRequest();
xhr.open('GET', './manifest.json?v=' + Math.random(), true);
xhr.addEventListener("load", function () {
var manifest = JSON.parse(xhr.response);
var list = manifest.initial.concat(manifest.game);
loadScript(list, function () {
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "retina": //Whether the canvas is based on the devicePixelRatio
* }
**/
egret.runEgret({ renderMode: "webgl", audioType: 0 });
});
});
xhr.send(null);
</script>
</body>
</html>
\ 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 source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"initial": [
"libs/modules/egret/egret.min.js",
"libs/modules/egret/egret.web.min.js",
"libs/modules/game/game.min.js",
"libs/modules/res/res.min.js",
"libs/modules/eui/eui.min.js",
"libs/modules/experimental/experimental.min.js",
"libs/modules/tween/tween.min.js",
"libs/modules/dragonBones/dragonBones.min.js",
"promise/bin/promise.min.js"
],
"game": [
"main.min.js"
]
}
\ No newline at end of file
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?j(t,it.error):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),P(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(P,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function T(){this.error=null}function M(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===st?(a=!0,u=s.error,s=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new T,st=new T,ut=0;return Y.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===nt&&n<t;n++)this._eachEntry(e[n],n)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}),ES6Promise.polyfill();
\ No newline at end of file
{"mc":{"attack":{"frameRate":24,"events":[{"name":"@attack","frame":14}],"frames":[{"y":-336,"res":"atc_0","duration":1,"x":-118},{"y":-337,"res":"atc_1","duration":1,"x":-112},{"y":-339,"res":"atc_2","duration":1,"x":-107},{"y":-340,"res":"atc_3","duration":1,"x":-101},{"y":-340,"res":"atc_4","duration":1,"x":-95},{"y":-341,"res":"atc_5","duration":1,"x":-90},{"y":-341,"res":"atc_6","duration":1,"x":-90},{"y":-341,"res":"atc_7","duration":1,"x":-90},{"y":-341,"res":"atc_8","duration":1,"x":-90},{"y":-341,"res":"atc_9","duration":1,"x":-90},{"y":-342,"res":"atc_10","duration":1,"x":-136},{"y":-350,"res":"atc_11","duration":1,"x":-180},{"y":-343,"res":"atc_12","duration":1,"x":-224},{"y":-343,"res":"atc_13","duration":1,"x":-224},{"y":-343,"res":"atc_14","duration":1,"x":-224},{"y":-343,"res":"atc_15","duration":1,"x":-224},{"y":-343,"res":"atc_16","duration":1,"x":-224},{"y":-343,"res":"atc_17","duration":1,"x":-224},{"y":-343,"res":"atc_18","duration":1,"x":-224},{"y":-343,"res":"atc_19","duration":1,"x":-224},{"y":-343,"res":"atc_20","duration":1,"x":-224},{"y":-348,"res":"atc_21","duration":1,"x":-202},{"y":-350,"res":"atc_22","duration":1,"x":-182},{"y":-348,"res":"atc_23","duration":1,"x":-161},{"y":-342,"res":"atc_24","duration":1,"x":-139},{"y":-339,"res":"atc_25","duration":1,"x":-133},{"y":-337,"res":"atc_26","duration":1,"x":-127}],"labels":[{"end":27,"name":"atc","frame":1}]}},"file":"animation.png","res":{"atc_2":{"x":1362,"y":709,"w":233,"h":353},"atc_0":{"x":1595,"y":1060,"w":231,"h":350},"atc_10":{"x":640,"y":357,"w":250,"h":356},"atc_16":{"x":328,"y":357,"w":312,"h":357},"atc_14":{"x":0,"y":714,"w":320,"h":357},"atc_12":{"x":0,"y":0,"w":336,"h":357},"atc_18":{"x":0,"y":1071,"w":314,"h":357},"atc_13":{"x":0,"y":357,"w":328,"h":357},"atc_1":{"x":1595,"y":709,"w":232,"h":351},"atc_17":{"x":320,"y":714,"w":313,"h":357},"atc_8":{"x":884,"y":0,"w":236,"h":355},"atc_7":{"x":890,"y":355,"w":236,"h":355},"atc_9":{"x":648,"y":0,"w":236,"h":355},"atc_23":{"x":911,"y":714,"w":257,"h":361},"atc_4":{"x":1356,"y":0,"w":235,"h":354},"atc_20":{"x":0,"y":1428,"w":314,"h":357},"atc_26":{"x":628,"y":1078,"w":228,"h":350},"atc_25":{"x":1362,"y":354,"w":227,"h":353},"atc_6":{"x":1120,"y":0,"w":236,"h":355},"atc_5":{"x":1126,"y":355,"w":236,"h":355},"atc_21":{"x":614,"y":1428,"w":296,"h":362},"atc_19":{"x":314,"y":1071,"w":314,"h":357},"atc_24":{"x":1591,"y":0,"w":233,"h":356},"atc_11":{"x":314,"y":1428,"w":300,"h":364},"atc_22":{"x":633,"y":714,"w":278,"h":364},"atc_3":{"x":1591,"y":356,"w":234,"h":353},"atc_15":{"x":336,"y":0,"w":312,"h":357}}}
\ No newline at end of file
[
"<font color=0x00ff0c>Open-source</font>,<font color=0x00ff0c>Free</font>,<font color=0x00ff0c>Multi-platform</font>",
"Push <font color=0x00ff0c>Game </font>Forward",
"<font color=0x00ff0c>HTML5 </font>Game Engine"
]
\ No newline at end of file
{
"groups": [
{
"keys": "bg_jpg,description_json,bg_jpeg,a_mp3,startbtn_png,egret_icon_png,button_down_png,button_up_png,checkbox_select_disabled_png,checkbox_select_down_png,checkbox_select_up_png,checkbox_unselect_png,selected_png,border_png,header_png,thumb_pb_png,track_pb_png,radiobutton_select_disabled_png,radiobutton_select_down_png,radiobutton_select_up_png,radiobutton_unselect_png,roundthumb_png,track_sb_png,thumb_png,track_png,tracklight_png,handle_png,off_png,on_png,gold2_png,add_png,bomb_png",
"name": "preload"
}
],
"resources": [
{
"url": "assets/bg.jpg",
"type": "image",
"name": "bg_jpg"
},
{
"url": "config/description.json",
"type": "json",
"name": "description_json"
},
{
"url": "assets/bg.jpeg",
"type": "image",
"name": "bg_jpeg"
},
{
"url": "assets/a.mp3",
"type": "sound",
"name": "a_mp3"
},
{
"url": "assets/startbtn.png",
"type": "image",
"name": "startbtn_png"
},
{
"url": "assets/egret_icon.png",
"type": "image",
"name": "egret_icon_png"
},
{
"url": "assets/Button/button_down.png",
"type": "image",
"name": "button_down_png"
},
{
"url": "assets/Button/button_up.png",
"type": "image",
"name": "button_up_png"
},
{
"url": "assets/CheckBox/checkbox_select_disabled.png",
"type": "image",
"name": "checkbox_select_disabled_png"
},
{
"url": "assets/CheckBox/checkbox_select_down.png",
"type": "image",
"name": "checkbox_select_down_png"
},
{
"url": "assets/CheckBox/checkbox_select_up.png",
"type": "image",
"name": "checkbox_select_up_png"
},
{
"url": "assets/CheckBox/checkbox_unselect.png",
"type": "image",
"name": "checkbox_unselect_png"
},
{
"url": "assets/ItemRenderer/selected.png",
"type": "image",
"name": "selected_png"
},
{
"url": "assets/Panel/border.png",
"type": "image",
"name": "border_png"
},
{
"url": "assets/Panel/header.png",
"type": "image",
"name": "header_png"
},
{
"url": "assets/ProgressBar/thumb_pb.png",
"type": "image",
"name": "thumb_pb_png"
},
{
"url": "assets/ProgressBar/track_pb.png",
"type": "image",
"name": "track_pb_png"
},
{
"url": "assets/RadioButton/radiobutton_select_disabled.png",
"type": "image",
"name": "radiobutton_select_disabled_png"
},
{
"url": "assets/RadioButton/radiobutton_select_down.png",
"type": "image",
"name": "radiobutton_select_down_png"
},
{
"url": "assets/RadioButton/radiobutton_select_up.png",
"type": "image",
"name": "radiobutton_select_up_png"
},
{
"url": "assets/RadioButton/radiobutton_unselect.png",
"type": "image",
"name": "radiobutton_unselect_png"
},
{
"url": "assets/ScrollBar/roundthumb.png",
"type": "image",
"name": "roundthumb_png"
},
{
"url": "assets/ScrollBar/track_sb.png",
"type": "image",
"name": "track_sb_png"
},
{
"url": "assets/Slider/thumb.png",
"type": "image",
"name": "thumb_png"
},
{
"url": "assets/Slider/track.png",
"type": "image",
"name": "track_png"
},
{
"url": "assets/Slider/tracklight.png",
"type": "image",
"name": "tracklight_png"
},
{
"url": "assets/ToggleSwitch/handle.png",
"type": "image",
"name": "handle_png"
},
{
"url": "assets/ToggleSwitch/off.png",
"type": "image",
"name": "off_png"
},
{
"url": "assets/ToggleSwitch/on.png",
"type": "image",
"name": "on_png"
},
{
"url": "assets/gold.png",
"type": "image",
"name": "gold_png"
},
{
"name": "gold2_png",
"type": "image",
"url": "assets/gold.png"
},
{
"name": "add_png",
"type": "image",
"url": "assets/add.png"
},
{
"name": "bomb_png",
"type": "image",
"url": "assets/bomb.png"
}
]
}
\ No newline at end of file
{
"skins": {
"eui.Button": "resource/eui_skins/ButtonSkin.exml",
"eui.CheckBox": "resource/eui_skins/CheckBoxSkin.exml",
"eui.HScrollBar": "resource/eui_skins/HScrollBarSkin.exml",
"eui.HSlider": "resource/eui_skins/HSliderSkin.exml",
"eui.Panel": "resource/eui_skins/PanelSkin.exml",
"eui.TextInput": "resource/eui_skins/TextInputSkin.exml",
"eui.ProgressBar": "resource/eui_skins/ProgressBarSkin.exml",
"eui.RadioButton": "resource/eui_skins/RadioButtonSkin.exml",
"eui.Scroller": "resource/eui_skins/ScrollerSkin.exml",
"eui.ToggleSwitch": "resource/eui_skins/ToggleSwitchSkin.exml",
"eui.VScrollBar": "resource/eui_skins/VScrollBarSkin.exml",
"eui.VSlider": "resource/eui_skins/VSliderSkin.exml",
"eui.ItemRenderer": "resource/eui_skins/ItemRendererSkin.exml"
},
"autoGenerateExmlsList": true,
"exmls": [
{
"path": "resource/eui_skins/ButtonSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<e:Skin class=\"skins.ButtonSkin\" states=\"up,down,disabled\" minHeight=\"50\" minWidth=\"100\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image width=\"100%\" height=\"100%\" scale9Grid=\"1,3,8,8\" alpha.disabled=\"0.5\"\n source=\"button_up_png\"\n source.down=\"button_down_png\"/>\n <e:Label id=\"labelDisplay\" top=\"8\" bottom=\"8\" left=\"8\" right=\"8\"\n size=\"20\"\n textColor=\"0xFFFFFF\" verticalAlign=\"middle\" textAlign=\"center\"/>\n <e:Image id=\"iconDisplay\" horizontalCenter=\"0\" verticalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/CheckBoxSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.CheckBoxSkin\" states=\"up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Group width=\"100%\" height=\"100%\">\n <e:layout>\n <e:HorizontalLayout verticalAlign=\"middle\"/>\n </e:layout>\n <e:Image fillMode=\"scale\" alpha=\"1\" alpha.disabled=\"0.5\" alpha.down=\"0.7\"\n source=\"checkbox_unselect_png\"\n source.upAndSelected=\"checkbox_select_up_png\"\n source.downAndSelected=\"checkbox_select_down_png\"\n source.disabledAndSelected=\"checkbox_select_disabled_png\"/>\n <e:Label id=\"labelDisplay\" size=\"20\" textColor=\"0x707070\"\n textAlign=\"center\" verticalAlign=\"middle\"\n fontFamily=\"Tahoma\"/>\n </e:Group>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/HScrollBarSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.HScrollBarSkin\" minWidth=\"20\" minHeight=\"8\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image id=\"thumb\" source=\"roundthumb_png\" scale9Grid=\"3,3,2,2\" height=\"8\" width=\"30\" verticalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/HSliderSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.HSliderSkin\" minWidth=\"20\" minHeight=\"8\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image id=\"track\" source=\"track_sb_png\" scale9Grid=\"1,1,4,4\" width=\"100%\"\n height=\"6\" verticalCenter=\"0\"/>\n <e:Image id=\"thumb\" source=\"thumb_png\" verticalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/ItemRendererSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<e:Skin class=\"skins.ItemRendererSkin\" states=\"up,down,disabled\" minHeight=\"50\" minWidth=\"100\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image width=\"100%\" height=\"100%\" scale9Grid=\"1,3,8,8\" alpha.disabled=\"0.5\"\n source=\"button_up_png\"\n source.down=\"button_down_png\"/>\n <e:Label id=\"labelDisplay\" top=\"8\" bottom=\"8\" left=\"8\" right=\"8\"\n size=\"20\" fontFamily=\"Tahoma\"\n textColor=\"0xFFFFFF\" text=\"{data}\" verticalAlign=\"middle\" textAlign=\"center\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/PanelSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.PanelSkin\" minHeight=\"230\" minWidth=\"450\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image left=\"0\" right=\"0\" bottom=\"0\" top=\"0\" source=\"border_png\" scale9Grid=\"2,2,12,12\" />\n <e:Group id=\"moveArea\" left=\"0\" right=\"0\" top=\"0\" height=\"45\">\n <e:Image left=\"0\" right=\"0\" bottom=\"0\" top=\"0\" source=\"header_png\"/>\n <e:Label id=\"titleDisplay\" size=\"20\" fontFamily=\"Tahoma\" textColor=\"0xFFFFFF\"\n wordWrap=\"false\" left=\"15\" right=\"5\" verticalCenter=\"0\"/>\n </e:Group>\n <e:Button id=\"closeButton\" label=\"close\" bottom=\"5\" horizontalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/ProgressBarSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.ProgressBarSkin\" minWidth=\"30\" minHeight=\"18\" xmlns:e=\"http://ns.egret.com/eui\">\n\t<e:Image source=\"track_pb_png\" scale9Grid=\"1,1,4,4\" width=\"100%\"\n\t\t\t height=\"100%\" verticalCenter=\"0\"/>\n\t<e:Image id=\"thumb\" height=\"100%\" width=\"100%\" source=\"thumb_pb_png\"/>\n\t<e:Label id=\"labelDisplay\" textAlign=\"center\" verticalAlign=\"middle\"\n\t\t\t size=\"15\" fontFamily=\"Tahoma\" textColor=\"0x707070\"\n\t\t\t horizontalCenter=\"0\" verticalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/RadioButtonSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.RadioButtonSkin\" states=\"up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Group width=\"100%\" height=\"100%\">\n <e:layout>\n <e:HorizontalLayout verticalAlign=\"middle\"/>\n </e:layout>\n <e:Image fillMode=\"scale\" alpha=\"1\" alpha.disabled=\"0.5\" alpha.down=\"0.7\"\n source=\"radiobutton_unselect_png\"\n source.upAndSelected=\"radiobutton_select_up_png\"\n source.downAndSelected=\"radiobutton_select_down_png\"\n source.disabledAndSelected=\"radiobutton_select_disabled_png\"/>\n <e:Label id=\"labelDisplay\" size=\"20\" textColor=\"0x707070\"\n textAlign=\"center\" verticalAlign=\"middle\"\n fontFamily=\"Tahoma\"/>\n </e:Group>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/ScrollerSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.ScrollerSkin\" minWidth=\"20\" minHeight=\"20\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:HScrollBar id=\"horizontalScrollBar\" width=\"100%\" bottom=\"0\"/>\n <e:VScrollBar id=\"verticalScrollBar\" height=\"100%\" right=\"0\"/>\n</e:Skin>"
},
{
"path": "resource/eui_skins/TextInputSkin.exml",
"content": "<?xml version='1.0' encoding='utf-8'?>\n<e:Skin class=\"skins.TextInputSkin\" minHeight=\"40\" minWidth=\"300\" states=\"normal,disabled,normalWithPrompt,disabledWithPrompt\" xmlns:e=\"http://ns.egret.com/eui\">\n\t<e:Image width=\"100%\" height=\"100%\" scale9Grid=\"1,3,8,8\" source=\"button_up_png\"/>\n\t<e:Rect height=\"100%\" width=\"100%\" fillColor=\"0xffffff\"/>\n \t<e:EditableText id=\"textDisplay\" verticalCenter=\"0\" left=\"10\" right=\"10\"\n\t textColor=\"0x000000\" textColor.disabled=\"0xff0000\" width=\"100%\" height=\"24\" size=\"20\" />\n\t<e:Label id=\"promptDisplay\" verticalCenter=\"0\" left=\"10\" right=\"10\"\n\t textColor=\"0xa9a9a9\" width=\"100%\" height=\"24\" size=\"20\" touchEnabled=\"false\" includeIn=\"normalWithPrompt,disabledWithPrompt\"/>\n</e:Skin>"
},
{
"path": "resource/eui_skins/ToggleSwitchSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.ToggleSwitchSkin\" states=\"up,down,disabled,upAndSelected,downAndSelected,disabledAndSelected\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image source=\"on_png\"\n source.up=\"off_png\"\n source.down=\"off_png\"\n source.disabled=\"off_png\"/>\n <e:Image source=\"handle_png\"\n horizontalCenter=\"-18\"\n horizontalCenter.upAndSelected=\"18\"\n horizontalCenter.downAndSelected=\"18\"\n horizontalCenter.disabledAndSelected=\"18\"\n verticalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/VScrollBarSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.VScrollBarSkin\" minWidth=\"8\" minHeight=\"20\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image id=\"thumb\" source=\"roundthumb_png\" scale9Grid=\"3,3,2,2\" height=\"30\" width=\"8\" horizontalCenter=\"0\"/>\n</e:Skin>\n"
},
{
"path": "resource/eui_skins/VSliderSkin.exml",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<e:Skin class=\"skins.VSliderSkin\" minWidth=\"25\" minHeight=\"30\" xmlns:e=\"http://ns.egret.com/eui\">\n <e:Image id=\"track\" source=\"track_png\" scale9Grid=\"1,1,4,4\" width=\"7\" height=\"100%\" horizontalCenter=\"0\"/>\n <e:Image id=\"thumb\" source=\"thumb_png\" horizontalCenter=\"0\" />\n</e:Skin>\n"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<e:Skin class="skins.ButtonSkin" states="up,down,disabled" minHeight="50" minWidth="100" xmlns:e="http://ns.egret.com/eui">
<e:Image width="100%" height="100%" scale9Grid="1,3,8,8" alpha.disabled="0.5"
source="button_up_png"
source.down="button_down_png"/>
<e:Label id="labelDisplay" top="8" bottom="8" left="8" right="8"
size="20"
textColor="0xFFFFFF" verticalAlign="middle" textAlign="center"/>
<e:Image id="iconDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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 sign in to comment