Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hello_canvas
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
hello_canvas
Commits
8dbf83d0
Commit
8dbf83d0
authored
Aug 31, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
08e554f2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4694 additions
and
4 deletions
+4694
-4
app.jsx
project/src/app.jsx
+3
-3
output.js
project/src/canvas/game/output.js
+1562
-0
output.js.map
project/src/canvas/game/output.js.map
+1
-0
package.json
project/src/canvas/game/package.json
+1
-0
output.js
project/src/canvas/game/released/output.js
+1563
-0
copyJs.js
project/src/canvas/game/scripts/copyJs.js
+1
-1
output.js
project/src/pages/pagecanvas/output.js
+1563
-0
No files found.
project/src/app.jsx
View file @
8dbf83d0
...
...
@@ -3,15 +3,15 @@ import ReactDOM from "react-dom";
import
"./app.less"
;
import
{
MOCK_STATUS
}
from
'../sparkrc'
;
MOCK_STATUS
&&
(
require
(
'../mock/index'
));
import
MD
from
'./MD'
;
import
MD
from
'.
.
/MD'
;
MD
();
//此处为spark-cli动态生成
import
Page
mycanvaspage
from
"./pages/pagemycanvaspage/pagemycanvaspage
.jsx"
;
import
Page
Canvas
from
"./pages/pagecanvas/pagecanvas
.jsx"
;
class
App
extends
Component
{
render
()
{
return
(
<
Page
mycanvaspage
></
Pagemycanvaspage
>
<
Page
Canvas
></
PageCanvas
>
);
}
}
...
...
project/src/canvas/game/output.js
0 → 100644
View file @
8dbf83d0
(
function
webpackUniversalModuleDefinition
(
root
,
factory
)
{
if
(
typeof
exports
===
'object'
&&
typeof
module
===
'object'
)
module
.
exports
=
factory
();
else
if
(
typeof
define
===
'function'
&&
define
.
amd
)
define
([],
factory
);
else
{
var
a
=
factory
();
for
(
var
i
in
a
)
(
typeof
exports
===
'object'
?
exports
:
root
)[
i
]
=
a
[
i
];
}
})(
window
,
function
()
{
return
/******/
(
function
(
modules
)
{
// webpackBootstrap
/******/
// The module cache
/******/
var
installedModules
=
{};
/******/
/******/
// The require function
/******/
function
__webpack_require__
(
moduleId
)
{
/******/
/******/
// Check if module is in cache
/******/
if
(
installedModules
[
moduleId
])
{
/******/
return
installedModules
[
moduleId
].
exports
;
/******/
}
/******/
// Create a new module (and put it into the cache)
/******/
var
module
=
installedModules
[
moduleId
]
=
{
/******/
i
:
moduleId
,
/******/
l
:
false
,
/******/
exports
:
{}
/******/
};
/******/
/******/
// Execute the module function
/******/
modules
[
moduleId
].
call
(
module
.
exports
,
module
,
module
.
exports
,
__webpack_require__
);
/******/
/******/
// Flag the module as loaded
/******/
module
.
l
=
true
;
/******/
/******/
// Return the exports of the module
/******/
return
module
.
exports
;
/******/
}
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
__webpack_require__
.
m
=
modules
;
/******/
/******/
// expose the module cache
/******/
__webpack_require__
.
c
=
installedModules
;
/******/
/******/
// define getter function for harmony exports
/******/
__webpack_require__
.
d
=
function
(
exports
,
name
,
getter
)
{
/******/
if
(
!
__webpack_require__
.
o
(
exports
,
name
))
{
/******/
Object
.
defineProperty
(
exports
,
name
,
{
enumerable
:
true
,
get
:
getter
});
/******/
}
/******/
};
/******/
/******/
// define __esModule on exports
/******/
__webpack_require__
.
r
=
function
(
exports
)
{
/******/
if
(
typeof
Symbol
!==
'undefined'
&&
Symbol
.
toStringTag
)
{
/******/
Object
.
defineProperty
(
exports
,
Symbol
.
toStringTag
,
{
value
:
'Module'
});
/******/
}
/******/
Object
.
defineProperty
(
exports
,
'__esModule'
,
{
value
:
true
});
/******/
};
/******/
/******/
// create a fake namespace object
/******/
// mode & 1: value is a module id, require it
/******/
// mode & 2: merge all properties of value into the ns
/******/
// mode & 4: return value when already ns object
/******/
// mode & 8|1: behave like require
/******/
__webpack_require__
.
t
=
function
(
value
,
mode
)
{
/******/
if
(
mode
&
1
)
value
=
__webpack_require__
(
value
);
/******/
if
(
mode
&
8
)
return
value
;
/******/
if
((
mode
&
4
)
&&
typeof
value
===
'object'
&&
value
&&
value
.
__esModule
)
return
value
;
/******/
var
ns
=
Object
.
create
(
null
);
/******/
__webpack_require__
.
r
(
ns
);
/******/
Object
.
defineProperty
(
ns
,
'default'
,
{
enumerable
:
true
,
value
:
value
});
/******/
if
(
mode
&
2
&&
typeof
value
!=
'string'
)
for
(
var
key
in
value
)
__webpack_require__
.
d
(
ns
,
key
,
function
(
key
)
{
return
value
[
key
];
}.
bind
(
null
,
key
));
/******/
return
ns
;
/******/
};
/******/
/******/
// getDefaultExport function for compatibility with non-harmony modules
/******/
__webpack_require__
.
n
=
function
(
module
)
{
/******/
var
getter
=
module
&&
module
.
__esModule
?
/******/
function
getDefault
()
{
return
module
[
'default'
];
}
:
/******/
function
getModuleExports
()
{
return
module
;
};
/******/
__webpack_require__
.
d
(
getter
,
'a'
,
getter
);
/******/
return
getter
;
/******/
};
/******/
/******/
// Object.prototype.hasOwnProperty.call
/******/
__webpack_require__
.
o
=
function
(
object
,
property
)
{
return
Object
.
prototype
.
hasOwnProperty
.
call
(
object
,
property
);
};
/******/
/******/
// __webpack_public_path__
/******/
__webpack_require__
.
p
=
""
;
/******/
/******/
/******/
// Load entry module and return exports
/******/
return
__webpack_require__
(
__webpack_require__
.
s
=
"./src/Main.ts"
);
/******/
})
/************************************************************************/
/******/
({
/***/
"./module/RES.ts"
:
/*!***********************!*\
!*** ./module/RES.ts ***!
\***********************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES
;
(
function
(
RES
)
{
var
resData
;
var
videoEntityHash
=
{};
var
soundHash
=
{};
var
groupsCompleteHash
=
{};
var
groupsPromiseHash
=
{};
var
singleResPromiseHash
=
{};
function
loadConfig
(
res
)
{
resData
=
res
;
RES
.
resPath
=
res
.
path
;
}
RES
.
loadConfig
=
loadConfig
;
function
loadSparkAssets
(
resList
)
{
var
list
=
[];
for
(
var
key
in
resList
)
{
list
.
push
(
resList
[
key
]);
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
if
(
s
)
{
resolve
();
}
else
{
reject
();
}
},
list
);
});
return
p
;
}
RES
.
loadSparkAssets
=
loadSparkAssets
;
function
loadGroup
(
name
)
{
if
(
groupsCompleteHash
[
name
])
{
return
new
Promise
(
function
(
resolve
)
{
resolve
();
});
}
if
(
groupsPromiseHash
[
name
])
{
return
groupsPromiseHash
[
name
];
}
var
arr
=
getGroupResByName
(
name
);
if
(
!
arr
||
!
arr
.
length
)
{
groupsCompleteHash
[
name
]
=
true
;
return
new
Promise
(
function
(
resolve
)
{
resolve
();
});
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
delete
groupsPromiseHash
[
name
];
if
(
s
)
{
groupsCompleteHash
[
name
]
=
true
;
resolve
();
}
else
{
reject
();
}
},
arr
);
});
groupsPromiseHash
[
name
]
=
p
;
return
p
;
}
RES
.
loadGroup
=
loadGroup
;
function
getResAsync
(
str
,
comFun
,
thisObj
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
if
(
type
==
"png"
||
type
==
"jpg"
)
{
if
(
FYGE
.
TextureCache
[
str
])
{
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
new
Promise
(
function
(
r
)
{
r
(
FYGE
.
TextureCache
[
str
]);
});
}
else
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
FYGE
.
GlobalLoader
.
loadImage
(
function
(
s
,
image
)
{
if
(
s
)
{
FYGE
.
Texture
.
addToCache
(
FYGE
.
Texture
.
from
(
image
),
str
);
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
resolve
(
FYGE
.
TextureCache
[
str
]);
}
else
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
reject
();
}
},
str
);
});
}
}
}
RES
.
getResAsync
=
getResAsync
;
function
getResByUrl
()
{
}
RES
.
getResByUrl
=
getResByUrl
;
function
getRes
(
str
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
if
(
type
==
"png"
||
type
==
"jpg"
)
{
return
FYGE
.
TextureCache
[
str
]
||
null
;
}
}
RES
.
getRes
=
getRes
;
function
hasRes
(
str
)
{
for
(
var
i
=
0
;
i
<
resData
.
groups
.
length
;
i
++
)
{
var
group
=
resData
.
groups
[
i
];
var
keys
=
group
.
keys
;
if
(
keys
&&
keys
.
split
(
","
).
indexOf
(
str
)
>
-
1
)
{
return
group
.
name
;
}
if
(
group
.
atlas
&&
group
.
name
+
".json"
==
str
)
{
return
group
.
name
;
}
}
return
null
;
}
function
getGroupResByName
(
name
)
{
var
group
=
getGroupByName
(
name
);
if
(
!
group
)
return
null
;
if
(
group
.
atlas
)
{
var
arr
=
[
name
+
".json"
];
if
(
group
.
keys
)
{
arr
=
arr
.
concat
(
group
.
keys
.
split
(
","
).
filter
(
function
(
k
)
{
return
k
.
substr
(
-
4
)
!=
".png"
;
}));
}
return
arr
;
}
else
if
(
group
.
keys
)
{
return
group
.
keys
.
split
(
","
);
}
else
{
return
null
;
}
}
function
getGroupByName
(
name
)
{
var
groups
=
resData
.
groups
;
var
group
;
for
(
var
i
=
0
;
i
<
groups
.
length
;
i
++
)
{
if
(
groups
[
i
].
name
===
name
)
{
group
=
groups
[
i
];
break
;
}
}
return
group
;
}
function
loadResList
(
callback
,
arr
)
{
var
count
=
0
;
var
countAll
=
arr
.
length
;
if
(
!
countAll
)
callback
(
true
);
var
mark
=
true
;
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
var
resName
=
arr
[
i
][
'url'
];
getResAsync
(
resName
,
function
(
res
,
str
)
{
if
(
!
res
)
mark
=
false
;
if
(
++
count
==
countAll
)
callback
(
mark
);
},
this
);
}
}
RES
.
loadResList
=
loadResList
;
function
returnSingleResPromise
(
str
,
comFun
,
thisObj
)
{
singleResPromiseHash
[
str
].
then
(
function
(
r
)
{
comFun
&&
comFun
.
call
(
thisObj
,
r
,
str
);
},
function
()
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
});
return
singleResPromiseHash
[
str
];
}
var
skinData
;
function
loadSkinConfig
(
skinJson
)
{
skinData
=
skinJson
;
}
RES
.
loadSkinConfig
=
loadSkinConfig
;
function
initSkinDisplay
(
con
,
skin
,
root
)
{
var
data
=
typeof
(
skin
)
==
'string'
?
getSkinDataByName
(
skin
)
:
skin
;
if
(
!
data
.
children
||
!
data
.
children
.
length
)
return
;
for
(
var
i
=
0
;
i
<
data
.
children
.
length
;
i
++
)
{
var
child
=
data
.
children
[
i
];
if
(
child
.
type
==
"skin"
)
continue
;
var
dis
=
con
.
addChild
(
getDisplayByData
(
child
));
if
(
root
&&
child
.
id
)
root
[
child
.
id
]
=
dis
;
if
(
child
.
type
==
"container"
)
initSkinDisplay
(
dis
,
child
,
root
);
}
}
RES
.
initSkinDisplay
=
initSkinDisplay
;
function
getSkinDataByName
(
skinName
,
skinNode
)
{
if
(
skinNode
===
void
0
)
{
skinNode
=
skinData
;
}
if
(
!
skinNode
||
!
skinNode
.
children
||
!
skinNode
.
children
.
length
)
return
null
;
for
(
var
i
=
0
;
i
<
skinNode
.
children
.
length
;
i
++
)
{
var
child
=
skinNode
.
children
[
i
];
if
(
child
.
name
==
skinName
&&
(
child
.
type
==
"container"
||
child
.
type
==
"skin"
))
return
child
;
var
gson
=
getSkinDataByName
(
skinName
,
child
);
if
(
gson
)
return
gson
;
}
return
null
;
}
RES
.
getSkinDataByName
=
getSkinDataByName
;
function
getSrcByUuid
(
resList
,
uuid
)
{
resList
=
resList
||
[];
for
(
var
i
=
0
;
i
<
resList
.
length
;
i
++
)
{
if
(
resList
[
i
].
uuid
==
uuid
)
{
return
resList
[
i
].
url
;
}
}
return
""
;
}
RES
.
getSrcByUuid
=
getSrcByUuid
;
function
getDisplayByData
(
data
)
{
var
dis
;
switch
(
data
.
type
)
{
case
"container"
:
dis
=
new
FYGE
.
Container
();
break
;
case
"button"
:
dis
=
new
FYGE
.
Button
(
getRes
(
data
.
props
.
tUp
),
data
.
props
.
tDown
?
getRes
(
data
.
props
.
tDown
)
:
null
,
data
.
props
.
tDisable
?
getRes
(
data
.
props
.
tDisable
)
:
null
);
break
;
case
"text"
:
dis
=
new
FYGE
.
TextField
();
for
(
var
key
in
data
.
props
)
dis
[
key
]
=
data
.
props
[
key
];
break
;
case
"sprite"
:
dis
=
new
FYGE
.
Sprite
(
getRes
(
data
.
props
.
source
));
break
;
case
"rect"
:
dis
=
new
FYGE
.
Shape
();
dis
.
beginFill
(
FYGE
.
string2hex
(
data
.
props
.
fillColor
));
dis
.
drawRect
(
0
,
0
,
data
.
props
.
width
,
data
.
props
.
height
);
dis
.
endFill
();
break
;
}
dis
.
name
=
data
.
name
;
dis
.
alpha
=
data
.
alpha
||
1
;
dis
.
position
.
set
(
data
.
x
,
data
.
y
);
return
dis
;
}
function
destroyRES
()
{
}
})(
RES
=
exports
.
RES
||
(
exports
.
RES
=
{}));
/***/
}),
/***/
"./module/ctrls/index.ts"
:
/*!*******************************!*\
!*** ./module/ctrls/index.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
function
__export
(
m
)
{
for
(
var
p
in
m
)
if
(
!
exports
.
hasOwnProperty
(
p
))
exports
[
p
]
=
m
[
p
];
}
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
panelCtrl_1
=
__webpack_require__
(
/*! ./panelCtrl */
"./module/ctrls/panelCtrl.ts"
);
var
sceneCtrl_1
=
__webpack_require__
(
/*! ./sceneCtrl */
"./module/ctrls/sceneCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
toastCtrl_2
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
exports
.
showToast
=
toastCtrl_2
.
showToast
;
__export
(
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
));
exports
.
showPanel
=
function
(
panel
,
data
)
{
return
panelCtrl_1
.
default
.
instance
.
show
(
panel
,
data
);
};
exports
.
showConfirm
=
function
(
panel
,
data
)
{
var
confirmPanel
=
panelCtrl_1
.
default
.
instance
.
show
(
panel
,
data
);
return
confirmPanel
.
makePromise
();
};
exports
.
closeAllPanels
=
function
()
{
panelCtrl_1
.
default
.
instance
.
closeAll
();
};
exports
.
closeCurrentPanel
=
function
()
{
panelCtrl_1
.
default
.
instance
.
closeCurrent
();
};
exports
.
changeScene
=
function
(
scene
,
data
)
{
sceneCtrl_1
.
default
.
instance
.
change
(
scene
,
data
);
};
function
getCurrentScene
()
{
return
sceneCtrl_1
.
default
.
instance
.
currentScene
;
}
exports
.
getCurrentScene
=
getCurrentScene
;
exports
.
showAlert
=
function
(
title
,
content
)
{
if
(
my
)
{
my
.
alert
({
title
:
title
||
""
,
content
:
content
||
""
});
}
else
{
console
.
log
(
title
,
content
);
}
};
function
wait
(
callback
,
time
)
{
var
obj
=
{};
FYGE
.
Tween
.
get
(
obj
)
.
wait
(
time
)
.
call
(
callback
);
return
obj
;
}
exports
.
wait
=
wait
;
function
clearWait
(
obj
)
{
obj
&&
FYGE
.
Tween
.
removeTweens
(
obj
);
}
exports
.
clearWait
=
clearWait
;
function
removeTweens
(
obj
,
isRecursive
)
{
if
(
isRecursive
===
void
0
)
{
isRecursive
=
true
;
}
if
(
!
obj
)
return
;
FYGE
.
Tween
.
removeTweens
(
obj
);
if
(
!
isRecursive
||
!
obj
.
children
||
!
obj
.
children
.
length
)
return
;
obj
.
children
.
forEach
(
function
(
child
)
{
removeTweens
(
child
);
});
}
exports
.
removeTweens
=
removeTweens
;
function
destroyAllCtrls
()
{
toastCtrl_1
.
destroyToast
();
waitingCtrl_1
.
destroyWaiting
();
panelCtrl_1
.
default
.
instance
.
destroy
();
sceneCtrl_1
.
default
.
instance
.
destroy
();
}
exports
.
destroyAllCtrls
=
destroyAllCtrls
;
/***/
}),
/***/
"./module/ctrls/panelCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/panelCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
PanelCtrl
=
(
function
()
{
function
PanelCtrl
()
{
this
.
stacks
=
[];
}
Object
.
defineProperty
(
PanelCtrl
,
"instance"
,
{
get
:
function
()
{
return
PanelCtrl
.
_instance
||
(
PanelCtrl
.
_instance
=
new
PanelCtrl
());
},
enumerable
:
true
,
configurable
:
true
});
PanelCtrl
.
prototype
.
init
=
function
(
parent
)
{
this
.
_parent
=
parent
;
var
bg
=
new
FYGE
.
Shape
();
bg
.
beginFill
(
0
);
bg
.
drawRect
(
layers_1
.
layers
.
stageOffsetX
-
parent
.
x
,
layers_1
.
layers
.
stageOffsetY
-
parent
.
y
,
layers_1
.
layers
.
stageWidth
,
layers_1
.
layers
.
stageHeight
);
bg
.
endFill
();
bg
.
hitTestByPixel
=
false
;
bg
.
visible
=
false
;
this
.
_parent
.
addChild
(
bg
);
this
.
_bg
=
bg
;
};
PanelCtrl
.
prototype
.
closeAll
=
function
()
{
this
.
stacks
.
forEach
(
function
(
e
)
{
return
e
.
hidePanel
();
});
};
PanelCtrl
.
prototype
.
show
=
function
(
cls
,
data
)
{
var
_this
=
this
;
waitingCtrl_1
.
showWaiting
();
var
panel
=
new
cls
(
data
);
this
.
add
(
panel
);
this
.
stacks
.
push
(
panel
);
panel
.
onLoaded
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
_this
.
updateView
(
false
);
panel
.
start
(
data
);
if
(
panel
.
visible
)
panel
.
showAni
();
};
panel
.
onLoadError
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
toastCtrl_1
.
showToast
(
"资源加载失败"
);
panel
.
removeEventListener
(
'onDestroy'
,
_this
.
onPanelHide
,
_this
);
_this
.
remove
(
panel
);
};
return
panel
;
};
PanelCtrl
.
prototype
.
updateView
=
function
(
showPanelAni
)
{
var
_this
=
this
;
if
(
showPanelAni
===
void
0
)
{
showPanelAni
=
true
;
}
if
(
!
this
.
stacks
.
length
)
{
if
(
this
.
_bg
.
visible
)
{
this
.
bgAni
=
"hide"
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
FYGE
.
Tween
.
get
(
this
.
_bg
)
.
to
({
alpha
:
0
},
200
,
FYGE
.
Ease
.
cubicOut
)
.
call
(
function
()
{
_this
.
_bg
.
visible
=
false
;
_this
.
_current
=
null
;
_this
.
_parent
.
visible
=
false
;
});
}
}
else
{
this
.
_parent
.
visible
=
true
;
if
(
this
.
bgAni
==
"hide"
)
{
this
.
bgAni
=
"show"
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
this
.
_bg
.
alpha
=
0.7
;
}
if
(
this
.
_bg
.
visible
===
false
)
{
this
.
_bg
.
visible
=
true
;
this
.
_bg
.
alpha
=
0
;
FYGE
.
Tween
.
get
(
this
.
_bg
).
to
({
alpha
:
0.7
},
200
,
FYGE
.
Ease
.
cubicOut
);
}
}
for
(
var
i
=
0
;
i
<
this
.
stacks
.
length
;
i
++
)
{
if
(
i
<
this
.
stacks
.
length
-
1
)
{
this
.
stacks
[
i
].
visible
=
false
;
}
else
{
this
.
stacks
[
i
].
visible
=
true
;
if
(
showPanelAni
)
this
.
stacks
[
i
].
showAni
();
this
.
_current
=
this
.
stacks
[
i
];
}
}
};
PanelCtrl
.
prototype
.
add
=
function
(
panel
)
{
this
.
_parent
.
addChild
(
panel
);
panel
.
addEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
};
PanelCtrl
.
prototype
.
remove
=
function
(
panel
)
{
this
.
_parent
.
removeChild
(
panel
);
this
.
stacks
=
this
.
stacks
.
filter
(
function
(
e
)
{
return
e
!=
panel
;
});
};
PanelCtrl
.
prototype
.
onPanelHide
=
function
(
e
)
{
var
panel
=
e
.
target
;
panel
.
removeEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
this
.
remove
(
panel
);
this
.
updateView
();
};
PanelCtrl
.
prototype
.
closeCurrent
=
function
()
{
if
(
this
.
_current
)
{
this
.
_current
.
hidePanel
();
}
};
PanelCtrl
.
prototype
.
destroy
=
function
()
{
PanelCtrl
.
_instance
=
null
;
this
.
stacks
=
null
;
this
.
_current
=
null
;
this
.
_parent
=
null
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
this
.
_bg
=
null
;
};
return
PanelCtrl
;
}());
exports
.
default
=
PanelCtrl
;
/***/
}),
/***/
"./module/ctrls/sceneCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/sceneCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
SceneCtrl
=
(
function
()
{
function
SceneCtrl
()
{
}
Object
.
defineProperty
(
SceneCtrl
,
"instance"
,
{
get
:
function
()
{
return
SceneCtrl
.
_instance
||
(
SceneCtrl
.
_instance
=
new
SceneCtrl
());
},
enumerable
:
true
,
configurable
:
true
});
SceneCtrl
.
prototype
.
init
=
function
(
parent
)
{
this
.
_parent
=
parent
;
};
SceneCtrl
.
prototype
.
change
=
function
(
cls
,
data
)
{
var
_this
=
this
;
var
scene
=
new
cls
(
data
);
scene
.
visible
=
false
;
waitingCtrl_1
.
showWaiting
();
var
preScene
=
this
.
_currentScene
;
scene
.
onLoaded
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
scene
.
showAni
(
function
()
{
if
(
preScene
)
preScene
.
destroy
();
});
scene
.
visible
=
true
;
scene
.
start
(
data
);
};
scene
.
onLoadError
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
toastCtrl_1
.
showToast
(
"资源加载失败"
);
_this
.
_currentScene
=
preScene
||
null
;
_this
.
_parent
.
removeChild
(
scene
);
};
this
.
_currentScene
=
scene
;
this
.
_parent
.
addChild
(
scene
);
};
Object
.
defineProperty
(
SceneCtrl
.
prototype
,
"currentScene"
,
{
get
:
function
()
{
return
this
.
_currentScene
;
},
enumerable
:
true
,
configurable
:
true
});
SceneCtrl
.
prototype
.
destroy
=
function
()
{
SceneCtrl
.
_instance
=
null
;
this
.
_currentScene
=
null
;
this
.
_parent
=
null
;
};
return
SceneCtrl
;
}());
exports
.
default
=
SceneCtrl
;
/***/
}),
/***/
"./module/ctrls/toastCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/toastCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
inited
=
false
;
var
_toast
;
var
_parent
;
var
startY
;
var
endY
;
var
initToast
=
function
()
{
if
(
!
inited
)
{
inited
=
true
;
_toast
=
new
Toast
();
_parent
=
layers_1
.
layers
.
toastLayer
;
_toast
.
alpha
=
0
;
_toast
.
x
=
layers_1
.
layers
.
stageOffsetX
-
_parent
.
x
+
(
layers_1
.
layers
.
stageWidth
-
_toast
.
width
)
/
2
;
var
h
=
_toast
.
height
;
var
y
=
layers_1
.
layers
.
stageOffsetY
-
_parent
.
y
;
startY
=
y
-
h
;
endY
=
y
+
(
layers_1
.
layers
.
stageHeight
-
h
)
/
2
;
}
};
exports
.
showToast
=
function
(
msg
)
{
initToast
();
_toast
.
show
(
msg
);
_parent
.
addChild
(
_toast
);
FYGE
.
Tween
.
removeTweens
(
_toast
);
FYGE
.
Tween
.
get
(
_toast
)
.
set
({
y
:
startY
,
alpha
:
1
})
.
to
({
y
:
endY
},
500
,
FYGE
.
Ease
.
quartOut
)
.
wait
(
800
)
.
to
({
alpha
:
0
},
300
)
.
call
(
function
()
{
_parent
.
removeChild
(
_toast
);
});
};
exports
.
destroyToast
=
function
()
{
if
(
inited
&&
_toast
&&
!
_toast
.
destroyed
)
{
_toast
.
destroy
();
_toast
=
null
;
_parent
=
null
;
inited
=
false
;
}
};
var
Toast
=
(
function
(
_super
)
{
__extends
(
Toast
,
_super
);
function
Toast
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
PADDING
=
40
;
_this
.
mouseChildren
=
false
;
_this
.
mouseEnable
=
false
;
var
toastBgTexture
=
RES_1
.
RES
.
getRes
(
"toastBg.png"
);
if
(
toastBgTexture
)
{
_this
.
bg
=
new
FYGE
.
Sprite
(
toastBgTexture
);
_this
.
addChild
(
_this
.
bg
);
}
_this
.
msg
=
new
FYGE
.
TextField
();
_this
.
msg
.
size
=
28
;
_this
.
msg
.
fillColor
=
"0xffffff"
;
_this
.
msg
.
text
=
""
;
_this
.
msg
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
_this
.
msg
.
textHeight
=
toastBgTexture
?
toastBgTexture
.
height
:
200
;
_this
.
msg
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
_this
.
addChild
(
_this
.
msg
);
return
_this
;
}
Toast
.
prototype
.
show
=
function
(
msg
)
{
this
.
msg
.
text
=
msg
;
this
.
msg
.
x
=
((
this
.
bg
?
this
.
bg
.
width
:
0
)
-
this
.
msg
.
textWidth
)
/
2
;
};
Toast
.
prototype
.
destroy
=
function
()
{
_super
.
prototype
.
destroy
.
call
(
this
);
this
.
msg
=
null
;
this
.
bg
=
null
;
};
return
Toast
;
}(
FYGE
.
Container
));
/***/
}),
/***/
"./module/ctrls/waitingCtrl.ts"
:
/*!*************************************!*\
!*** ./module/ctrls/waitingCtrl.ts ***!
\*************************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
inited
=
false
;
var
_waiting
;
var
_parent
;
var
initWaiting
=
function
()
{
if
(
!
inited
)
{
inited
=
true
;
var
waiting
=
new
Waiting
();
_parent
=
layers_1
.
layers
.
topLayer
;
_waiting
=
waiting
;
var
offX
=
(
layers_1
.
layers
.
stageWidth
-
160
)
/
2
;
var
offY
=
(
layers_1
.
layers
.
stageHeight
-
_waiting
.
height
)
/
2
;
_waiting
.
x
=
layers_1
.
layers
.
stageOffsetX
-
_parent
.
x
+
offX
;
_waiting
.
y
=
layers_1
.
layers
.
stageOffsetY
-
_parent
.
y
+
offY
;
var
bg
=
new
FYGE
.
Graphics
()
.
beginFill
(
0x000000
)
.
drawRect
(
-
offX
,
-
offY
,
layers_1
.
layers
.
stageWidth
,
layers_1
.
layers
.
stageHeight
)
.
endFill
();
bg
.
alpha
=
0
;
_waiting
.
addChildAt
(
bg
,
0
);
}
};
exports
.
showWaiting
=
function
(
msg
)
{
initWaiting
();
_waiting
.
show
(
msg
);
_parent
.
addChild
(
_waiting
);
};
exports
.
hideWaiting
=
function
()
{
_parent
.
removeChild
(
_waiting
);
};
exports
.
destroyWaiting
=
function
()
{
if
(
inited
&&
_waiting
&&
!
_waiting
.
destroyed
)
{
_waiting
.
destroy
();
_waiting
=
null
;
_parent
=
null
;
inited
=
false
;
}
};
var
Waiting
=
(
function
(
_super
)
{
__extends
(
Waiting
,
_super
);
function
Waiting
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
rectBgTexture
=
RES_1
.
RES
.
getRes
(
"waitingBg.png"
);
if
(
rectBgTexture
)
{
var
rectBg
=
new
FYGE
.
Sprite
(
rectBgTexture
);
_this
.
addChild
(
rectBg
);
var
rotTexture
=
RES_1
.
RES
.
getRes
(
"waitingRot.png"
);
var
rot_1
=
new
FYGE
.
Sprite
(
rotTexture
);
rot_1
.
x
=
(
rectBgTexture
.
width
-
rotTexture
.
width
)
/
2
;
rot_1
.
y
=
47
;
rot_1
.
anchorX
=
rotTexture
.
width
/
2
;
rot_1
.
anchorY
=
rotTexture
.
height
/
2
;
_this
.
addChild
(
rot_1
);
var
count_1
=
0
;
rot_1
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
function
()
{
count_1
++
;
if
(
count_1
%
30
==
0
)
rot_1
.
rotation
+=
45
;
},
_this
);
}
_this
.
msg
=
new
FYGE
.
TextField
();
_this
.
msg
.
y
=
125
;
_this
.
msg
.
textWidth
=
rectBgTexture
?
rectBgTexture
.
width
:
200
;
_this
.
msg
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
_this
.
msg
.
size
=
26
;
_this
.
msg
.
fillColor
=
"#ffffff"
;
_this
.
addChild
(
_this
.
msg
);
return
_this
;
}
Waiting
.
prototype
.
show
=
function
(
msg
)
{
if
(
msg
===
void
0
)
{
msg
=
"加载中"
;
}
this
.
msg
.
text
=
msg
;
};
Waiting
.
prototype
.
destroy
=
function
()
{
_super
.
prototype
.
destroy
.
call
(
this
);
this
.
msg
=
null
;
};
return
Waiting
;
}(
FYGE
.
Container
));
/***/
}),
/***/
"./module/views/Module.ts"
:
/*!********************************!*\
!*** ./module/views/Module.ts ***!
\********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
ctrls_1
=
__webpack_require__
(
/*! ../ctrls */
"./module/ctrls/index.ts"
);
var
Module
=
(
function
(
_super
)
{
__extends
(
Module
,
_super
);
function
Module
(
data
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
data
=
data
;
_this
.
init
();
return
_this
;
}
Module
.
prototype
.
init
=
function
()
{
var
_this
=
this
;
this
.
preLoadRes
().
then
(
function
()
{
if
(
_this
.
skinName
)
RES_1
.
RES
.
initSkinDisplay
(
_this
,
_this
.
skinName
,
_this
);
_this
.
initUi
();
_this
.
onLoaded
&&
_this
.
onLoaded
();
},
function
()
{
_this
.
onLoadError
&&
_this
.
onLoadError
();
});
};
Module
.
prototype
.
preLoadRes
=
function
()
{
var
_this
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
_this
.
groupNames
&&
_this
.
groupNames
.
length
)
{
var
arr
=
[];
for
(
var
i
=
0
;
i
<
_this
.
groupNames
.
length
;
i
++
)
{
arr
.
push
(
RES_1
.
RES
.
loadGroup
(
_this
.
groupNames
[
i
]));
}
Promise
.
all
(
arr
).
then
(
resolve
,
reject
);
}
else
{
resolve
();
}
});
};
Module
.
prototype
.
initUi
=
function
()
{
};
Object
.
defineProperty
(
Module
.
prototype
,
"groupNames"
,
{
get
:
function
()
{
return
null
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Module
.
prototype
,
"skinName"
,
{
get
:
function
()
{
return
null
;
},
enumerable
:
true
,
configurable
:
true
});
;
Module
.
prototype
.
start
=
function
(
data
)
{
this
.
initEvents
();
};
Module
.
prototype
.
initEvents
=
function
()
{
};
Module
.
prototype
.
removeEvents
=
function
()
{
};
Module
.
prototype
.
enableMouseEvt
=
function
(
enable
)
{
this
.
mouseEnable
=
enable
;
this
.
mouseChildren
=
enable
;
};
Module
.
prototype
.
btnDelay
=
function
(
target
,
delay
)
{
if
(
delay
===
void
0
)
{
delay
=
2000
;
}
target
.
mouseEnable
=
false
;
target
.
mouseChildren
=
false
;
setTimeout
(
function
()
{
target
.
mouseEnable
=
true
;
target
.
mouseChildren
=
true
;
},
delay
);
};
Module
.
prototype
.
destroy
=
function
()
{
ctrls_1
.
removeTweens
(
this
);
this
.
removeEvents
();
this
.
dispatchEvent
(
"onDestroy"
);
_super
.
prototype
.
destroy
.
call
(
this
);
};
return
Module
;
}(
FYGE
.
Container
));
exports
.
Module
=
Module
;
/***/
}),
/***/
"./module/views/Scene.ts"
:
/*!*******************************!*\
!*** ./module/views/Scene.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
Module_1
=
__webpack_require__
(
/*! ./Module */
"./module/views/Module.ts"
);
var
Scene
=
(
function
(
_super
)
{
__extends
(
Scene
,
_super
);
function
Scene
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Scene
.
prototype
.
showAni
=
function
(
callback
)
{
callback
();
};
Scene
.
prototype
.
updateScene
=
function
()
{
};
return
Scene
;
}(
Module_1
.
Module
));
exports
.
Scene
=
Scene
;
/***/
}),
/***/
"./module/views/layers.ts"
:
/*!********************************!*\
!*** ./module/views/layers.ts ***!
\********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
panelCtrl_1
=
__webpack_require__
(
/*! ../ctrls/panelCtrl */
"./module/ctrls/panelCtrl.ts"
);
var
sceneCtrl_1
=
__webpack_require__
(
/*! ../ctrls/sceneCtrl */
"./module/ctrls/sceneCtrl.ts"
);
var
Layers
=
(
function
(
_super
)
{
__extends
(
Layers
,
_super
);
function
Layers
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Layers
.
prototype
.
init
=
function
(
stage
)
{
stage
.
addChild
(
this
);
var
arr
=
[
"_bottomLayer"
,
"_sceneLayer"
,
"_popupLayer"
,
"_toastLayer"
,
"_topLayer"
,
"_shareLayer"
];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
this
[
arr
[
i
]]
=
new
FYGE
.
Container
();
this
.
addChild
(
this
[
arr
[
i
]]);
}
this
.
sceneLayer
.
y
=
this
.
stageOffsetY
;
this
.
shareLayer
.
y
=
-
this
.
stageOffsetY
;
sceneCtrl_1
.
default
.
instance
.
init
(
this
.
sceneLayer
);
panelCtrl_1
.
default
.
instance
.
init
(
this
.
popupLayer
);
};
Object
.
defineProperty
(
Layers
.
prototype
,
"bottomLayer"
,
{
get
:
function
()
{
return
this
.
_bottomLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"sceneLayer"
,
{
get
:
function
()
{
return
this
.
_sceneLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"popupLayer"
,
{
get
:
function
()
{
return
this
.
_popupLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"toastLayer"
,
{
get
:
function
()
{
return
this
.
_toastLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"topLayer"
,
{
get
:
function
()
{
return
this
.
_topLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"shareLayer"
,
{
get
:
function
()
{
return
this
.
_shareLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageHeight"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
height
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageWidth"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
width
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageOffsetX"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
x
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageOffsetY"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
y
;
},
enumerable
:
true
,
configurable
:
true
});
return
Layers
;
}(
FYGE
.
Container
));
exports
.
layers
=
new
Layers
();
function
destroyLayers
()
{
exports
.
layers
.
removeChildren
();
if
(
exports
.
layers
.
parent
)
exports
.
layers
.
parent
.
removeChild
(
exports
.
layers
);
}
exports
.
destroyLayers
=
destroyLayers
;
/***/
}),
/***/
"./resCanvasList.js"
:
/*!**************************!*\
!*** ./resCanvasList.js ***!
\**************************/
/*! exports provided: default */
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
__webpack_require__
.
r
(
__webpack_exports__
);
const
resCanvasList
=
{
'4ee17a9c-5deb-43be-b205-16fb7593d172'
:
{
name
:
'spark'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png'
,
uuid
:
'4ee17a9c-5deb-43be-b205-16fb7593d172'
}
};
/* harmony default export */
__webpack_exports__
[
"default"
]
=
(
resCanvasList
);
// const resList = {
// '4ee17a9c-5deb-43be-b205-16fb7593d172': {
// name: 'spark',
// ext: '.png',
// url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
// uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
// }
// };
// export default resList;
/***/
}),
/***/
"./src/Main.ts"
:
/*!*********************!*\
!*** ./src/Main.ts ***!
\*********************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
var
__awaiter
=
(
this
&&
this
.
__awaiter
)
||
function
(
thisArg
,
_arguments
,
P
,
generator
)
{
return
new
(
P
||
(
P
=
Promise
))(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
step
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
"throw"
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
result
.
done
?
resolve
(
result
.
value
)
:
new
P
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
step
((
generator
=
generator
.
apply
(
thisArg
,
_arguments
||
[])).
next
());
});
};
var
__generator
=
(
this
&&
this
.
__generator
)
||
function
(
thisArg
,
body
)
{
var
_
=
{
label
:
0
,
sent
:
function
()
{
if
(
t
[
0
]
&
1
)
throw
t
[
1
];
return
t
[
1
];
},
trys
:
[],
ops
:
[]
},
f
,
y
,
t
,
g
;
return
g
=
{
next
:
verb
(
0
),
"throw"
:
verb
(
1
),
"return"
:
verb
(
2
)
},
typeof
Symbol
===
"function"
&&
(
g
[
Symbol
.
iterator
]
=
function
()
{
return
this
;
}),
g
;
function
verb
(
n
)
{
return
function
(
v
)
{
return
step
([
n
,
v
]);
};
}
function
step
(
op
)
{
if
(
f
)
throw
new
TypeError
(
"Generator is already executing."
);
while
(
_
)
try
{
if
(
f
=
1
,
y
&&
(
t
=
op
[
0
]
&
2
?
y
[
"return"
]
:
op
[
0
]
?
y
[
"throw"
]
||
((
t
=
y
[
"return"
])
&&
t
.
call
(
y
),
0
)
:
y
.
next
)
&&
!
(
t
=
t
.
call
(
y
,
op
[
1
])).
done
)
return
t
;
if
(
y
=
0
,
t
)
op
=
[
op
[
0
]
&
2
,
t
.
value
];
switch
(
op
[
0
])
{
case
0
:
case
1
:
t
=
op
;
break
;
case
4
:
_
.
label
++
;
return
{
value
:
op
[
1
],
done
:
false
};
case
5
:
_
.
label
++
;
y
=
op
[
1
];
op
=
[
0
];
continue
;
case
7
:
op
=
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
default
:
if
(
!
(
t
=
_
.
trys
,
t
=
t
.
length
>
0
&&
t
[
t
.
length
-
1
])
&&
(
op
[
0
]
===
6
||
op
[
0
]
===
2
))
{
_
=
0
;
continue
;
}
if
(
op
[
0
]
===
3
&&
(
!
t
||
(
op
[
1
]
>
t
[
0
]
&&
op
[
1
]
<
t
[
3
])))
{
_
.
label
=
op
[
1
];
break
;
}
if
(
op
[
0
]
===
6
&&
_
.
label
<
t
[
1
])
{
_
.
label
=
t
[
1
];
t
=
op
;
break
;
}
if
(
t
&&
_
.
label
<
t
[
2
])
{
_
.
label
=
t
[
2
];
_
.
ops
.
push
(
op
);
break
;
}
if
(
t
[
2
])
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
}
op
=
body
.
call
(
thisArg
,
_
);
}
catch
(
e
)
{
op
=
[
6
,
e
];
y
=
0
;
}
finally
{
f
=
t
=
0
;
}
if
(
op
[
0
]
&
5
)
throw
op
[
1
];
return
{
value
:
op
[
0
]
?
op
[
1
]
:
void
0
,
done
:
true
};
}
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../module/RES */
"./module/RES.ts"
);
var
layers_1
=
__webpack_require__
(
/*! ../module/views/layers */
"./module/views/layers.ts"
);
var
G_EVENT_1
=
__webpack_require__
(
/*! ./common/G_EVENT */
"./src/common/G_EVENT.ts"
);
var
ctrls_1
=
__webpack_require__
(
/*! ../module/ctrls */
"./module/ctrls/index.ts"
);
var
StartScene_1
=
__webpack_require__
(
/*! ./scenes/StartScene */
"./src/scenes/StartScene.ts"
);
var
TaoBaoNet_1
=
__webpack_require__
(
/*! ./TaoBaoNet */
"./src/TaoBaoNet.ts"
);
var
resCanvasList_1
=
__webpack_require__
(
/*! ../resCanvasList */
"./resCanvasList.js"
);
exports
.
GDispatcher
=
new
FYGE
.
EventDispatcher
();
var
Main
=
(
function
()
{
function
Main
(
canvas
)
{
var
sysInfo
;
if
(
my
)
{
FYGE
.
initedByCanvas
(
canvas
);
sysInfo
=
my
.
getSystemInfoSync
();
}
var
stage
=
new
FYGE
.
Stage
(
canvas
,
750
,
1624
,
sysInfo
&&
sysInfo
.
windowWidth
||
document
.
body
.
clientWidth
,
sysInfo
&&
sysInfo
.
windowHeight
||
document
.
body
.
clientHeight
,
FYGE
.
RENDERER_TYPE
.
CANVAS
);
this
.
stage
=
stage
;
stage
.
addEventListener
(
FYGE
.
Event
.
INIT_STAGE
,
this
.
onAddToStage
,
this
);
var
self
=
this
;
loop
();
function
loop
()
{
if
(
!
self
.
_pause
)
{
FYGE
.
Tween
.
flush
();
stage
.
flush
();
}
self
.
requestID
=
FYGE
.
getRequestAnimationFrame
()(
loop
);
}
}
Main
.
prototype
.
onAddToStage
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
layers_1
.
layers
.
init
(
this
.
stage
);
console
.
log
(
"初始化层级完成"
);
return
[
4
,
RES_1
.
RES
.
loadSparkAssets
(
resCanvasList_1
.
default
)];
case
1
:
_a
.
sent
();
console
.
log
(
"通用资源加载完成"
);
ctrls_1
.
changeScene
(
StartScene_1
.
StartScene
);
return
[
2
];
}
});
});
};
Main
.
prototype
.
run
=
function
()
{
this
.
_pause
=
false
;
exports
.
GDispatcher
.
dispatchEvent
(
G_EVENT_1
.
G_EVENT
.
ON_SHOW
);
};
Main
.
prototype
.
pause
=
function
()
{
exports
.
GDispatcher
.
dispatchEvent
(
G_EVENT_1
.
G_EVENT
.
ON_HIDE
);
};
Main
.
prototype
.
addGlobalEvent
=
function
(
name
,
fun
,
thisObj
,
once
)
{
if
(
once
===
void
0
)
{
once
=
false
;
}
if
(
once
)
{
exports
.
GDispatcher
.
once
(
name
,
fun
,
thisObj
);
}
else
{
exports
.
GDispatcher
.
addEventListener
(
name
,
fun
,
thisObj
);
}
};
Main
.
prototype
.
dispatchGlobalEvent
=
function
(
name
,
data
)
{
exports
.
GDispatcher
.
dispatchEvent
(
name
,
data
);
};
Main
.
prototype
.
removeGlobalEvent
=
function
(
name
,
fun
,
thisObj
)
{
exports
.
GDispatcher
.
removeEventListener
(
name
,
fun
,
thisObj
);
};
Main
.
prototype
.
destroy
=
function
()
{
FYGE
.
Tween
.
removeAllTweens
();
FYGE
.
getCancelAnimationFrame
()(
this
.
requestID
);
layers_1
.
destroyLayers
();
ctrls_1
.
destroyAllCtrls
();
this
.
stage
.
destroy
();
exports
.
GDispatcher
.
removeAllEventListener
();
TaoBaoNet_1
.
destroyNetData
();
};
return
Main
;
}());
exports
.
Main
=
Main
;
/***/
}),
/***/
"./src/TaoBaoNet.ts"
:
/*!**************************!*\
!*** ./src/TaoBaoNet.ts ***!
\**************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
var
__awaiter
=
(
this
&&
this
.
__awaiter
)
||
function
(
thisArg
,
_arguments
,
P
,
generator
)
{
return
new
(
P
||
(
P
=
Promise
))(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
step
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
"throw"
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
result
.
done
?
resolve
(
result
.
value
)
:
new
P
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
step
((
generator
=
generator
.
apply
(
thisArg
,
_arguments
||
[])).
next
());
});
};
var
__generator
=
(
this
&&
this
.
__generator
)
||
function
(
thisArg
,
body
)
{
var
_
=
{
label
:
0
,
sent
:
function
()
{
if
(
t
[
0
]
&
1
)
throw
t
[
1
];
return
t
[
1
];
},
trys
:
[],
ops
:
[]
},
f
,
y
,
t
,
g
;
return
g
=
{
next
:
verb
(
0
),
"throw"
:
verb
(
1
),
"return"
:
verb
(
2
)
},
typeof
Symbol
===
"function"
&&
(
g
[
Symbol
.
iterator
]
=
function
()
{
return
this
;
}),
g
;
function
verb
(
n
)
{
return
function
(
v
)
{
return
step
([
n
,
v
]);
};
}
function
step
(
op
)
{
if
(
f
)
throw
new
TypeError
(
"Generator is already executing."
);
while
(
_
)
try
{
if
(
f
=
1
,
y
&&
(
t
=
op
[
0
]
&
2
?
y
[
"return"
]
:
op
[
0
]
?
y
[
"throw"
]
||
((
t
=
y
[
"return"
])
&&
t
.
call
(
y
),
0
)
:
y
.
next
)
&&
!
(
t
=
t
.
call
(
y
,
op
[
1
])).
done
)
return
t
;
if
(
y
=
0
,
t
)
op
=
[
op
[
0
]
&
2
,
t
.
value
];
switch
(
op
[
0
])
{
case
0
:
case
1
:
t
=
op
;
break
;
case
4
:
_
.
label
++
;
return
{
value
:
op
[
1
],
done
:
false
};
case
5
:
_
.
label
++
;
y
=
op
[
1
];
op
=
[
0
];
continue
;
case
7
:
op
=
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
default
:
if
(
!
(
t
=
_
.
trys
,
t
=
t
.
length
>
0
&&
t
[
t
.
length
-
1
])
&&
(
op
[
0
]
===
6
||
op
[
0
]
===
2
))
{
_
=
0
;
continue
;
}
if
(
op
[
0
]
===
3
&&
(
!
t
||
(
op
[
1
]
>
t
[
0
]
&&
op
[
1
]
<
t
[
3
])))
{
_
.
label
=
op
[
1
];
break
;
}
if
(
op
[
0
]
===
6
&&
_
.
label
<
t
[
1
])
{
_
.
label
=
t
[
1
];
t
=
op
;
break
;
}
if
(
t
&&
_
.
label
<
t
[
2
])
{
_
.
label
=
t
[
2
];
_
.
ops
.
push
(
op
);
break
;
}
if
(
t
[
2
])
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
}
op
=
body
.
call
(
thisArg
,
_
);
}
catch
(
e
)
{
op
=
[
6
,
e
];
y
=
0
;
}
finally
{
f
=
t
=
0
;
}
if
(
op
[
0
]
&
5
)
throw
op
[
1
];
return
{
value
:
op
[
0
]
?
op
[
1
]
:
void
0
,
done
:
true
};
}
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
ctrls_1
=
__webpack_require__
(
/*! ../module/ctrls */
"./module/ctrls/index.ts"
);
var
Main_1
=
__webpack_require__
(
/*! ./Main */
"./src/Main.ts"
);
var
TbNetName
;
(
function
(
TbNetName
)
{
TbNetName
[
"trackingReport"
]
=
"squirrelsAdoptRest2c.trackingReport"
;
TbNetName
[
"getIndex"
]
=
"babycare.getIndex"
;
TbNetName
[
"getActivityBaseInfoById"
]
=
"babycare.getActivityBaseInfoById"
;
TbNetName
[
"getGameInfo"
]
=
"babycare.getGameInfo"
;
TbNetName
[
"consumerTools"
]
=
"babycare.consumerTools"
;
TbNetName
[
"gameOver"
]
=
"babycare.gameOver"
;
TbNetName
[
"receiveTaskRewards"
]
=
"babycare.receiveTaskRewards"
;
TbNetName
[
"exchange"
]
=
"babycare.exchange"
;
TbNetName
[
"getPrizesByLevel"
]
=
"babycare.getPrizesByLevel"
;
TbNetName
[
"queryCredits"
]
=
"babycare.queryCredits"
;
TbNetName
[
"dojoin"
]
=
"babycare.dojoin"
;
TbNetName
[
"completeTask"
]
=
"babycare.completeTask"
;
TbNetName
[
"getTaskList"
]
=
"babycare.getTaskList"
;
TbNetName
[
"authorize"
]
=
"mine.authorize"
;
TbNetName
[
"favorShop"
]
=
"mine.favorShop"
;
TbNetName
[
"getUserAddress"
]
=
"mine.getUserAddress"
;
TbNetName
[
"getAdoptName"
]
=
"mine.getAdoptName"
;
TbNetName
[
"getAppData"
]
=
"mine.getAppData"
;
TbNetName
[
"navigateToOutside"
]
=
"mine.navigateToOutside"
;
TbNetName
[
"navigateTo"
]
=
"mine.navigateTo"
;
TbNetName
[
"navigateBack"
]
=
"mine.navigateBack"
;
TbNetName
[
"showSharePanel"
]
=
"mine.showSharePanel"
;
TbNetName
[
"openDetail"
]
=
"mine.openDetail"
;
TbNetName
[
"reportAnalytics"
]
=
"mine.reportAnalytics"
;
})(
TbNetName
=
exports
.
TbNetName
||
(
exports
.
TbNetName
=
{}));
var
dataRecord
=
{};
var
fc
;
function
sendTbNet
(
netName
,
parameter
,
callback
,
hideMsg
)
{
if
(
hideMsg
===
void
0
)
{
hideMsg
=
false
;
}
return
new
Promise
(
function
(
resolve
,
reject
)
{
var
waitObj
;
if
(
!
my
)
{
var
url
=
"../../mock/miniTb/"
+
netName
+
".json"
;
fetchAsync
(
url
)
.
then
(
function
(
data
)
{
dataRecord
[
netName
]
=
data
;
if
(
!
hideMsg
&&
!
data
.
success
)
ctrls_1
.
showToast
(
data
.
message
||
"网络异常"
);
callback
&&
callback
(
data
.
success
,
data
);
resolve
(
data
);
console
.
log
(
"
\n
%c[ mock ]
\n
"
+
(
"NAME : "
+
netName
+
"
\n
"
)
+
"STATE : %o
\n
"
+
"PARAM : %o
\n
"
+
"%cDATA : %o
\n
"
,
""
+
(
data
.
success
?
'color:green'
:
'color:red'
),
data
.
success
,
parameter
,
""
+
(
data
.
success
?
'color:green'
:
'color:red'
),
data
);
},
function
()
{
});
return
;
}
var
fun
=
function
(
e
)
{
ctrls_1
.
clearWait
(
waitObj
);
Main_1
.
GDispatcher
.
removeEventListener
(
netName
,
fun
);
var
d
=
e
.
data
;
dataRecord
[
netName
]
=
d
;
if
(
!
hideMsg
&&
!
d
.
success
)
ctrls_1
.
showToast
(
d
.
message
||
"网络超时"
);
callback
&&
callback
(
d
.
success
,
d
);
resolve
(
d
);
console
.
log
(
"
\n
%c[ request ]
\n
"
+
(
"NAME : "
+
netName
+
"
\n
"
)
+
"STATE : %o
\n
"
+
"PARAM : %o
\n
"
+
"%cDATA : %o
\n
"
,
""
+
(
d
.
success
?
'color:green'
:
'color:red'
),
d
.
success
,
parameter
,
""
+
(
d
.
success
?
'color:green'
:
'color:red'
),
d
);
};
Main_1
.
GDispatcher
.
addEventListener
(
netName
,
fun
);
waitObj
=
ctrls_1
.
wait
(
function
()
{
if
(
netName
!=
TbNetName
.
favorShop
&&
netName
!=
TbNetName
.
getUserAddress
&&
netName
!=
TbNetName
.
authorize
&&
netName
!=
TbNetName
.
getAdoptName
&&
netName
!=
TbNetName
.
trackingReport
&&
netName
!=
TbNetName
.
reportAnalytics
)
{
fun
({
type
:
netName
,
data
:
{
success
:
false
}
});
}
},
10000
);
Main_1
.
GDispatcher
.
dispatchEvent
({
type
:
"onMessage"
},
{
netName
:
netName
,
parameter
:
parameter
});
});
}
exports
.
sendTbNet
=
sendTbNet
;
function
getTbData
(
netName
)
{
return
dataRecord
[
netName
]
||
null
;
}
exports
.
getTbData
=
getTbData
;
function
destroyNetData
()
{
dataRecord
=
{};
}
exports
.
destroyNetData
=
destroyNetData
;
function
fetchAsync
(
url
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
response
,
data
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
return
[
4
,
fetch
(
url
)];
case
1
:
response
=
_a
.
sent
();
return
[
4
,
response
.
json
()];
case
2
:
data
=
_a
.
sent
();
return
[
2
,
data
];
}
});
});
}
var
codeMsg
=
{
"210001"
:
"服务器异常"
,
"210002"
:
"用户不存在"
,
"210003"
:
"邀请已达上限"
,
"210004"
:
"无法邀请自己"
,
"210006"
:
"该活动ID无效"
,
"210009"
:
"该活动暂未开始"
,
"210010"
:
"该分享ID不存在"
,
"210012"
:
"该用户暂未获奖"
,
"210013"
:
"领取失败"
,
"210015"
:
"该活动已删除"
,
"210016"
:
"该活动已经结束"
,
"210017"
:
"该奖品已达领取上线"
,
"210018"
:
"请先分享好友"
,
"210019"
:
"暂有奖品未领取"
,
"210020"
:
"暂有奖品未完成"
,
"210021"
:
"请先玩一局游戏"
,
"210022"
:
"请先选择奖品"
,
"210023"
:
"领取失败,库存不足"
,
"210024"
:
"请先成为会员"
,
"210025"
:
"奖品已经过期"
,
"210026"
:
"不能重复助力"
,
"210028"
:
"请至我的奖品页重新领取"
,
};
/***/
}),
/***/
"./src/common/G_EVENT.ts"
:
/*!*******************************!*\
!*** ./src/common/G_EVENT.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
G_EVENT
;
(
function
(
G_EVENT
)
{
G_EVENT
[
"ON_SHOW"
]
=
"onShow"
;
G_EVENT
[
"ON_HIDE"
]
=
"onHide"
;
G_EVENT
[
"UPDATE_TASK"
]
=
"UpdateTask"
;
})(
G_EVENT
=
exports
.
G_EVENT
||
(
exports
.
G_EVENT
=
{}));
/***/
}),
/***/
"./src/scenes/Root.ts"
:
/*!****************************!*\
!*** ./src/scenes/Root.ts ***!
\****************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../../module/RES */
"./module/RES.ts"
);
var
resCanvasList_1
=
__webpack_require__
(
/*! ../../resCanvasList */
"./resCanvasList.js"
);
var
Root
=
(
function
(
_super
)
{
__extends
(
Root
,
_super
);
function
Root
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
bg
=
new
FYGE
.
Sprite
();
bg
.
x
=
0
;
bg
.
y
=
0
;
bg
.
texture
=
RES_1
.
RES
.
getRes
(
resCanvasList_1
.
default
[
"4ee17a9c-5deb-43be-b205-16fb7593d172"
].
url
);
_this
.
addChild
(
bg
);
return
_this
;
}
return
Root
;
}(
FYGE
.
Container
));
exports
.
default
=
Root
;
/***/
}),
/***/
"./src/scenes/StartScene.ts"
:
/*!**********************************!*\
!*** ./src/scenes/StartScene.ts ***!
\**********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
Scene_1
=
__webpack_require__
(
/*! ../../module/views/Scene */
"./module/views/Scene.ts"
);
var
Root_1
=
__webpack_require__
(
/*! ./Root */
"./src/scenes/Root.ts"
);
var
StartScene
=
(
function
(
_super
)
{
__extends
(
StartScene
,
_super
);
function
StartScene
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
StartScene
.
prototype
.
initUi
=
function
()
{
_super
.
prototype
.
initUi
.
call
(
this
);
var
canvas
=
new
FYGE
.
Container
();
canvas
.
position
.
set
(
0
,
0
);
this
.
addChild
(
canvas
);
};
StartScene
.
prototype
.
start
=
function
()
{
this
.
addChild
(
new
Root_1
.
default
());
};
return
StartScene
;
}(
Scene_1
.
Scene
));
exports
.
StartScene
=
StartScene
;
/***/
})
/******/
});
});
//# sourceMappingURL=output.js.map
\ No newline at end of file
project/src/canvas/game/output.js.map
0 → 100644
View file @
8dbf83d0
{
"version"
:
3
,
"sources"
:
[
"webpack:///webpack/universalModuleDefinition"
,
"webpack:///webpack/bootstrap"
,
"webpack:///./module/RES.ts"
,
"webpack:///./module/ctrls/index.ts"
,
"webpack:///./module/ctrls/panelCtrl.ts"
,
"webpack:///./module/ctrls/sceneCtrl.ts"
,
"webpack:///./module/ctrls/toastCtrl.ts"
,
"webpack:///./module/ctrls/waitingCtrl.ts"
,
"webpack:///./module/views/Module.ts"
,
"webpack:///./module/views/Scene.ts"
,
"webpack:///./module/views/layers.ts"
,
"webpack:///./resCanvasList.js"
,
"webpack:///./src/Main.ts"
,
"webpack:///./src/TaoBaoNet.ts"
,
"webpack:///./src/common/G_EVENT.ts"
,
"webpack:///./src/scenes/Root.ts"
,
"webpack:///./src/scenes/StartScene.ts"
],
"names"
:
[],
"mappings"
:
"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;ACbA,IAAiB,GAAG,CAoXnB;AApXD,WAAiB,GAAG;IAChB,IAAI,OAAgB;IAQpB,IAAI,eAAe,GAEf,EAAE,CAAC;IAIP,IAAI,SAAS,GAAG,EAAE;IAIlB,IAAI,kBAAkB,GAElB,EAAE;IAIN,IAAI,iBAAiB,GAEjB,EAAE;IAIN,IAAI,oBAAoB,GAEpB,EAAE;IAeN,oBAA2B,GAAG;QAC1B,OAAO,GAAG,GAAG,CAAC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AG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAED,0BAAK,GAAL;QACE,IAAI,CAAC,QAAQ,CAAC,IAAI,cAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IACH,iBAAC;AAAD,CAAC,CAX+B,aAAK,GAWpC;AAXY,gCAAU"
,
"file"
:
"output.js"
,
"sourcesContent"
:
[
"(function webpackUniversalModuleDefinition(root, factory) {\n
\t
if(typeof exports === 'object' && typeof module === 'object')
\n\t\t
module.exports = factory();
\n\t
else if(typeof define === 'function' && define.amd)
\n\t\t
define([], factory);
\n\t
else {\n
\t\t
var a = factory();
\n\t\t
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
\n\t
}
\n
})(window, function() {\nreturn "
,
"
\t
// The module cache
\n
\t
var installedModules = {};
\n\n
\t
// The require function
\n
\t
function __webpack_require__(moduleId) {\n
\n
\t\t
// Check if module is in cache
\n
\t\t
if(installedModules[moduleId]) {\n
\t\t\t
return installedModules[moduleId].exports;
\n
\t\t
}
\n
\t\t
// Create a new module (and put it into the cache)
\n
\t\t
var module = installedModules[moduleId] = {\n
\t\t\t
i: moduleId,
\n
\t\t\t
l: false,
\n
\t\t\t
exports: {}
\n
\t\t
};
\n\n
\t\t
// Execute the module function
\n
\t\t
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
\n\n
\t\t
// Flag the module as loaded
\n
\t\t
module.l = true;
\n\n
\t\t
// Return the exports of the module
\n
\t\t
return module.exports;
\n
\t
}
\n\n\n
\t
// expose the modules object (__webpack_modules__)
\n
\t
__webpack_require__.m = modules;
\n\n
\t
// expose the module cache
\n
\t
__webpack_require__.c = installedModules;
\n\n
\t
// define getter function for harmony exports
\n
\t
__webpack_require__.d = function(exports, name, getter) {\n
\t\t
if(!__webpack_require__.o(exports, name)) {\n
\t\t\t
Object.defineProperty(exports, name, { enumerable: true, get: getter });
\n
\t\t
}
\n
\t
};
\n\n
\t
// define __esModule on exports
\n
\t
__webpack_require__.r = function(exports) {\n
\t\t
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n
\t\t\t
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
\n
\t\t
}
\n
\t\t
Object.defineProperty(exports, '__esModule', { value: true });
\n
\t
};
\n\n
\t
// create a fake namespace object
\n
\t
// mode & 1: value is a module id, require it
\n
\t
// mode & 2: merge all properties of value into the ns
\n
\t
// mode & 4: return value when already ns object
\n
\t
// mode & 8|1: behave like require
\n
\t
__webpack_require__.t = function(value, mode) {\n
\t\t
if(mode & 1) value = __webpack_require__(value);
\n
\t\t
if(mode & 8) return value;
\n
\t\t
if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
\n
\t\t
var ns = Object.create(null);
\n
\t\t
__webpack_require__.r(ns);
\n
\t\t
Object.defineProperty(ns, 'default', { enumerable: true, value: value });
\n
\t\t
if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
\n
\t\t
return ns;
\n
\t
};
\n\n
\t
// getDefaultExport function for compatibility with non-harmony modules
\n
\t
__webpack_require__.n = function(module) {\n
\t\t
var getter = module && module.__esModule ?
\n
\t\t\t
function getDefault() { return module['default']; } :
\n
\t\t\t
function getModuleExports() { return module; };
\n
\t\t
__webpack_require__.d(getter, 'a', getter);
\n
\t\t
return getter;
\n
\t
};
\n\n
\t
// Object.prototype.hasOwnProperty.call
\n
\t
__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
\n\n
\t
// __webpack_public_path__
\n
\t
__webpack_require__.p =
\"\"
;
\n\n\n
\t
// Load entry module and return exports
\n
\t
return __webpack_require__(__webpack_require__.s =
\"
./src/Main.ts
\"
);
\n
"
,
"
\r\n\r\n
interface ResData {\r
\n
/**
\r\n
* 分组数据
\r\n
*/
\r\n
groups: GroupInt[];
\r\n
//暂时没有工具,不用
\r\n
resources?: any;
\r\n
path?: string;
\r\n
}
\r\n\r\n
interface GroupInt {\r
\n
/**
\r\n
* 所有的资源名字,根据,分割,根据后缀区分类型
\r\n
*
\r\n
*/
\r\n
keys: string;//
\"
aa.png,bb.jpg,name.json
\"\r\n
/**
\r\n
* 文件夹名字吧
\r\n
*/
\r\n
name: string;
\r\n
/**
\r\n
* 图集
\r\n
* 线上打包合图可能有多张,暂时发现texturePacker版本问题只有一张
\r\n
*/
\r\n
atlas: {\r
\n
[name: string]: {\r
\n
\"
x
\"
: number,
\r\n
\"
y
\"
: number,
\r\n
\"
w
\"
: number,
\r\n
\"
h
\"
: number,
\r\n
\"
ox
\"
: number,
\r\n
\"
oy
\"
: number,
\r\n
\"
sw
\"
: number,
\r\n
\"
sh
\"
: number,
\r\n
\"
ro
\"
: boolean
\r\n
},
\r\n
};
\r\n
}
\r\n\r\n
interface SkinInt {\r
\n
name: string,
\r\n
x: 0,
\r\n
y: 0,
\r\n
type: 'container' | 'text' | 'button' | 'sprite' | 'rect' | 'skin',//skin的不初始化进节点,只作为数据
\r\n
children?: SkinInt[],
\r\n
id?: string,
\r\n
alpha: number,
\r\n
props?: {\r
\n
source?: string,
\r\n\r\n
text: string,
\r\n
size: number,
\r\n
fillColor: string,
\r\n
textAlpha: number,
\r\n\r\n
width: number,
\r\n
height: number,
\r\n\r\n
tUp: string,
\r\n
tDown: string,
\r\n
tDisable: string
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
* 简单点,有工具的话像egret那样玩,可以自动生成图片组数据
\r\n
*/
\r\n
export namespace RES {\r
\n
let resData: ResData
\r\n
/**
\r\n
* 资源路径
\r\n
*/
\r\n
export let resPath: string;
\r\n
/**
\r\n
* movieClip的ve数据
\r\n
*/
\r\n
let videoEntityHash: {\r
\n
// [name: string]: FYGE.VideoEntity
\r\n
} = {};
\r\n
/**
\r\n
* 音频的加载
\r\n
*/
\r\n
let soundHash = {}
\r\n
/**
\r\n
* 记录组加载完成
\r\n
*/
\r\n
let groupsCompleteHash: {\r
\n
[name: string]: boolean
\r\n
} = {}
\r\n
/**
\r\n
* 记录加载的promise
\r\n
*/
\r\n
let groupsPromiseHash: {\r
\n
[name: string]: Promise<any>
\r\n
} = {}
\r\n
/**
\r\n
* 单独资源加载的promise记录
\r\n
*/
\r\n
let singleResPromiseHash: {\r
\n
[name: string]: Promise<any>
\r\n
} = {}
\r\n\r\n
/**
\r\n
*
\r\n
* @param res 资源数据,就是对象,不考虑加载json先
\r\n
* res格式{\r
\n
* path:1111/
\r\n
* groups: [
\r\n
* {\r
\n
*
\r\n
* }
\r\n
* ];
\r\n
* }
\r\n
* @param path
\r\n
*/
\r\n
export function loadConfig(res) {\r
\n
resData = res;
\r\n
resPath = res.path;
\r\n
}
\r\n\r\n\r\n
export function loadSparkAssets(resList: any[]): Promise<any> {\r
\n
let list = [];
\r\n
for (let key in resList) {\r
\n
list.push(resList[key]);
\r\n
}
\r\n
let p: Promise<any> = new Promise((resolve, reject) => {\r
\n
loadResList((s) => {\r
\n
if (s) {\r
\n
resolve()
\r\n
} else {\r
\n
reject();
\r\n
}
\r\n
}, list/*, resPath + name*/)
\r\n
})
\r\n
return p;
\r\n
}
\r\n\r\n\r\n
/**
\r\n
* 根据组名加载一组资源,通常用于加载一个视图的的所有资源
\r\n
* 里的promise的resolve并没有返回值
\r\n
* @param name
\r\n
*/
\r\n
export function loadGroup(name: string): Promise<any> {\r
\n
//已经加载完成的直接返回
\r\n
if (groupsCompleteHash[name]) {\r
\n
return new Promise((resolve) => {\r
\n
resolve()
\r\n
})
\r\n
}
\r\n
//如果是正在加载中的,返回正在加载中的promise
\r\n
if (groupsPromiseHash[name]) {\r
\n
return groupsPromiseHash[name];
\r\n
}
\r\n
//如果首次加载
\r\n
//获取资源组
\r\n
let arr = getGroupResByName(name);
\r\n
//如果不存在arr,直接返回空p,且标记完成
\r\n
if (!arr || !arr.length) {\r
\n
groupsCompleteHash[name] = true;
\r\n
return new Promise((resolve) => {\r
\n
resolve()
\r\n
})
\r\n
}
\r\n
// 建一个promise
\r\n
let p = new Promise((resolve, reject) => {\r
\n
loadResList((s) => {\r
\n
//移除
\r\n
delete groupsPromiseHash[name];
\r\n
if (s) {\r
\n
groupsCompleteHash[name] = true;
\r\n
resolve()
\r\n
} else {\r
\n
reject();
\r\n
}
\r\n
}, arr/*, resPath + name*/)
\r\n
})
\r\n
groupsPromiseHash[name] = p;
\r\n
return p;
\r\n
}
\r\n
/**
\r\n
* var textue = await RES.getResAsync(str);
\r\n
* @param str 可以是网络图片路径或键值
\r\n
* @param comFun 加载回调
\r\n
* @param thisObj this指向
\r\n
*/
\r\n
export function getResAsync(str: string, comFun?: (res: any, str: string) => void, thisObj?: any): Promise<any> {\r
\n
// var arr = str.split(
\"
.
\"
);
\r\n
var type = str.substring(str.lastIndexOf(
\"
.
\"
) + 1, str.length);
\r\n
//如果是图片
\r\n
if (type ==
\"
png
\"
|| type ==
\"
jpg
\"
) {\r
\n
//原先就有了,加载过的,且已加载完成的
\r\n
if (FYGE.TextureCache[str]) {\r
\n
//回调形式
\r\n
comFun && comFun.call(thisObj, FYGE.TextureCache[str], str)
\r\n
new Promise((r) => {\r
\n
r(FYGE.TextureCache[str])
\r\n
})
\r\n
}
\r\n
else {\r
\n
return new Promise((resolve, reject) => {\r
\n
FYGE.GlobalLoader.loadImage((s, image) => {\r
\n
//入缓存
\r\n
if (s) {\r
\n
FYGE.Texture.addToCache(FYGE.Texture.from(image), str);
\r\n
comFun && comFun.call(thisObj, FYGE.TextureCache[str], str)
\r\n
resolve(FYGE.TextureCache[str])
\r\n
} else {\r
\n
comFun && comFun.call(thisObj, null, str)
\r\n
reject()
\r\n
}
\r\n
}, str)
\r\n
})
\r\n
}
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
* 待写,根据网络路径加载图片
\r\n
*/
\r\n
export function getResByUrl() {\r
\n\r\n
}
\r\n\r\n
/**
\r\n
* 获取素材,
\r\n
* @param str
\r\n
* @return 已加载好得素材或null
\r\n
*/
\r\n
export function getRes(str: string)/*: Texture | VideoEntity*/ {\r
\n
var type = str.substring(str.lastIndexOf(
\"
.
\"
) + 1, str.length);
\r\n
if (type ==
\"
png
\"
|| type ==
\"
jpg
\"
) {\r
\n
return FYGE.TextureCache[str] || null;
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
* 判断是否在资源组里
\r\n
* 考虑是否init就做表
\r\n
* 有就返回组名,为了加载路径,不然以后有工具可以放入resources
\r\n
*/
\r\n
function hasRes(str: string): string {\r
\n
for (var i = 0; i < resData.groups.length; i++) {\r
\n
var group = resData.groups[i];
\r\n
var keys = group.keys;
\r\n
if (keys && keys.split(
\"
,
\"
).indexOf(str) > -1) {\r
\n
return group.name;
\r\n
}
\r\n
//如果是图集的json,altas现在是图集
\r\n
if (group.atlas && group.name +
\"
.json
\"
== str) {\r
\n
return group.name;
\r\n
}
\r\n
}
\r\n
return null
\r\n
}
\r\n\r\n
/**
\r\n
* 处理数据,获得所有资源单项
\r\n
* @param name
\r\n
*/
\r\n
function getGroupResByName(name: string) {\r
\n
var group: GroupInt = getGroupByName(name);
\r\n
if (!group) return null;
\r\n
//判断加载图集还是单图
\r\n
if (group.atlas) {\r
\n
// var arr: string[] = [].concat(group.atlas.split(
\"
,
\"
));
\r\n
var arr = [name +
\"
.json
\"
]
\r\n
//再添加非图片的资源,和图集已排除jpg
\r\n
if (group.keys) {\r
\n
arr = arr.concat(group.keys.split(
\"
,
\"
).filter((k: string) => {\r
\n
return k.substr(-4) !=
\"
.png
\"
//&& k.substr(-4) !=
\"
.jpg
\"\r\n
}))
\r\n
}
\r\n
return arr
\r\n
}
\r\n
else if (group.keys) {\r
\n
return group.keys.split(
\"
,
\"
)
\r\n
} else {\r
\n
return null
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
* 根据名字找组
\r\n
* @param name
\r\n
*/
\r\n
function getGroupByName(name: string): GroupInt {\r
\n
var groups = resData.groups;
\r\n
var group: GroupInt;
\r\n
for (var i = 0; i < groups.length; i++) {\r
\n
if (groups[i].name === name) {\r
\n
group = groups[i];
\r\n
break;
\r\n
}
\r\n
}
\r\n
return group
\r\n
}
\r\n\r\n
/**
\r\n
* 新版的加载一列资源
\r\n
* @param callback
\r\n
* @param arr
\r\n
*/
\r\n
export function loadResList(callback: (allLoaded: boolean) => void, arr: string[]) {\r
\n
let count = 0;
\r\n
let countAll = arr.length;
\r\n
if (!countAll) callback(true);
\r\n
let mark = true;
\r\n
for (var i = 0; i < countAll; i++) {\r
\n
let resName = arr[i]['url'];
\r\n
getResAsync(resName, (res, str) => {\r
\n
//标记失败,如果有一项资源加载失败,标记下
\r\n
if (!res) mark = false
\r\n
if (++count == countAll) callback(mark);
\r\n
}, this)
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
*
\r\n
* @param str
\r\n
* @param comFun
\r\n
* @param thisObj
\r\n
*/
\r\n
function returnSingleResPromise(str: string, comFun?: (res: any, str: string) => void, thisObj?: any) {\r
\n
//已判断是否存在
\r\n
singleResPromiseHash[str].then(
\r\n
(r) => {\r
\n
comFun && comFun.call(thisObj, r, str)
\r\n
},
\r\n
() => {\r
\n
comFun && comFun.call(thisObj, null, str)
\r\n
}
\r\n
)
\r\n
return singleResPromiseHash[str];
\r\n
}
\r\n\r\n
//皮肤相关的也放在RES吧
\r\n
let skinData: SkinInt
\r\n
/**
\r\n
* 添加皮肤配置文件
\r\n
*/
\r\n
export function loadSkinConfig(skinJson) {\r
\n
skinData = skinJson;
\r\n
}
\r\n
/**
\r\n
* 根据
\r\n
* @param con 添加显示对象的容器
\r\n
* @param skin 皮肤名字或数据
\r\n
* @param root 根容器,为了添加自定义引用
\r\n
*/
\r\n
export function initSkinDisplay(con: FYGE.Container, skin: string | SkinInt, root?: FYGE.Container) {\r
\n
//@ts-ignore
\r\n
var data: SkinInt = typeof (skin) == 'string' ? getSkinDataByName(skin) : skin;
\r\n
if (!data.children || !data.children.length) return;
\r\n
// for (var i = data.children.length - 1; i >= 0; i--) {\r
\n
for (var i = 0; i < data.children.length; i++) {\r
\n
var child = data.children[i];
\r\n
if (child.type ==
\"
skin
\"
) continue;
\r\n
var dis = con.addChild(getDisplayByData(child));
\r\n
if (root && child.id) root[child.id] = dis;
\r\n
if (child.type ==
\"
container
\"
) initSkinDisplay(dis, child, root);
\r\n
}
\r\n
}
\r\n
/**
\r\n
* 遍历根据名字找节点数据,只会是container的
\r\n
* @param skinName
\r\n
*/
\r\n
export function getSkinDataByName(skinName: string, skinNode: SkinInt = skinData): SkinInt {\r
\n
if (!skinNode || !skinNode.children || !skinNode.children.length) return null;
\r\n
for (var i = 0; i < skinNode.children.length; i++) {\r
\n
var child = skinNode.children[i];
\r\n
if (child.name == skinName && (child.type ==
\"
container
\"
|| child.type ==
\"
skin
\"
)) return child;
\r\n
var gson = getSkinDataByName(skinName, child);
\r\n
if (gson) return gson
\r\n
}
\r\n
return null;
\r\n
}
\r\n\r\n
export function getSrcByUuid(resList: any[], uuid: string): string {\r
\n
resList = resList || [];
\r\n
for (let i = 0; i < resList.length; i++) {\r
\n
if (resList[i].uuid == uuid) {\r
\n
return resList[i].url
\r\n
}
\r\n
}
\r\n
return
\"\"
;
\r\n
}
\r\n\r\n
/**
\r\n
* 通过数据创建显示对象
\r\n
* @param data
\r\n
*/
\r\n
function getDisplayByData(data: SkinInt): FYGE.Container {\r
\n
var dis: FYGE.Container;
\r\n
switch (data.type) {\r
\n
case
\"
container
\"
:
\r\n
dis = new FYGE.Container();
\r\n
break;
\r\n
case
\"
button
\"
:
\r\n
dis = new FYGE.Button(
\r\n
getRes(data.props.tUp),
\r\n
data.props.tDown ? getRes(data.props.tDown) : null,
\r\n
data.props.tDisable ? getRes(data.props.tDisable) : null,
\r\n
);
\r\n
break;
\r\n
case
\"
text
\"
:
\r\n
dis = new FYGE.TextField();
\r\n
for (let key in data.props) dis[key] = data.props[key];
\r\n
break;
\r\n
case
\"
sprite
\"
:
\r\n
dis = new FYGE.Sprite(getRes(data.props.source));
\r\n
break;
\r\n
case
\"
rect
\"
:
\r\n
// dis = new FYGE.Graphics()
\r\n
// .beginFill(data.props.fillColor)
\r\n
// .drawRect(0, 0, data.props.width, data.props.height)
\r\n
// .endFill();
\r\n
dis = new FYGE.Shape()
\r\n
//@ts-ignore
\r\n
dis.beginFill(FYGE.string2hex(data.props.fillColor))
\r\n
//@ts-ignore
\r\n
dis.drawRect(0, 0, data.props.width, data.props.height)
\r\n
//@ts-ignore
\r\n
dis.endFill();
\r\n
break;
\r\n
}
\r\n
dis.name = data.name;
\r\n
dis.alpha = data.alpha || 1;
\r\n
dis.position.set(data.x, data.y);
\r\n
// if (data.type ==
\"
text
\"
) dis.y -= 4;//文本莫名偏下,移动下,手机调试的时候也试试
\r\n
return dis;
\r\n
}
\r\n\r\n
//貌似不需要,为了加载过一次的资源不用重新加载
\r\n
function destroyRES() {\r
\n\r\n
}
\r\n
}
\r\n\r\n\r\n
"
,
"import { destroyWaiting } from
\"
./waitingCtrl
\"
;
\r\n
import { Panel } from
\"
../views/Panel
\"
;
\r\n
import PanelCtrl from
\"
./panelCtrl
\"
;
\r\n
import SceneCtrl from
\"
./sceneCtrl
\"
;
\r\n
import { Scene } from
\"
../views/Scene
\"
;
\r\n
import { destroyToast } from
\"
./toastCtrl
\"
;
\r\n
import IConfirmPanel from
\"
../../src/common/IConfirmPanel
\"
;
\r\n
import ConfirmPanel from
\"
../../src/common/IConfirmPanel
\"
;
\r\n
import panelCtrl from
\"
./panelCtrl
\"
;
\r\n\r\n\r\n
export { showToast } from
\"
./toastCtrl
\"
;
\r\n\r\n
export * from
\"
./waitingCtrl
\"
;
\r\n
/**
\r\n
* 展示弹框
\r\n
* @param panel 弹框类
\r\n
* @param data 数据
\r\n
*/
\r\n
export const showPanel = (panel: any, data?: any) => {\r
\n
return PanelCtrl.instance.show(panel, data)
\r\n
}
\r\n\r\n
export const showConfirm = (panel: any, data?: any) => {\r
\n
const confirmPanel: ConfirmPanel = PanelCtrl.instance.show(panel, data);
\r\n
return confirmPanel.makePromise();
\r\n
}
\r\n\r\n\r\n
/**
\r\n
* 关闭所有弹框
\r\n
*/
\r\n
export const closeAllPanels = () => {\r
\n
PanelCtrl.instance.closeAll();
\r\n
}
\r\n\r\n
/**
\r\n
* 关闭当前弹框
\r\n
*/
\r\n
export const closeCurrentPanel = () => {\r
\n
PanelCtrl.instance.closeCurrent();
\r\n
}
\r\n\r\n
/**
\r\n
* 替换场景
\r\n
* @param scene
\r\n
* @param data
\r\n
*/
\r\n
export const changeScene = (scene: any, data?: any) => {\r
\n
SceneCtrl.instance.change(scene, data)
\r\n
}
\r\n\r\n
/**
\r\n
* 获取当前场景
\r\n
*/
\r\n
export function getCurrentScene(): any {\r
\n
return SceneCtrl.instance.currentScene
\r\n
}
\r\n\r\n
/**
\r\n
* 淘宝小程序的alert
\r\n
* @param
{
string
}
title
\r\n
* @param
{
string
}
content
\r\n
*/
\r\n
export const showAlert = (title?: string, content?: string) => {\r
\n
//@ts-ignore
\r\n
if (my) {\r
\n
//@ts-ignore
\r\n
my.alert({\r
\n
title: title ||
\"\"
,
\r\n
content: content ||
\"\"\r\n
});
\r\n
} else {\r
\n
console.log(title, content)
\r\n
}
\r\n\r\n
}
\r\n\r\n
/**
\r\n
* 替换setTimeout 因为页面销毁时setTimeout不会停
\r\n
* 所以干脆用Tween的
\r\n
* @param
{
Function
}
callback
\r\n
* @param
{
number
}
time 毫秒计
\r\n
*/
\r\n
export function wait(callback: () => void, time: number): {} {\r
\n
let obj = {};
\r\n
FYGE.Tween.get(obj)
\r\n
.wait(time)
\r\n
.call(callback)
\r\n
return obj
\r\n
}
\r\n\r\n
export function clearWait(obj: {}) {\r
\n
obj && FYGE.Tween.removeTweens(obj);
\r\n
}
\r\n\r\n
/**
\r\n
* 递归清除显示对象里面所有的Tween
\r\n
* @param obj
\r\n
* @param isRecursive 默认true,递归移除子级
\r\n
*/
\r\n
export function removeTweens(obj, isRecursive: boolean = true) {\r
\n
if (!obj) return
\r\n
FYGE.Tween.removeTweens(obj);
\r\n
if (!isRecursive || !obj.children || !obj.children.length) return
\r\n
obj.children.forEach(child => {\r
\n
removeTweens(child)
\r\n
});
\r\n
}
\r\n\r\n
/**
\r\n
* 销毁方法
\r\n
*/
\r\n
export function destroyAllCtrls() {\r
\n
destroyToast();
\r\n
destroyWaiting();
\r\n
PanelCtrl.instance.destroy();
\r\n
SceneCtrl.instance.destroy();
\r\n
}
\r\n
"
,
"
\r\n\r\n
import { Panel } from
\"
../views/Panel
\"
;
\r\n
import { layers } from
\"
../views/layers
\"
;
\r\n
import { showWaiting, hideWaiting } from
\"
./waitingCtrl
\"
;
\r\n
import { showToast } from
\"
./toastCtrl
\"
;
\r\n\r\n
export default class PanelCtrl {\r
\n
/**
\r\n
* 父级容器
\r\n
*/
\r\n
private _parent: FYGE.Container;
\r\n
/**
\r\n
* 半透明黑色背景
\r\n
*/
\r\n
private _bg: FYGE.Shape;//FYGE.Graphics;
\r\n
/**
\r\n
* 所有的弹框
\r\n
*/
\r\n
private stacks: Panel[] = [];
\r\n\r\n
private static _instance: PanelCtrl;
\r\n
static get instance() {\r
\n
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl())
\r\n
}
\r\n\r\n
init(parent: FYGE.Container) {\r
\n
this._parent = parent;
\r\n
let bg = new FYGE.Shape();//Graphics()//Shape();
\r\n
bg.beginFill(0);
\r\n
bg.drawRect(//引用适配
\r\n
layers.stageOffsetX - parent.x,
\r\n
layers.stageOffsetY - parent.y,
\r\n
layers.stageWidth,
\r\n
layers.stageHeight
\r\n
);
\r\n
bg.endFill();
\r\n
bg.hitTestByPixel = false;
\r\n
bg.visible = false;
\r\n
this._parent.addChild(bg);
\r\n
this._bg = bg;
\r\n
}
\r\n\r\n
/**
\r\n
* 关闭所有弹框
\r\n
*/
\r\n
closeAll() {\r
\n
this.stacks.forEach(e => e.hidePanel());
\r\n
}
\r\n\r\n
show<T extends Panel>(cls: any, data?: any): T {\r
\n
showWaiting()
\r\n
const panel: T = new cls(data);
\r\n
this.add(panel);
\r\n
this.stacks.push(panel);
\r\n
panel.onLoaded = () => {\r
\n
hideWaiting();
\r\n
this.updateView(false);//这里更新不显示动画先,自行判断是否显示
\r\n
//start只执行一边
\r\n
panel.start(data);
\r\n
//如果是最后一个才显示动画
\r\n
if (panel.visible) panel.showAni();
\r\n
}
\r\n
//资源加载失败时
\r\n
panel.onLoadError = () => {\r
\n
hideWaiting();
\r\n
showToast(
\"
资源加载失败
\"
)
\r\n
panel.removeEventListener('onDestroy', this.onPanelHide, this);
\r\n
this.remove(panel);
\r\n
}
\r\n
return panel;
\r\n
}
\r\n
private bgAni:
\"
hide
\"
|
\"
show
\"
;
\r\n
private updateView(showPanelAni: boolean = true) {\r
\n
//没有弹框的时候
\r\n
if (!this.stacks.length) {\r
\n
// this._bg.visible = false;
\r\n
// this._current = null;
\r\n
// this._parent.visible = false;
\r\n
if (this._bg.visible) {//原先背景存在时,待测试
\r\n
this.bgAni =
\"
hide
\"\r\n
FYGE.Tween.removeTweens(this._bg);
\r\n
FYGE.Tween.get(this._bg)
\r\n
.to({ alpha: 0 }, 200, FYGE.Ease.cubicOut)
\r\n
.call(() => {\r
\n
this._bg.visible = false;
\r\n
this._current = null;
\r\n
this._parent.visible = false;
\r\n
})
\r\n
}
\r\n
} else {\r
\n
//显示弹框层
\r\n
this._parent.visible = true;
\r\n
if (this.bgAni ==
\"
hide
\"
) {//如果正在执行蒙层消失动画,
\r\n
this.bgAni =
\"
show
\"\r\n
FYGE.Tween.removeTweens(this._bg);
\r\n
this._bg.alpha = 0.7;
\r\n
}
\r\n
//如果首次出现弹框,加个动画
\r\n
if (this._bg.visible === false) {\r
\n
this._bg.visible = true;
\r\n
this._bg.alpha = 0;
\r\n
FYGE.Tween.get(this._bg).to({ alpha: 0.7 }, 200, FYGE.Ease.cubicOut)
\r\n
}
\r\n
}
\r\n\r\n
for (let i = 0; i < this.stacks.length; i++) {\r
\n
if (i < this.stacks.length - 1) {\r
\n
this.stacks[i].visible = false;
\r\n
} else {\r
\n
this.stacks[i].visible = true;
\r\n
if (showPanelAni) this.stacks[i].showAni();
\r\n
this._current = this.stacks[i];
\r\n
}
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
* 添加进父级并添加事件
\r\n
* @param panel
\r\n
*/
\r\n
private add(panel: Panel) {\r
\n
this._parent.addChild(panel);
\r\n
panel.addEventListener('onDestroy', this.onPanelHide, this);
\r\n
}
\r\n\r\n
/**
\r\n
* 移除
\r\n
* @param panel
\r\n
*/
\r\n
private remove(panel: Panel) {\r
\n
this._parent.removeChild(panel);
\r\n
this.stacks = this.stacks.filter(e => e != panel);
\r\n
}
\r\n\r\n
/**
\r\n
* 弹框移除时执行
\r\n
* @param e
\r\n
*/
\r\n
private onPanelHide(e: FYGE.Event) {\r
\n
const panel = e.target as Panel;
\r\n
panel.removeEventListener('onDestroy', this.onPanelHide, this);
\r\n
this.remove(panel);
\r\n
this.updateView();
\r\n
}
\r\n\r\n
//当前弹框
\r\n
private _current: Panel;
\r\n\r\n
/**
\r\n
* 关闭当前弹框
\r\n
*/
\r\n
closeCurrent() {\r
\n
if (this._current) {\r
\n
this._current.hidePanel();
\r\n
// this._current.removeEventListener('onDestroy', this.onPanelHide, this);
\r\n
// this.remove(this._current);
\r\n
// this.updateView();
\r\n
}
\r\n
}
\r\n\r\n
destroy() {\r
\n
PanelCtrl._instance = null;
\r\n
this.stacks = null;
\r\n
this._current = null;
\r\n
this._parent = null;
\r\n
FYGE.Tween.removeTweens(this._bg);
\r\n
this._bg = null;
\r\n
}
\r\n
}"
,
"
\r\n
import { Scene } from
\"
../views/Scene
\"
;
\r\n
import { showWaiting, hideWaiting } from
\"
./waitingCtrl
\"
;
\r\n
import { showToast } from
\"
./toastCtrl
\"
;
\r\n\r\n\r\n\r\n
export default class SceneCtrl {\r
\n\r\n
private _parent: FYGE.Container;
\r\n
private _currentScene: Scene;
\r\n\r\n
private static _instance: SceneCtrl;
\r\n
static get instance() {\r
\n
return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl())
\r\n
}
\r\n
init(parent: FYGE.Container) {\r
\n
this._parent = parent;
\r\n
}
\r\n\r\n
change(cls: any, data?: any) {\r
\n
//如果是同一个场景,考虑是替换还是return
\r\n
// if (this._currentScene && this._currentScene instanceof cls) return;//new一个得了,playScene维护太蛋疼,到时看性能吧
\r\n
let scene: Scene = new cls(data);
\r\n
scene.visible = false;
\r\n
showWaiting();
\r\n
let preScene: Scene = this._currentScene;
\r\n
scene.onLoaded = () => {\r
\n
hideWaiting();
\r\n
scene.showAni(() => {\r
\n
if (preScene) preScene.destroy();
\r\n
})
\r\n
scene.visible = true;
\r\n
//start里可能处理资源信息,所以在onLoaded后执行
\r\n
scene.start(data);
\r\n
}
\r\n
//加载失败,继续用之前的场景,移除scene
\r\n
scene.onLoadError = () => {\r
\n
hideWaiting();
\r\n
showToast(
\"
资源加载失败
\"
)
\r\n
this._currentScene = preScene || null;
\r\n
this._parent.removeChild(scene);
\r\n
}
\r\n\r\n
this._currentScene = scene;
\r\n
this._parent.addChild(scene);
\r\n
}
\r\n\r\n
get currentScene() {\r
\n
return this._currentScene
\r\n
}
\r\n\r\n
destroy() {\r
\n
SceneCtrl._instance = null;
\r\n
this._currentScene = null;
\r\n
this._parent = null;
\r\n
}
\r\n
}"
,
"
\r\n\r\n
import { layers } from
\"
../views/layers
\"
;
\r\n
import { RES } from
\"
../RES
\"
;
\r\n\r\n
let inited = false;
\r\n
let _toast: Toast;
\r\n
let _parent: FYGE.Container;
\r\n
let startY: number
\r\n
let endY: number
\r\n
const initToast = () => {\r
\n
if (!inited) {\r
\n
inited = true;
\r\n
_toast = new Toast();
\r\n
_parent = layers.toastLayer;
\r\n
_toast.alpha = 0;
\r\n
_toast.x = layers.stageOffsetX - _parent.x + (layers.stageWidth - _toast.width) / 2;
\r\n
var h = _toast.height;
\r\n
var y = layers.stageOffsetY - _parent.y;
\r\n
startY = y - h;
\r\n
endY = y + (layers.stageHeight - h) / 2;
\r\n
}
\r\n
}
\r\n
export const showToast = (msg: string) => {\r
\n
initToast();
\r\n
_toast.show(msg)
\r\n
_parent.addChild(_toast);
\r\n
FYGE.Tween.removeTweens(_toast);
\r\n
FYGE.Tween.get(_toast)//动画看需求
\r\n
.set({ y: startY, alpha: 1 })
\r\n
.to({ y: endY }, 500, FYGE.Ease.quartOut)
\r\n
.wait(800)
\r\n
.to({ alpha: 0 }, 300)
\r\n
.call(() => {\r
\n
_parent.removeChild(_toast);
\r\n
})
\r\n
}
\r\n\r\n
/**
\r\n
* 对于之前淘宝小程序遇到的问题,需要销毁,否则会出问题
\r\n
*/
\r\n
export const destroyToast = () => {\r
\n
if (inited && _toast && !_toast.destroyed) {\r
\n
_toast.destroy();
\r\n
_toast = null;
\r\n
_parent = null;
\r\n
inited = false;
\r\n
}
\r\n
}
\r\n\r\n
/**
\r\n
* toast类,不对外导出,适配居中有问题,有时间改
\r\n
* 自身居中,
\r\n
*/
\r\n
class Toast extends FYGE.Container {\r
\n
msg: FYGE.TextField;
\r\n
bg: FYGE.Sprite;
\r\n
PADDING = 40;
\r\n
constructor() {\r
\n
super();
\r\n
this.mouseChildren = false;
\r\n
this.mouseEnable = false;
\r\n
var toastBgTexture: FYGE.Texture = RES.getRes(
\"
toastBg.png
\"
);
\r\n
if (toastBgTexture) {\r
\n
this.bg = new FYGE.Sprite(toastBgTexture);
\r\n
// this.bg.x = (750 - 460) / 2// (layers.stageWidth - this.bg.width) / 2
\r\n
this.addChild(this.bg);
\r\n
}
\r\n\r\n
this.msg = new FYGE.TextField();
\r\n
this.msg.size = 28;
\r\n
this.msg.fillColor =
\"
0xffffff
\"
;
\r\n
this.msg.text =
\"\"
;
\r\n
this.msg.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
\r\n
this.msg.textHeight = toastBgTexture?toastBgTexture.height:200;
\r\n
this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
\r\n
this.addChild(this.msg)
\r\n
}
\r\n
/**
\r\n
* 显示时调用
\r\n
* @param msg
\r\n
*/
\r\n
show(msg: string) {\r
\n
this.msg.text = msg;
\r\n
//文本居中适配
\r\n
this.msg.x = ( (this.bg?this.bg.width:0) - this.msg.textWidth) / 2//(layers.stageWidth - this.msg.textWidth) / 2;
\r\n
//是否需要根据文本宽度缩放背景
\r\n
// this.bg.width = Math.min(this.msg.textWidth + this.PADDING * 2, 523);
\r\n
//背景居中适配,由于上面一行注释,那这行就构造函数里只执行一次吧
\r\n
// this.bg.x = (layers.stageWidth - this.bg.width) / 2
\r\n
}
\r\n\r\n
destroy() {\r
\n
super.destroy();
\r\n
this.msg = null
\r\n
this.bg = null;
\r\n
}
\r\n\r\n
}"
,
"
\r\n
import { RES } from
\"
../RES
\"
;
\r\n
import { layers } from
\"
../views/layers
\"
;
\r\n\r\n
import { showAlert } from
\"
.
\"
;
\r\n\r\n
let inited = false;
\r\n
let _waiting: Waiting;
\r\n
let _parent: FYGE.Container
\r\n
const initWaiting = () => {\r
\n
if (!inited) {\r
\n
inited = true;
\r\n
const waiting = new Waiting();
\r\n
_parent = layers.topLayer;
\r\n
_waiting = waiting;
\r\n
//居中偏移
\r\n
var offX = (layers.stageWidth - 160/*_waiting.width*/) / 2;
\r\n
var offY = (layers.stageHeight - _waiting.height) / 2;
\r\n
//位置适配
\r\n
_waiting.x = layers.stageOffsetX - _parent.x + offX;
\r\n
_waiting.y = layers.stageOffsetY - _parent.y + offY;
\r\n
//阻止事件用
\r\n
var bg: FYGE.Graphics = new FYGE.Graphics()
\r\n
.beginFill(0x000000)
\r\n
.drawRect(-offX, -offY, layers.stageWidth, layers.stageHeight)
\r\n
.endFill();
\r\n
bg.alpha = 0;
\r\n
_waiting.addChildAt(bg, 0);
\r\n
}
\r\n
}
\r\n
/**
\r\n
* 显示菊花圈
\r\n
* @param msg 尽量三个字
\r\n
*/
\r\n
export const showWaiting = (msg?: string) => {\r
\n
initWaiting();
\r\n
_waiting.show(msg)
\r\n
_parent.addChild(_waiting);
\r\n
}
\r\n\r\n
/**
\r\n
* 隐藏菊花圈
\r\n
*/
\r\n
export const hideWaiting = () => {\r
\n
_parent.removeChild(_waiting);
\r\n
}
\r\n\r\n
export const destroyWaiting = () => {\r
\n
if (inited && _waiting && !_waiting.destroyed) {\r
\n
_waiting.destroy();
\r\n
_waiting = null;
\r\n
_parent = null;
\r\n
inited = false;
\r\n
}
\r\n
}
\r\n\r\n\r\n
/**
\r\n
* 菊花圈,有机会重写,应该适应所有场景居中
\r\n
*/
\r\n
class Waiting extends FYGE.Container {\r
\n
msg: FYGE.TextField;
\r\n
constructor() {\r
\n
super();
\r\n
//圆角矩形背景
\r\n
var rectBgTexture: FYGE.Texture = RES.getRes(
\"
waitingBg.png
\"
)
\r\n
if (rectBgTexture) {\r
\n
var rectBg = new FYGE.Sprite(rectBgTexture);
\r\n
this.addChild(rectBg);
\r\n
var rotTexture: FYGE.Texture = RES.getRes(
\"
waitingRot.png
\"
)
\r\n
let rot = new FYGE.Sprite(rotTexture);
\r\n
rot.x = (rectBgTexture.width - rotTexture.width) / 2
\r\n
rot.y = 47//533;
\r\n
rot.anchorX = rotTexture.width / 2;
\r\n
rot.anchorY = rotTexture.height / 2;
\r\n
this.addChild(rot);
\r\n
let count = 0;
\r\n
rot.addEventListener(FYGE.Event.ENTER_FRAME, () => {\r
\n
count++;
\r\n
if (count % 30 == 0) rot.rotation += 45;
\r\n
}, this)
\r\n
}
\r\n\r\n
this.msg = new FYGE.TextField();
\r\n
this.msg.y = 125;
\r\n
this.msg.textWidth=rectBgTexture?rectBgTexture.width:200;
\r\n
this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
\r\n
this.msg.size = 26
\r\n
this.msg.fillColor =
\"
#ffffff
\"
;
\r\n
this.addChild(this.msg);
\r\n
}
\r\n\r\n
show(msg: string =
\"
加载中
\"
) {\r
\n
this.msg.text = msg;
\r\n
}
\r\n\r\n
destroy() {\r
\n
super.destroy();
\r\n
this.msg = null;
\r\n
}
\r\n
}
\r\n\r\n
"
,
"
\r\n
import { RES } from
\"
../RES
\"
;
\r\n
import { removeTweens } from
\"
../ctrls
\"
;
\r\n\r\n
/**
\r\n
*
\r\n
*/
\r\n
export class Module extends FYGE.Container {\r
\n
protected data: any;
\r\n
constructor(data?: any) {\r
\n
super();
\r\n
this.data = data;
\r\n
this.init();
\r\n
}
\r\n
/**
\r\n
* 初始化资源和皮肤
\r\n
*/
\r\n
private init() {\r
\n
this.preLoadRes().then(
\r\n
() => {\r
\n
//添加皮肤配置
\r\n
if (this.skinName) RES.initSkinDisplay(this, this.skinName, this);
\r\n
this.initUi();
\r\n
this.onLoaded && this.onLoaded();
\r\n
},
\r\n
() => {\r
\n
this.onLoadError && this.onLoadError();
\r\n
}
\r\n
);
\r\n
}
\r\n
/**
\r\n
* 提前加载的资源
\r\n
*/
\r\n
protected preLoadRes() {\r
\n
return new Promise((resolve, reject) => {\r
\n
if (this.groupNames && this.groupNames.length) {\r
\n
var arr: Promise<any>[] = [];
\r\n
for (var i = 0; i < this.groupNames.length; i++) {\r
\n
arr.push(RES.loadGroup(this.groupNames[i]))
\r\n
}
\r\n
Promise.all(arr).then(resolve, reject)
\r\n
} else {\r
\n
resolve()
\r\n
}
\r\n
})
\r\n
}
\r\n\r\n
/**
\r\n
* 初始化ui
\r\n
* 子类修改
\r\n
*/
\r\n
protected initUi() {\r
\n\r\n
}
\r\n\r\n
/**
\r\n
* 资源加载完成后执行,用于场景及弹框控制
\r\n
*/
\r\n
onLoaded: () => void
\r\n\r\n
/**
\r\n
* 资源加载失败时执行,用于场景及弹框控制
\r\n
*/
\r\n
onLoadError: () => void;
\r\n\r\n\r\n
/**
\r\n
* 可以有多个组
\r\n
*/
\r\n
get groupNames(): string[] { return null }
\r\n
/**
\r\n
* 皮肤名字
\r\n
*/
\r\n
get skinName(): string { return null };
\r\n\r\n
/**
\r\n
* 在构造函数后执行
\r\n
*/
\r\n
start(data?: any) {\r
\n
this.initEvents();
\r\n
}
\r\n\r\n
/**
\r\n
* 添加事件
\r\n
*/
\r\n
initEvents(): void {\r
\n\r\n
}
\r\n\r\n
/**
\r\n
* 移除事件
\r\n
*/
\r\n
removeEvents(): void {\r
\n\r\n
}
\r\n\r\n
/**
\r\n
* 鼠标事件
\r\n
* @param enable
\r\n
*/
\r\n
protected enableMouseEvt(enable: boolean): void {\r
\n
this.mouseEnable = enable;
\r\n
this.mouseChildren = enable;
\r\n
}
\r\n\r\n
/**
\r\n
* 延时防连点
\r\n
* @param target
\r\n
* @param
{
number
}
delay
\r\n
*/
\r\n
protected btnDelay(target, delay = 2000) {\r
\n
target.mouseEnable = false;
\r\n
target.mouseChildren = false;
\r\n
setTimeout(() => {\r
\n
target.mouseEnable = true;
\r\n
target.mouseChildren = true;
\r\n
}, delay);
\r\n
}
\r\n\r\n\r\n
public destroy(): void {\r
\n
//以防有些地方用了showAni
\r\n
removeTweens(this);
\r\n\r\n
// this.data = null;//看情况吧,有时候hidePanel后用了data,注意,还是先去掉吧
\r\n
//移除事件
\r\n
this.removeEvents();
\r\n
//派发销毁事件,主要用于场景及弹框控制
\r\n
this.dispatchEvent(
\"
onDestroy
\"
);
\r\n
super.destroy();
\r\n
}
\r\n
}
\r\n
"
,
"import { Module } from
\"
./Module
\"
;
\r\n
export class Scene extends Module {\r
\n\r\n
/**
\r\n
* 显示动画
\r\n
* 继承时注意,回调要加
\r\n
* 因为这种动画基本原场景最好不消失
\r\n
*/
\r\n
showAni(callback: Function) {\r
\n
callback()
\r\n
}
\r\n
/**
\r\n
* 统一更新方法
\r\n
*/
\r\n
updateScene() {\r
\n\r\n
}
\r\n
}"
,
"
\r\n
import PanelCtrl from
\"
../ctrls/panelCtrl
\"
;
\r\n
import SceneCtrl from
\"
../ctrls/sceneCtrl
\"
;
\r\n\r\n
/**
\r\n
* 添加进舞台的所有层级
\r\n
* 仿白鹭的那套
\r\n
*/
\r\n
class Layers extends FYGE.Container {\r
\n
private _bottomLayer: FYGE.Container;
\r\n
private _sceneLayer: FYGE.Container;
\r\n
private _popupLayer: FYGE.Container;
\r\n
private _toastLayer: FYGE.Container;
\r\n
private _topLayer: FYGE.Container;
\r\n
private _shareLayer: FYGE.Container;
\r\n
init(stage: FYGE.Stage) {\r
\n
stage.addChild(this);
\r\n
var arr = [
\r\n
\"
_bottomLayer
\"
,
\r\n
\"
_sceneLayer
\"
,
\r\n
\"
_popupLayer
\"
,
\r\n
\"
_toastLayer
\"
,
\r\n
\"
_topLayer
\"
,
\r\n
\"
_shareLayer
\"\r\n
];
\r\n
for (var i = 0; i < arr.length; i++) {\r
\n
this[arr[i]] = new FYGE.Container();
\r\n
//有些时候,定宽的时候,部分layer置顶,部分居中,再处理
\r\n
//为了都置顶和置左,stage的方式永远居中视窗,要么改stage永远左上为00
\r\n
// this[arr[i]].y = this.stageOffsetY;
\r\n
//如果定宽这里没必要,肯定是0
\r\n
// this[arr[i]].x = this.stageOffsetX;//去掉,定高时就居中了
\r\n
this.addChild(this[arr[i]]);
\r\n
}
\r\n
//都以底部适配
\r\n
this.sceneLayer.y = this.stageOffsetY;
\r\n
// this.popupLayer.y = -this.stageOffsetY;
\r\n
// this.popupLayer.y -= 420 / 2;
\r\n\r\n
this.shareLayer.y = -this.stageOffsetY;
\r\n
//初始化场景层级
\r\n
SceneCtrl.instance.init(this.sceneLayer)
\r\n
//初始化弹框层级
\r\n
PanelCtrl.instance.init(this.popupLayer)
\r\n\r\n
}
\r\n\r\n
/**
\r\n
* 底图所在层级,比如统一的背景
\r\n
*/
\r\n
get bottomLayer() { return this._bottomLayer }
\r\n
/**
\r\n
* 场景
\r\n
*/
\r\n
get sceneLayer() { return this._sceneLayer }
\r\n
/**
\r\n
* 弹框
\r\n
*/
\r\n
get popupLayer() { return this._popupLayer }
\r\n
/**
\r\n
* toast所在层级
\r\n
*/
\r\n
get toastLayer() { return this._toastLayer }
\r\n
/**
\r\n
* 顶层,比如统一标题栏等
\r\n
*/
\r\n
get topLayer() { return this._topLayer }
\r\n
/**
\r\n
* 分享引导层
\r\n
*/
\r\n
get shareLayer() { return this._shareLayer }
\r\n
/**
\r\n
* 舞台信息都放在layers里吧
\r\n
* 舞台可见高度,初始化后才能使用
\r\n
*/
\r\n
get stageHeight() {\r
\n
if (!this.stage) return 0;
\r\n
return this.stage.viewRect.height;
\r\n
}
\r\n
/**
\r\n
* 舞台可见宽度
\r\n
*/
\r\n
get stageWidth() {\r
\n
if (!this.stage) return 0;
\r\n
return this.stage.viewRect.width;
\r\n
}
\r\n
/**
\r\n
* 适配方式x两边偏移的量,固定宽度x为0
\r\n
*/
\r\n
get stageOffsetX() {\r
\n
if (!this.stage) return 0;
\r\n
return this.stage.viewRect.x;
\r\n
}
\r\n
get stageOffsetY() {\r
\n
if (!this.stage) return 0;
\r\n
return this.stage.viewRect.y;
\r\n
}
\r\n
/**
\r\n
* 舞台中心点位置x
\r\n
*/
\r\n
// get stageCenterX(): number {\r
\n
// return this.stage.viewRect.x + this.stage.viewRect.width >> 1;
\r\n
// }
\r\n
/**
\r\n
* 舞台中心点位置y,layer位置做过偏移的就不对了,所以还是自行算吧
\r\n
*/
\r\n
// get stageCenterY(): number {\r
\n
// return this.stage.viewRect.y + this.stage.viewRect.height >> 1;
\r\n
// }
\r\n
}
\r\n\r\n
export const layers = new Layers();
\r\n\r\n
//先执行,在淘宝小程序中重新进入会再次初始化
\r\n
export function destroyLayers() {\r
\n
//所有层级移除,init会重新建
\r\n
layers.removeChildren();
\r\n
//从父级stage移除自己,init会重新加
\r\n
if (layers.parent) layers.parent.removeChild(layers)
\r\n
}
\r\n
"
,
"const resCanvasList = {\n '4ee17a9c-5deb-43be-b205-16fb7593d172': {\n name: 'spark',
\n
ext: '.png',
\n
url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
\n
uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
\n
}
\n
};
\n
export default resCanvasList;
\n\n\n
// const resList = {\n// '4ee17a9c-5deb-43be-b205-16fb7593d172': {\n// name: 'spark',
\n
// ext: '.png',
\n
// url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
\n
// uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
\n
// }
\n
// };
\n
// export default resList;
\n
"
,
"import { RES } from
\"
../module/RES
\"
;
\r\n
import { layers, destroyLayers } from
\"
../module/views/layers
\"
;
\r\n
import { ResJson } from
\"
./ResJson
\"
;
\r\n
import { G_EVENT } from
\"
./common/G_EVENT
\"
;
\r\n
import { destroyAllCtrls, changeScene } from
\"
../module/ctrls
\"
;
\r\n
import { StartScene } from
\"
./scenes/StartScene
\"
;
\r\n
import { destroyNetData } from
\"
./TaoBaoNet
\"
;
\r\n\r\n\r\n
import resCanvasList from '../resCanvasList';
\r\n\r\n\r\n
/**
\r\n
* 全局事件,为了和小程序交互
\r\n
* 有可能多处页面用到,所以单开
\r\n
*/
\r\n
export const GDispatcher = new FYGE.EventDispatcher();
\r\n\r\n
export class Main {\r
\n
//主舞台
\r\n
stage: FYGE.Stage;
\r\n
private requestID;
\r\n
private _pause: boolean;
\r\n
constructor(canvas: HTMLCanvasElement) {\r
\n
var sysInfo;
\r\n
//@ts-ignore 存在my就初始化
\r\n
if (my) {\r
\n
FYGE.initedByCanvas(canvas)
\r\n\r\n
//@ts-ignore 存在my就初始化
\r\n
sysInfo = my.getSystemInfoSync()
\r\n
}
\r\n
//建舞台
\r\n
var stage = new FYGE.Stage(
\r\n
canvas,
\r\n
750,//设计宽度,按设计搞给的就行
\r\n
1624,//设计高度
\r\n
sysInfo && sysInfo.windowWidth || document.body.clientWidth,
\r\n
sysInfo && sysInfo.windowHeight || document.body.clientHeight,
\r\n
FYGE.RENDERER_TYPE.CANVAS
\r\n
);
\r\n
this.stage = stage;
\r\n
//开始循环
\r\n
// FYGE.Stage.flushAll();
\r\n
//stage初始化
\r\n
stage.addEventListener(FYGE.Event.INIT_STAGE, this.onAddToStage, this);
\r\n
//帧率
\r\n
// var stats = new FYGE.Stats(
\"
canva4stats
\"
);
\r\n
//循环
\r\n
var self = this;
\r\n
// console.log(FYGE)
\r\n
loop();
\r\n
function loop() {\r
\n
if (!self._pause) {\r
\n
// stats.begin();
\r\n
FYGE.Tween.flush()
\r\n
stage.flush();
\r\n
// stats.end();
\r\n
}
\r\n
//@ts-ignore
\r\n
self.requestID = FYGE.getRequestAnimationFrame()(loop);
\r\n
}
\r\n
}
\r\n\r\n
private async onAddToStage() {\r
\n
//初始化层级
\r\n
layers.init(this.stage);
\r\n
console.log(
\"
初始化层级完成
\"
)
\r\n
//初始化资源配置
\r\n
// RES.loadConfig(ResJson);
\r\n
// console.log(
\"
初始化资源配置完成
\"
)
\r\n
//皮肤配置加载
\r\n
// RES.loadSkinConfig(SkinJson);
\r\n
//加载通用资源
\r\n
// await RES.loadGroup(
\"
common
\"
);
\r\n
await RES.loadSparkAssets(resCanvasList);
\r\n
console.log(
\"
通用资源加载完成
\"
)
\r\n
//打开开始场景
\r\n
changeScene(StartScene);
\r\n
// changeScene(LoadingScene);
\r\n
// changeScene(SStartScene);
\r\n
// changeScene(StoryScene);
\r\n
// changeScene(AdoptScene);
\r\n
// console.log(
\"
恶趣味去
\"
)
\r\n
// showPanel(NoStepPanel)
\r\n
//测试
\r\n
// sendTbNet(TbNetName.aaa, {}, (s, res) => {\r
\n
// console.log(res)
\r\n
// })
\r\n
//获取数据,,必成功
\r\n
// showWaiting();
\r\n
// sendTbNet(TbNetName.getAppData, {}, (s, res) => {\r
\n
// hideWaiting();
\r\n
// Tool.globalData = res.data;
\r\n
// changeScene(PlayScene);
\r\n
// //先去获取下任务列表的商品信息吧
\r\n
// sendTbNet(TbNetName.getTaskList, { activityId: Tool.globalData.activityId }, (s, res) => {\r
\n
// if (s) Tool.browseItems = res.data.browseItemIds.content;
\r\n
// })
\r\n
// })
\r\n
}
\r\n\r\n
//在小程序显示时调用onShow
\r\n
run() {\r
\n
this._pause = false
\r\n
//@ts-ignore Tween计时清零
\r\n
// FYGE.Tween._lastTime = null //下面的_pause 不执行,先去掉,试试有没有问题
\r\n\r\n
GDispatcher.dispatchEvent(G_EVENT.ON_SHOW);
\r\n
}
\r\n
//在小程序隐藏时调用onHide
\r\n
pause() {\r
\n
// this._pause = true;//先去掉吧
\r\n
GDispatcher.dispatchEvent(G_EVENT.ON_HIDE);
\r\n
}
\r\n\r\n
/**
\r\n
* 添加全局事件,用于小程序的交互调用
\r\n
* 一直很犹豫要不要放在main的实例里,还是和Main同级导出,还有上面的pause,run,下面的事件等
\r\n
* @param name
\r\n
* @param fun
\r\n
* @param thisObj
\r\n
*/
\r\n
addGlobalEvent(name: string, fun: Function, thisObj?: any, once: boolean = false) {\r
\n
if (once) {\r
\n
GDispatcher.once(name, fun, thisObj)
\r\n
} else {\r
\n
GDispatcher.addEventListener(name, fun, thisObj)
\r\n
}
\r\n
}
\r\n
/**
\r\n
* 派发全局事件,用于小程序的交互调用
\r\n
* @param name 可以是事件名,也可以是事件
\r\n
* @param data
\r\n
*/
\r\n
dispatchGlobalEvent(name: string | any, data?: any) {\r
\n
GDispatcher.dispatchEvent(name, data)
\r\n
}
\r\n
/**
\r\n
* 移除全局事件,用于小程序交互调用
\r\n
* @param name
\r\n
* @param fun
\r\n
* @param thisObj
\r\n
*/
\r\n
removeGlobalEvent(name: string, fun: Function, thisObj?: any) {\r
\n
GDispatcher.removeEventListener(name, fun, thisObj)
\r\n
}
\r\n\r\n\r\n
//在小程序页面卸载时调用onUnload,多次销毁后会有问题,再检查
\r\n
destroy() {\r
\n
//Tween都移除,注意吧,可能原先的也被移除
\r\n
FYGE.Tween.removeAllTweens()
\r\n
// removeAllTimeoutId();//这个再看,尽量用tween的修改
\r\n
//停掉计时器
\r\n
FYGE.getCancelAnimationFrame()(this.requestID);
\r\n
//层级销毁
\r\n
destroyLayers()
\r\n
//销毁控制器
\r\n
destroyAllCtrls();
\r\n
//舞台销毁
\r\n
this.stage.destroy();
\r\n
//全局事件置空
\r\n
GDispatcher.removeAllEventListener();
\r\n
//网络数据记录清空
\r\n
destroyNetData();
\r\n
}
\r\n
}
\r\n\r\n\r\n\r\n\r\n
"
,
"import { showToast, wait, clearWait } from
\"
../module/ctrls
\"
;
\r\n
import { GDispatcher } from
\"
./Main
\"
;
\r\n\r\n
//接口枚举,包括需要调用淘宝的api,用是否含有兑吧区分,或者单独区分
\r\n
export enum TbNetName {\r
\n\r\n
/**
\r\n
* 埋点统计 到时改名字
\r\n
* activityId params elemType
\r\n
*/
\r\n
trackingReport =
\"
squirrelsAdoptRest2c.trackingReport
\"
,
\r\n
/**
\r\n
* 进入活动调用, 刷新数据不调用该接口
\r\n
* activityId userNick avatar follow inviteId
\r\n
*/
\r\n
getIndex =
\"
babycare.getIndex
\"
,
\r\n\r\n\r\n
/**
\r\n
* 活动基本信息
\r\n
* @param activityId
\r\n
* @type
{
string
}
\r\n
*/
\r\n
getActivityBaseInfoById =
\"
babycare.getActivityBaseInfoById
\"
,
\r\n\r\n
/**
\r\n
* 获取游戏信息
\r\n
* activityId
\r\n
*/
\r\n
getGameInfo =
\"
babycare.getGameInfo
\"
,
\r\n
/**
\r\n
* 消耗道具 ,会返回剩余所有道具数量
\r\n
* activityId
\t
type
\r\n
*/
\r\n
consumerTools =
\"
babycare.consumerTools
\"
,
\r\n
/**
\r\n
* 提交分数
\r\n
* activityId level score
\t
stars
\t
isVisitSuccess(是否通关)
\r\n
*/
\r\n
gameOver =
\"
babycare.gameOver
\"
,
\r\n
/**
\r\n
* 领取任务奖励
\r\n
* activityId taskType
\r\n
*/
\r\n
receiveTaskRewards =
\"
babycare.receiveTaskRewards
\"
,
\r\n
/**
\r\n
* 积分兑换道具和体力
\r\n
* activityId type credits
\r\n
*/
\r\n
exchange =
\"
babycare.exchange
\"
,
\r\n
/**
\r\n
* 根据等级获取奖品列表
\r\n
* activityId level
\r\n
*/
\r\n
getPrizesByLevel =
\"
babycare.getPrizesByLevel
\"
,
\r\n
/**
\r\n
* 查询用户积分
\r\n
* activityId
\r\n
*/
\r\n
queryCredits =
\"
babycare.queryCredits
\"
,
\r\n
/**
\r\n
* 开始闯关,会返回体力值
\r\n
* activityId level
\r\n
*/
\r\n
dojoin =
\"
babycare.dojoin
\"
,
\r\n
/**
\r\n
* 完成任务(浏览商品详情页, 关注店铺)
\r\n
* activityId taskType
\r\n
*/
\r\n
completeTask =
\"
babycare.completeTask
\"
,
\r\n
/**
\r\n
* 任务列表
\r\n
* activityId
\r\n
*/
\r\n
getTaskList =
\"
babycare.getTaskList
\"
,
\r\n\r\n
///////////////////前端调用接口都加个mine
\r\n\r\n
////带用户操作,和index.js特殊操作的
\r\n
/**
\r\n
* 用户授权
\r\n
*/
\r\n
authorize = 'mine.authorize',
\r\n
/**
\r\n
* 关注店铺
\r\n
*/
\r\n
favorShop =
\"
mine.favorShop
\"
,
\r\n
/**
\r\n
* 获取用户地址及确认
\r\n
* prizeId
\r\n
*/
\r\n
getUserAddress =
\"
mine.getUserAddress
\"
,
\r\n
/**
\r\n
* 获取名字
\r\n
* type
\r\n
*/
\r\n
getAdoptName =
\"
mine.getAdoptName
\"
,
\r\n\r\n
///////////////////////////基本都是前端同步方法
\r\n
/**
\r\n
* 获取参数
\r\n
*/
\r\n
getAppData =
\"
mine.getAppData
\"
,
\r\n
/**
\r\n
* 小程序内跳到其他页面
\r\n
* url
\r\n
*/
\r\n
navigateToOutside =
\"
mine.navigateToOutside
\"
,
\r\n
/**
\r\n
* 跳转到小程序的其他页面
\r\n
* url
\r\n
*/
\r\n
navigateTo =
\"
mine.navigateTo
\"
,
\r\n
/**
\r\n
* 返回上一页或多页
\r\n
* delta,页面数,不传默认1
\r\n
*/
\r\n
navigateBack =
\"
mine.navigateBack
\"
,
\r\n
/**
\r\n
* 分享面板
\r\n
* openId
\r\n
*/
\r\n
showSharePanel =
\"
mine.showSharePanel
\"
,
\r\n
/**
\r\n
* 打开详情页
\r\n
* itemId
\r\n
*/
\r\n
openDetail =
\"
mine.openDetail
\"
,
\r\n\r\n
/**
\r\n
* 自定义埋点
\r\n
* logkey
\r\n
*/
\r\n
reportAnalytics =
\"
mine.reportAnalytics
\"\r\n
}
\r\n\r\n
//返回数据类型,到时再调整
\r\n
// interface dataIn {\r
\n
// netName: TbNetName
\r\n
// data: any
\r\n
// }
\r\n
//返回数据类型
\r\n
interface dataOut {\r
\n
success: boolean,
\r\n
data?: any
\r\n
code?: string,
\r\n
message?: string
\r\n
}
\r\n\r\n
//记录数据
\r\n
let dataRecord: {\r
\n
[name: string]: any
\r\n
} = {};
\r\n\r\n
//云函数
\r\n
let fc;
\r\n\r\n
/**
\r\n
* 发送接口
\r\n
* @param netName
\r\n
* @param parameter
\r\n
* @param callback
\r\n
* @param hideMsg
\r\n
*/
\r\n
export function sendTbNet(
\r\n
netName: TbNetName,
\r\n
parameter?: any,
\r\n
callback?: (success: boolean, res?: dataOut) => void,
\r\n
hideMsg: boolean = false
\r\n
): Promise<dataOut> {\r
\n
return new Promise((resolve, reject) => {\r
\n
//网络超时
\r\n
let waitObj;
\r\n
//@ts-ignore 本地开发,直接取数据
\r\n
if (!my) {\r
\n
var url =
\"
../../mock/miniTb/
\"
+ netName +
\"
.json
\"
;
\r\n
fetchAsync(url)
\r\n
.then((data) => {\r
\n
//清除超时
\r\n
// clearWait(waitObj)
\r\n
//记录数据
\r\n
dataRecord[netName] = data;
\r\n
//统一错误信息提示
\r\n
if (!hideMsg && !data.success) showToast(data.message ||
\"
网络异常
\"
)
\r\n
//回调
\r\n
callback && callback(data.success, data);
\r\n
resolve(data)
\r\n
console.log(
\r\n
`
\\
n%c[ mock ]
\\
n`
\r\n
+ `NAME : ${netName}
\\
n`
\r\n
+ `STATE : %o
\\
n`
\r\n
+ `PARAM : %o
\\
n`
\r\n
+ `%cDATA : %o
\\
n`
\r\n
, `${data.success ? 'color:green' : 'color:red'}`
\r\n
, data.success
\r\n
, parameter
\r\n
, `${data.success ? 'color:green' : 'color:red'}`
\r\n
, data
\r\n
);
\r\n
}, () => {\r
\n
})
\r\n
return
\r\n
}
\r\n\r\n\r\n
let fun = function (e: { type: string, data: dataOut }) {\r
\n
//清除超时记录
\r\n
clearWait(waitObj)
\r\n
//移除事件
\r\n
GDispatcher.removeEventListener(netName, fun);
\r\n\r\n
var d = e.data;
\r\n
//记录数据
\r\n
dataRecord[netName] = d;
\r\n
//统一错误信息提示,d.data为了区分网络超时
\r\n
if (!hideMsg && !d.success) showToast(d.message ||
\"
网络超时
\"
)
\r\n
//执行回调
\r\n
callback && callback(d.success, d);
\r\n
resolve(d)
\r\n
console.log(
\r\n
`
\\
n%c[ request ]
\\
n`
\r\n
+ `NAME : ${netName}
\\
n`
\r\n
+ `STATE : %o
\\
n`
\r\n
+ `PARAM : %o
\\
n`
\r\n
+ `%cDATA : %o
\\
n`
\r\n
, `${d.success ? 'color:green' : 'color:red'}`
\r\n
, d.success
\r\n
, parameter
\r\n
, `${d.success ? 'color:green' : 'color:red'}`
\r\n
, d
\r\n
);
\r\n
}
\r\n
//添加事件接收接口返回信息
\r\n
GDispatcher.addEventListener(netName, fun);
\r\n\r\n
//网络超时
\r\n
waitObj = wait(() => {\r
\n
//是用户操作,不设置超时
\r\n
if (netName != TbNetName.favorShop &&//关注店铺用户操作
\r\n
netName != TbNetName.getUserAddress && // 获取地址
\r\n
netName != TbNetName.authorize && // 授权
\r\n
netName != TbNetName.getAdoptName && //领养名字获取
\r\n
netName != TbNetName.trackingReport && //埋点接口也不考虑超时
\r\n
netName != TbNetName.reportAnalytics //淘宝自定义埋点也不考虑超时
\r\n
) {\r
\n
fun({ type: netName, data: { success: false } })
\r\n
}
\r\n
}, 10000)
\r\n\r\n
//用事件方式吧,派发事件发接口,,,,注意很多独有的事件名别重了,onHide,onShow,onMessage等 放到最后,因为有同步的情况
\r\n
GDispatcher.dispatchEvent({ type:
\"
onMessage
\"
}, { netName, parameter })
\r\n
})
\r\n
//@ts-ignore
\r\n
// if (!fc) fc = getApp().cloud.function;
\r\n
// //第一个参数视项目而定
\r\n
// fc.invoke(
\"
becheery
\"
, parameter, netName)
\r\n
// .then((res: dataOut) => {\r
\n
// clearWait(waitObj);
\r\n
// //记录数据
\r\n
// dataRecord[netName] = res;
\r\n
// // console.log(
\"
返回数据
\"
+ JSON.stringify(res));
\r\n
// //统一错误信息提示
\r\n
// if (!hideMsg && !res.success) showToast(codeMsg[res.code] || res.message ||
\"
网络异常
\"
)
\r\n
// //回调
\r\n
// callback(res.success, res);
\r\n
// })
\r\n
}
\r\n\r\n
/**
\r\n
* 获取数据
\r\n
* @param netName
\r\n
*/
\r\n
export function getTbData(netName: TbNetName): dataOut {\r
\n
return dataRecord[netName] || null;
\r\n
}
\r\n\r\n
//销毁数据
\r\n
export function destroyNetData() {\r
\n
dataRecord =
{
}\r\n
}
\r\n\r\n
//webview里调用无效,用postMessage去调
\r\n
// export const navigateToOutside = (url) => {\r
\n
// my.call(
\"
navigateToOutside
\"
, {\r
\n
// url
\r\n
// }, (res) => {\r
\n
// // my.alert({ content:
\"
success -
\"
+ JSON.stringify(res)})
\r\n
// });
\r\n
// }
\r\n\r\n
async function fetchAsync(url: string) {\r
\n
// await response of fetch call
\r\n
let response = await fetch(url);
\r\n
// only proceed once promise is resolved
\r\n
let data = await response.json();
\r\n
// only proceed once second promise is resolved
\r\n
return data;
\r\n
}
\r\n\r\n\r\n
// const { cloud } = window[
\"
getApp
\"
]();
\r\n
// const { function: fc } = cloud;
\r\n
// fc.invoke(
\"
duiba.sign.doJoin
\"
, { signActivityId: 1 })
\r\n
// .then(res => {\r
\n
// console.log(res);
\r\n
// })
\r\n\r\n
/**
\r\n
* 错误码列表,字段不设枚举了
\r\n
*/
\r\n
const codeMsg = {\r
\n
\"
210001
\"
:
\"
服务器异常
\"
,
\r\n
\"
210002
\"
:
\"
用户不存在
\"
,
\r\n
\"
210003
\"
:
\"
邀请已达上限
\"
,
\r\n
\"
210004
\"
:
\"
无法邀请自己
\"
,
\r\n
\"
210006
\"
:
\"
该活动ID无效
\"
,
\r\n
\"
210009
\"
:
\"
该活动暂未开始
\"
,
\r\n
\"
210010
\"
:
\"
该分享ID不存在
\"
,
\r\n
\"
210012
\"
:
\"
该用户暂未获奖
\"
,
\r\n
\"
210013
\"
:
\"
领取失败
\"
,
\r\n
\"
210015
\"
:
\"
该活动已删除
\"
,
\r\n
\"
210016
\"
:
\"
该活动已经结束
\"
,
\r\n
\"
210017
\"
:
\"
该奖品已达领取上线
\"
,
\r\n
\"
210018
\"
:
\"
请先分享好友
\"
,
\r\n
\"
210019
\"
:
\"
暂有奖品未领取
\"
,
\r\n
\"
210020
\"
:
\"
暂有奖品未完成
\"
,
\r\n
\"
210021
\"
:
\"
请先玩一局游戏
\"
,
\r\n
\"
210022
\"
:
\"
请先选择奖品
\"
,
\r\n
\"
210023
\"
:
\"
领取失败,库存不足
\"
,
\r\n
\"
210024
\"
:
\"
请先成为会员
\"
,
\r\n
\"
210025
\"
:
\"
奖品已经过期
\"
,
\r\n
\"
210026
\"
:
\"
不能重复助力
\"
,
\r\n
\"
210028
\"
:
\"
请至我的奖品页重新领取
\"
,//重新领取
\r\n
}
\r\n
"
,
"export enum G_EVENT {\r
\n
ON_SHOW = 'onShow', // 页面显示
\r\n
ON_HIDE = 'onHide', // 页面隐藏
\r\n
UPDATE_TASK = 'UpdateTask', // 更新任务
\r\n
}
\r\n
"
,
"import { RES } from
\"
../../module/RES
\"
;
\n
import resCanvasList from '../../resCanvasList';
\n
export default class Root extends FYGE.Container {\n constructor() {\n super();
\n\n
var bg: FYGE.Sprite = new FYGE.Sprite();
\n
bg.x = 0;
\n
bg.y = 0;
\n
bg.texture = RES.getRes(
\n
resCanvasList[
\"
4ee17a9c-5deb-43be-b205-16fb7593d172
\"
].url
\n
);
\n
this.addChild(bg);
\n
}
\n
}
\n
"
,
"import { Scene } from
\"
../../module/views/Scene
\"
;
\r\n
import { RES } from
\"
../../module/RES
\"
;
\r\n
import Root from
\"
./Root
\"
;
\r\n\r\n
export class StartScene extends Scene {\r
\n
initUi() {\r
\n
super.initUi();
\r\n
var canvas: FYGE.Container = new FYGE.Container();
\r\n
canvas.position.set(0, 0);
\r\n
this.addChild(canvas);
\r\n
}
\r\n\r\n
start() {\r
\n
this.addChild(new Root());
\r\n
}
\r\n
}
\r\n
"
],
"sourceRoot"
:
""
}
\ No newline at end of file
project/src/canvas/game/package.json
View file @
8dbf83d0
...
...
@@ -36,6 +36,7 @@
"watch"
:
"webpack --watch"
,
"dev"
:
"webpack-dev-server --open --config webpack.dev.js --host 0.0.0.0"
,
"buildTS"
:
"webpack --config webpack.prod.js && node scripts/mergeJs"
,
"buildTSAndCopy"
:
"webpack --config webpack.prod.js && node scripts/mergeJs && node scripts/copyJs"
,
"copyJs"
:
"node scripts/copyJs"
},
"author"
:
"MrKwon"
,
...
...
project/src/canvas/game/released/output.js
0 → 100644
View file @
8dbf83d0
import
*
as
FYGE
from
"fyge-tbmini"
;
(
function
webpackUniversalModuleDefinition
(
root
,
factory
)
{
if
(
typeof
exports
===
'object'
&&
typeof
module
===
'object'
)
module
.
exports
=
factory
();
else
if
(
typeof
define
===
'function'
&&
define
.
amd
)
define
([],
factory
);
else
{
var
a
=
factory
();
for
(
var
i
in
a
)
(
typeof
exports
===
'object'
?
exports
:
root
)[
i
]
=
a
[
i
];
}
})(
window
,
function
()
{
return
/******/
(
function
(
modules
)
{
// webpackBootstrap
/******/
// The module cache
/******/
var
installedModules
=
{};
/******/
/******/
// The require function
/******/
function
__webpack_require__
(
moduleId
)
{
/******/
/******/
// Check if module is in cache
/******/
if
(
installedModules
[
moduleId
])
{
/******/
return
installedModules
[
moduleId
].
exports
;
/******/
}
/******/
// Create a new module (and put it into the cache)
/******/
var
module
=
installedModules
[
moduleId
]
=
{
/******/
i
:
moduleId
,
/******/
l
:
false
,
/******/
exports
:
{}
/******/
};
/******/
/******/
// Execute the module function
/******/
modules
[
moduleId
].
call
(
module
.
exports
,
module
,
module
.
exports
,
__webpack_require__
);
/******/
/******/
// Flag the module as loaded
/******/
module
.
l
=
true
;
/******/
/******/
// Return the exports of the module
/******/
return
module
.
exports
;
/******/
}
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
__webpack_require__
.
m
=
modules
;
/******/
/******/
// expose the module cache
/******/
__webpack_require__
.
c
=
installedModules
;
/******/
/******/
// define getter function for harmony exports
/******/
__webpack_require__
.
d
=
function
(
exports
,
name
,
getter
)
{
/******/
if
(
!
__webpack_require__
.
o
(
exports
,
name
))
{
/******/
Object
.
defineProperty
(
exports
,
name
,
{
enumerable
:
true
,
get
:
getter
});
/******/
}
/******/
};
/******/
/******/
// define __esModule on exports
/******/
__webpack_require__
.
r
=
function
(
exports
)
{
/******/
if
(
typeof
Symbol
!==
'undefined'
&&
Symbol
.
toStringTag
)
{
/******/
Object
.
defineProperty
(
exports
,
Symbol
.
toStringTag
,
{
value
:
'Module'
});
/******/
}
/******/
Object
.
defineProperty
(
exports
,
'__esModule'
,
{
value
:
true
});
/******/
};
/******/
/******/
// create a fake namespace object
/******/
// mode & 1: value is a module id, require it
/******/
// mode & 2: merge all properties of value into the ns
/******/
// mode & 4: return value when already ns object
/******/
// mode & 8|1: behave like require
/******/
__webpack_require__
.
t
=
function
(
value
,
mode
)
{
/******/
if
(
mode
&
1
)
value
=
__webpack_require__
(
value
);
/******/
if
(
mode
&
8
)
return
value
;
/******/
if
((
mode
&
4
)
&&
typeof
value
===
'object'
&&
value
&&
value
.
__esModule
)
return
value
;
/******/
var
ns
=
Object
.
create
(
null
);
/******/
__webpack_require__
.
r
(
ns
);
/******/
Object
.
defineProperty
(
ns
,
'default'
,
{
enumerable
:
true
,
value
:
value
});
/******/
if
(
mode
&
2
&&
typeof
value
!=
'string'
)
for
(
var
key
in
value
)
__webpack_require__
.
d
(
ns
,
key
,
function
(
key
)
{
return
value
[
key
];
}.
bind
(
null
,
key
));
/******/
return
ns
;
/******/
};
/******/
/******/
// getDefaultExport function for compatibility with non-harmony modules
/******/
__webpack_require__
.
n
=
function
(
module
)
{
/******/
var
getter
=
module
&&
module
.
__esModule
?
/******/
function
getDefault
()
{
return
module
[
'default'
];
}
:
/******/
function
getModuleExports
()
{
return
module
;
};
/******/
__webpack_require__
.
d
(
getter
,
'a'
,
getter
);
/******/
return
getter
;
/******/
};
/******/
/******/
// Object.prototype.hasOwnProperty.call
/******/
__webpack_require__
.
o
=
function
(
object
,
property
)
{
return
Object
.
prototype
.
hasOwnProperty
.
call
(
object
,
property
);
};
/******/
/******/
// __webpack_public_path__
/******/
__webpack_require__
.
p
=
""
;
/******/
/******/
/******/
// Load entry module and return exports
/******/
return
__webpack_require__
(
__webpack_require__
.
s
=
"./src/Main.ts"
);
/******/
})
/************************************************************************/
/******/
({
/***/
"./module/RES.ts"
:
/*!***********************!*\
!*** ./module/RES.ts ***!
\***********************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES
;
(
function
(
RES
)
{
var
resData
;
var
videoEntityHash
=
{};
var
soundHash
=
{};
var
groupsCompleteHash
=
{};
var
groupsPromiseHash
=
{};
var
singleResPromiseHash
=
{};
function
loadConfig
(
res
)
{
resData
=
res
;
RES
.
resPath
=
res
.
path
;
}
RES
.
loadConfig
=
loadConfig
;
function
loadSparkAssets
(
resList
)
{
var
list
=
[];
for
(
var
key
in
resList
)
{
list
.
push
(
resList
[
key
]);
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
if
(
s
)
{
resolve
();
}
else
{
reject
();
}
},
list
);
});
return
p
;
}
RES
.
loadSparkAssets
=
loadSparkAssets
;
function
loadGroup
(
name
)
{
if
(
groupsCompleteHash
[
name
])
{
return
new
Promise
(
function
(
resolve
)
{
resolve
();
});
}
if
(
groupsPromiseHash
[
name
])
{
return
groupsPromiseHash
[
name
];
}
var
arr
=
getGroupResByName
(
name
);
if
(
!
arr
||
!
arr
.
length
)
{
groupsCompleteHash
[
name
]
=
true
;
return
new
Promise
(
function
(
resolve
)
{
resolve
();
});
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
delete
groupsPromiseHash
[
name
];
if
(
s
)
{
groupsCompleteHash
[
name
]
=
true
;
resolve
();
}
else
{
reject
();
}
},
arr
);
});
groupsPromiseHash
[
name
]
=
p
;
return
p
;
}
RES
.
loadGroup
=
loadGroup
;
function
getResAsync
(
str
,
comFun
,
thisObj
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
if
(
type
==
"png"
||
type
==
"jpg"
)
{
if
(
FYGE
.
TextureCache
[
str
])
{
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
new
Promise
(
function
(
r
)
{
r
(
FYGE
.
TextureCache
[
str
]);
});
}
else
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
FYGE
.
GlobalLoader
.
loadImage
(
function
(
s
,
image
)
{
if
(
s
)
{
FYGE
.
Texture
.
addToCache
(
FYGE
.
Texture
.
from
(
image
),
str
);
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
resolve
(
FYGE
.
TextureCache
[
str
]);
}
else
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
reject
();
}
},
str
);
});
}
}
}
RES
.
getResAsync
=
getResAsync
;
function
getResByUrl
()
{
}
RES
.
getResByUrl
=
getResByUrl
;
function
getRes
(
str
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
if
(
type
==
"png"
||
type
==
"jpg"
)
{
return
FYGE
.
TextureCache
[
str
]
||
null
;
}
}
RES
.
getRes
=
getRes
;
function
hasRes
(
str
)
{
for
(
var
i
=
0
;
i
<
resData
.
groups
.
length
;
i
++
)
{
var
group
=
resData
.
groups
[
i
];
var
keys
=
group
.
keys
;
if
(
keys
&&
keys
.
split
(
","
).
indexOf
(
str
)
>
-
1
)
{
return
group
.
name
;
}
if
(
group
.
atlas
&&
group
.
name
+
".json"
==
str
)
{
return
group
.
name
;
}
}
return
null
;
}
function
getGroupResByName
(
name
)
{
var
group
=
getGroupByName
(
name
);
if
(
!
group
)
return
null
;
if
(
group
.
atlas
)
{
var
arr
=
[
name
+
".json"
];
if
(
group
.
keys
)
{
arr
=
arr
.
concat
(
group
.
keys
.
split
(
","
).
filter
(
function
(
k
)
{
return
k
.
substr
(
-
4
)
!=
".png"
;
}));
}
return
arr
;
}
else
if
(
group
.
keys
)
{
return
group
.
keys
.
split
(
","
);
}
else
{
return
null
;
}
}
function
getGroupByName
(
name
)
{
var
groups
=
resData
.
groups
;
var
group
;
for
(
var
i
=
0
;
i
<
groups
.
length
;
i
++
)
{
if
(
groups
[
i
].
name
===
name
)
{
group
=
groups
[
i
];
break
;
}
}
return
group
;
}
function
loadResList
(
callback
,
arr
)
{
var
count
=
0
;
var
countAll
=
arr
.
length
;
if
(
!
countAll
)
callback
(
true
);
var
mark
=
true
;
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
var
resName
=
arr
[
i
][
'url'
];
getResAsync
(
resName
,
function
(
res
,
str
)
{
if
(
!
res
)
mark
=
false
;
if
(
++
count
==
countAll
)
callback
(
mark
);
},
this
);
}
}
RES
.
loadResList
=
loadResList
;
function
returnSingleResPromise
(
str
,
comFun
,
thisObj
)
{
singleResPromiseHash
[
str
].
then
(
function
(
r
)
{
comFun
&&
comFun
.
call
(
thisObj
,
r
,
str
);
},
function
()
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
});
return
singleResPromiseHash
[
str
];
}
var
skinData
;
function
loadSkinConfig
(
skinJson
)
{
skinData
=
skinJson
;
}
RES
.
loadSkinConfig
=
loadSkinConfig
;
function
initSkinDisplay
(
con
,
skin
,
root
)
{
var
data
=
typeof
(
skin
)
==
'string'
?
getSkinDataByName
(
skin
)
:
skin
;
if
(
!
data
.
children
||
!
data
.
children
.
length
)
return
;
for
(
var
i
=
0
;
i
<
data
.
children
.
length
;
i
++
)
{
var
child
=
data
.
children
[
i
];
if
(
child
.
type
==
"skin"
)
continue
;
var
dis
=
con
.
addChild
(
getDisplayByData
(
child
));
if
(
root
&&
child
.
id
)
root
[
child
.
id
]
=
dis
;
if
(
child
.
type
==
"container"
)
initSkinDisplay
(
dis
,
child
,
root
);
}
}
RES
.
initSkinDisplay
=
initSkinDisplay
;
function
getSkinDataByName
(
skinName
,
skinNode
)
{
if
(
skinNode
===
void
0
)
{
skinNode
=
skinData
;
}
if
(
!
skinNode
||
!
skinNode
.
children
||
!
skinNode
.
children
.
length
)
return
null
;
for
(
var
i
=
0
;
i
<
skinNode
.
children
.
length
;
i
++
)
{
var
child
=
skinNode
.
children
[
i
];
if
(
child
.
name
==
skinName
&&
(
child
.
type
==
"container"
||
child
.
type
==
"skin"
))
return
child
;
var
gson
=
getSkinDataByName
(
skinName
,
child
);
if
(
gson
)
return
gson
;
}
return
null
;
}
RES
.
getSkinDataByName
=
getSkinDataByName
;
function
getSrcByUuid
(
resList
,
uuid
)
{
resList
=
resList
||
[];
for
(
var
i
=
0
;
i
<
resList
.
length
;
i
++
)
{
if
(
resList
[
i
].
uuid
==
uuid
)
{
return
resList
[
i
].
url
;
}
}
return
""
;
}
RES
.
getSrcByUuid
=
getSrcByUuid
;
function
getDisplayByData
(
data
)
{
var
dis
;
switch
(
data
.
type
)
{
case
"container"
:
dis
=
new
FYGE
.
Container
();
break
;
case
"button"
:
dis
=
new
FYGE
.
Button
(
getRes
(
data
.
props
.
tUp
),
data
.
props
.
tDown
?
getRes
(
data
.
props
.
tDown
)
:
null
,
data
.
props
.
tDisable
?
getRes
(
data
.
props
.
tDisable
)
:
null
);
break
;
case
"text"
:
dis
=
new
FYGE
.
TextField
();
for
(
var
key
in
data
.
props
)
dis
[
key
]
=
data
.
props
[
key
];
break
;
case
"sprite"
:
dis
=
new
FYGE
.
Sprite
(
getRes
(
data
.
props
.
source
));
break
;
case
"rect"
:
dis
=
new
FYGE
.
Shape
();
dis
.
beginFill
(
FYGE
.
string2hex
(
data
.
props
.
fillColor
));
dis
.
drawRect
(
0
,
0
,
data
.
props
.
width
,
data
.
props
.
height
);
dis
.
endFill
();
break
;
}
dis
.
name
=
data
.
name
;
dis
.
alpha
=
data
.
alpha
||
1
;
dis
.
position
.
set
(
data
.
x
,
data
.
y
);
return
dis
;
}
function
destroyRES
()
{
}
})(
RES
=
exports
.
RES
||
(
exports
.
RES
=
{}));
/***/
}),
/***/
"./module/ctrls/index.ts"
:
/*!*******************************!*\
!*** ./module/ctrls/index.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
function
__export
(
m
)
{
for
(
var
p
in
m
)
if
(
!
exports
.
hasOwnProperty
(
p
))
exports
[
p
]
=
m
[
p
];
}
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
panelCtrl_1
=
__webpack_require__
(
/*! ./panelCtrl */
"./module/ctrls/panelCtrl.ts"
);
var
sceneCtrl_1
=
__webpack_require__
(
/*! ./sceneCtrl */
"./module/ctrls/sceneCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
toastCtrl_2
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
exports
.
showToast
=
toastCtrl_2
.
showToast
;
__export
(
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
));
exports
.
showPanel
=
function
(
panel
,
data
)
{
return
panelCtrl_1
.
default
.
instance
.
show
(
panel
,
data
);
};
exports
.
showConfirm
=
function
(
panel
,
data
)
{
var
confirmPanel
=
panelCtrl_1
.
default
.
instance
.
show
(
panel
,
data
);
return
confirmPanel
.
makePromise
();
};
exports
.
closeAllPanels
=
function
()
{
panelCtrl_1
.
default
.
instance
.
closeAll
();
};
exports
.
closeCurrentPanel
=
function
()
{
panelCtrl_1
.
default
.
instance
.
closeCurrent
();
};
exports
.
changeScene
=
function
(
scene
,
data
)
{
sceneCtrl_1
.
default
.
instance
.
change
(
scene
,
data
);
};
function
getCurrentScene
()
{
return
sceneCtrl_1
.
default
.
instance
.
currentScene
;
}
exports
.
getCurrentScene
=
getCurrentScene
;
exports
.
showAlert
=
function
(
title
,
content
)
{
if
(
my
)
{
my
.
alert
({
title
:
title
||
""
,
content
:
content
||
""
});
}
else
{
console
.
log
(
title
,
content
);
}
};
function
wait
(
callback
,
time
)
{
var
obj
=
{};
FYGE
.
Tween
.
get
(
obj
)
.
wait
(
time
)
.
call
(
callback
);
return
obj
;
}
exports
.
wait
=
wait
;
function
clearWait
(
obj
)
{
obj
&&
FYGE
.
Tween
.
removeTweens
(
obj
);
}
exports
.
clearWait
=
clearWait
;
function
removeTweens
(
obj
,
isRecursive
)
{
if
(
isRecursive
===
void
0
)
{
isRecursive
=
true
;
}
if
(
!
obj
)
return
;
FYGE
.
Tween
.
removeTweens
(
obj
);
if
(
!
isRecursive
||
!
obj
.
children
||
!
obj
.
children
.
length
)
return
;
obj
.
children
.
forEach
(
function
(
child
)
{
removeTweens
(
child
);
});
}
exports
.
removeTweens
=
removeTweens
;
function
destroyAllCtrls
()
{
toastCtrl_1
.
destroyToast
();
waitingCtrl_1
.
destroyWaiting
();
panelCtrl_1
.
default
.
instance
.
destroy
();
sceneCtrl_1
.
default
.
instance
.
destroy
();
}
exports
.
destroyAllCtrls
=
destroyAllCtrls
;
/***/
}),
/***/
"./module/ctrls/panelCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/panelCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
PanelCtrl
=
(
function
()
{
function
PanelCtrl
()
{
this
.
stacks
=
[];
}
Object
.
defineProperty
(
PanelCtrl
,
"instance"
,
{
get
:
function
()
{
return
PanelCtrl
.
_instance
||
(
PanelCtrl
.
_instance
=
new
PanelCtrl
());
},
enumerable
:
true
,
configurable
:
true
});
PanelCtrl
.
prototype
.
init
=
function
(
parent
)
{
this
.
_parent
=
parent
;
var
bg
=
new
FYGE
.
Shape
();
bg
.
beginFill
(
0
);
bg
.
drawRect
(
layers_1
.
layers
.
stageOffsetX
-
parent
.
x
,
layers_1
.
layers
.
stageOffsetY
-
parent
.
y
,
layers_1
.
layers
.
stageWidth
,
layers_1
.
layers
.
stageHeight
);
bg
.
endFill
();
bg
.
hitTestByPixel
=
false
;
bg
.
visible
=
false
;
this
.
_parent
.
addChild
(
bg
);
this
.
_bg
=
bg
;
};
PanelCtrl
.
prototype
.
closeAll
=
function
()
{
this
.
stacks
.
forEach
(
function
(
e
)
{
return
e
.
hidePanel
();
});
};
PanelCtrl
.
prototype
.
show
=
function
(
cls
,
data
)
{
var
_this
=
this
;
waitingCtrl_1
.
showWaiting
();
var
panel
=
new
cls
(
data
);
this
.
add
(
panel
);
this
.
stacks
.
push
(
panel
);
panel
.
onLoaded
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
_this
.
updateView
(
false
);
panel
.
start
(
data
);
if
(
panel
.
visible
)
panel
.
showAni
();
};
panel
.
onLoadError
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
toastCtrl_1
.
showToast
(
"资源加载失败"
);
panel
.
removeEventListener
(
'onDestroy'
,
_this
.
onPanelHide
,
_this
);
_this
.
remove
(
panel
);
};
return
panel
;
};
PanelCtrl
.
prototype
.
updateView
=
function
(
showPanelAni
)
{
var
_this
=
this
;
if
(
showPanelAni
===
void
0
)
{
showPanelAni
=
true
;
}
if
(
!
this
.
stacks
.
length
)
{
if
(
this
.
_bg
.
visible
)
{
this
.
bgAni
=
"hide"
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
FYGE
.
Tween
.
get
(
this
.
_bg
)
.
to
({
alpha
:
0
},
200
,
FYGE
.
Ease
.
cubicOut
)
.
call
(
function
()
{
_this
.
_bg
.
visible
=
false
;
_this
.
_current
=
null
;
_this
.
_parent
.
visible
=
false
;
});
}
}
else
{
this
.
_parent
.
visible
=
true
;
if
(
this
.
bgAni
==
"hide"
)
{
this
.
bgAni
=
"show"
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
this
.
_bg
.
alpha
=
0.7
;
}
if
(
this
.
_bg
.
visible
===
false
)
{
this
.
_bg
.
visible
=
true
;
this
.
_bg
.
alpha
=
0
;
FYGE
.
Tween
.
get
(
this
.
_bg
).
to
({
alpha
:
0.7
},
200
,
FYGE
.
Ease
.
cubicOut
);
}
}
for
(
var
i
=
0
;
i
<
this
.
stacks
.
length
;
i
++
)
{
if
(
i
<
this
.
stacks
.
length
-
1
)
{
this
.
stacks
[
i
].
visible
=
false
;
}
else
{
this
.
stacks
[
i
].
visible
=
true
;
if
(
showPanelAni
)
this
.
stacks
[
i
].
showAni
();
this
.
_current
=
this
.
stacks
[
i
];
}
}
};
PanelCtrl
.
prototype
.
add
=
function
(
panel
)
{
this
.
_parent
.
addChild
(
panel
);
panel
.
addEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
};
PanelCtrl
.
prototype
.
remove
=
function
(
panel
)
{
this
.
_parent
.
removeChild
(
panel
);
this
.
stacks
=
this
.
stacks
.
filter
(
function
(
e
)
{
return
e
!=
panel
;
});
};
PanelCtrl
.
prototype
.
onPanelHide
=
function
(
e
)
{
var
panel
=
e
.
target
;
panel
.
removeEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
this
.
remove
(
panel
);
this
.
updateView
();
};
PanelCtrl
.
prototype
.
closeCurrent
=
function
()
{
if
(
this
.
_current
)
{
this
.
_current
.
hidePanel
();
}
};
PanelCtrl
.
prototype
.
destroy
=
function
()
{
PanelCtrl
.
_instance
=
null
;
this
.
stacks
=
null
;
this
.
_current
=
null
;
this
.
_parent
=
null
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
this
.
_bg
=
null
;
};
return
PanelCtrl
;
}());
exports
.
default
=
PanelCtrl
;
/***/
}),
/***/
"./module/ctrls/sceneCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/sceneCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
SceneCtrl
=
(
function
()
{
function
SceneCtrl
()
{
}
Object
.
defineProperty
(
SceneCtrl
,
"instance"
,
{
get
:
function
()
{
return
SceneCtrl
.
_instance
||
(
SceneCtrl
.
_instance
=
new
SceneCtrl
());
},
enumerable
:
true
,
configurable
:
true
});
SceneCtrl
.
prototype
.
init
=
function
(
parent
)
{
this
.
_parent
=
parent
;
};
SceneCtrl
.
prototype
.
change
=
function
(
cls
,
data
)
{
var
_this
=
this
;
var
scene
=
new
cls
(
data
);
scene
.
visible
=
false
;
waitingCtrl_1
.
showWaiting
();
var
preScene
=
this
.
_currentScene
;
scene
.
onLoaded
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
scene
.
showAni
(
function
()
{
if
(
preScene
)
preScene
.
destroy
();
});
scene
.
visible
=
true
;
scene
.
start
(
data
);
};
scene
.
onLoadError
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
toastCtrl_1
.
showToast
(
"资源加载失败"
);
_this
.
_currentScene
=
preScene
||
null
;
_this
.
_parent
.
removeChild
(
scene
);
};
this
.
_currentScene
=
scene
;
this
.
_parent
.
addChild
(
scene
);
};
Object
.
defineProperty
(
SceneCtrl
.
prototype
,
"currentScene"
,
{
get
:
function
()
{
return
this
.
_currentScene
;
},
enumerable
:
true
,
configurable
:
true
});
SceneCtrl
.
prototype
.
destroy
=
function
()
{
SceneCtrl
.
_instance
=
null
;
this
.
_currentScene
=
null
;
this
.
_parent
=
null
;
};
return
SceneCtrl
;
}());
exports
.
default
=
SceneCtrl
;
/***/
}),
/***/
"./module/ctrls/toastCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/toastCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
inited
=
false
;
var
_toast
;
var
_parent
;
var
startY
;
var
endY
;
var
initToast
=
function
()
{
if
(
!
inited
)
{
inited
=
true
;
_toast
=
new
Toast
();
_parent
=
layers_1
.
layers
.
toastLayer
;
_toast
.
alpha
=
0
;
_toast
.
x
=
layers_1
.
layers
.
stageOffsetX
-
_parent
.
x
+
(
layers_1
.
layers
.
stageWidth
-
_toast
.
width
)
/
2
;
var
h
=
_toast
.
height
;
var
y
=
layers_1
.
layers
.
stageOffsetY
-
_parent
.
y
;
startY
=
y
-
h
;
endY
=
y
+
(
layers_1
.
layers
.
stageHeight
-
h
)
/
2
;
}
};
exports
.
showToast
=
function
(
msg
)
{
initToast
();
_toast
.
show
(
msg
);
_parent
.
addChild
(
_toast
);
FYGE
.
Tween
.
removeTweens
(
_toast
);
FYGE
.
Tween
.
get
(
_toast
)
.
set
({
y
:
startY
,
alpha
:
1
})
.
to
({
y
:
endY
},
500
,
FYGE
.
Ease
.
quartOut
)
.
wait
(
800
)
.
to
({
alpha
:
0
},
300
)
.
call
(
function
()
{
_parent
.
removeChild
(
_toast
);
});
};
exports
.
destroyToast
=
function
()
{
if
(
inited
&&
_toast
&&
!
_toast
.
destroyed
)
{
_toast
.
destroy
();
_toast
=
null
;
_parent
=
null
;
inited
=
false
;
}
};
var
Toast
=
(
function
(
_super
)
{
__extends
(
Toast
,
_super
);
function
Toast
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
PADDING
=
40
;
_this
.
mouseChildren
=
false
;
_this
.
mouseEnable
=
false
;
var
toastBgTexture
=
RES_1
.
RES
.
getRes
(
"toastBg.png"
);
if
(
toastBgTexture
)
{
_this
.
bg
=
new
FYGE
.
Sprite
(
toastBgTexture
);
_this
.
addChild
(
_this
.
bg
);
}
_this
.
msg
=
new
FYGE
.
TextField
();
_this
.
msg
.
size
=
28
;
_this
.
msg
.
fillColor
=
"0xffffff"
;
_this
.
msg
.
text
=
""
;
_this
.
msg
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
_this
.
msg
.
textHeight
=
toastBgTexture
?
toastBgTexture
.
height
:
200
;
_this
.
msg
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
_this
.
addChild
(
_this
.
msg
);
return
_this
;
}
Toast
.
prototype
.
show
=
function
(
msg
)
{
this
.
msg
.
text
=
msg
;
this
.
msg
.
x
=
((
this
.
bg
?
this
.
bg
.
width
:
0
)
-
this
.
msg
.
textWidth
)
/
2
;
};
Toast
.
prototype
.
destroy
=
function
()
{
_super
.
prototype
.
destroy
.
call
(
this
);
this
.
msg
=
null
;
this
.
bg
=
null
;
};
return
Toast
;
}(
FYGE
.
Container
));
/***/
}),
/***/
"./module/ctrls/waitingCtrl.ts"
:
/*!*************************************!*\
!*** ./module/ctrls/waitingCtrl.ts ***!
\*************************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
inited
=
false
;
var
_waiting
;
var
_parent
;
var
initWaiting
=
function
()
{
if
(
!
inited
)
{
inited
=
true
;
var
waiting
=
new
Waiting
();
_parent
=
layers_1
.
layers
.
topLayer
;
_waiting
=
waiting
;
var
offX
=
(
layers_1
.
layers
.
stageWidth
-
160
)
/
2
;
var
offY
=
(
layers_1
.
layers
.
stageHeight
-
_waiting
.
height
)
/
2
;
_waiting
.
x
=
layers_1
.
layers
.
stageOffsetX
-
_parent
.
x
+
offX
;
_waiting
.
y
=
layers_1
.
layers
.
stageOffsetY
-
_parent
.
y
+
offY
;
var
bg
=
new
FYGE
.
Graphics
()
.
beginFill
(
0x000000
)
.
drawRect
(
-
offX
,
-
offY
,
layers_1
.
layers
.
stageWidth
,
layers_1
.
layers
.
stageHeight
)
.
endFill
();
bg
.
alpha
=
0
;
_waiting
.
addChildAt
(
bg
,
0
);
}
};
exports
.
showWaiting
=
function
(
msg
)
{
initWaiting
();
_waiting
.
show
(
msg
);
_parent
.
addChild
(
_waiting
);
};
exports
.
hideWaiting
=
function
()
{
_parent
.
removeChild
(
_waiting
);
};
exports
.
destroyWaiting
=
function
()
{
if
(
inited
&&
_waiting
&&
!
_waiting
.
destroyed
)
{
_waiting
.
destroy
();
_waiting
=
null
;
_parent
=
null
;
inited
=
false
;
}
};
var
Waiting
=
(
function
(
_super
)
{
__extends
(
Waiting
,
_super
);
function
Waiting
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
rectBgTexture
=
RES_1
.
RES
.
getRes
(
"waitingBg.png"
);
if
(
rectBgTexture
)
{
var
rectBg
=
new
FYGE
.
Sprite
(
rectBgTexture
);
_this
.
addChild
(
rectBg
);
var
rotTexture
=
RES_1
.
RES
.
getRes
(
"waitingRot.png"
);
var
rot_1
=
new
FYGE
.
Sprite
(
rotTexture
);
rot_1
.
x
=
(
rectBgTexture
.
width
-
rotTexture
.
width
)
/
2
;
rot_1
.
y
=
47
;
rot_1
.
anchorX
=
rotTexture
.
width
/
2
;
rot_1
.
anchorY
=
rotTexture
.
height
/
2
;
_this
.
addChild
(
rot_1
);
var
count_1
=
0
;
rot_1
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
function
()
{
count_1
++
;
if
(
count_1
%
30
==
0
)
rot_1
.
rotation
+=
45
;
},
_this
);
}
_this
.
msg
=
new
FYGE
.
TextField
();
_this
.
msg
.
y
=
125
;
_this
.
msg
.
textWidth
=
rectBgTexture
?
rectBgTexture
.
width
:
200
;
_this
.
msg
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
_this
.
msg
.
size
=
26
;
_this
.
msg
.
fillColor
=
"#ffffff"
;
_this
.
addChild
(
_this
.
msg
);
return
_this
;
}
Waiting
.
prototype
.
show
=
function
(
msg
)
{
if
(
msg
===
void
0
)
{
msg
=
"加载中"
;
}
this
.
msg
.
text
=
msg
;
};
Waiting
.
prototype
.
destroy
=
function
()
{
_super
.
prototype
.
destroy
.
call
(
this
);
this
.
msg
=
null
;
};
return
Waiting
;
}(
FYGE
.
Container
));
/***/
}),
/***/
"./module/views/Module.ts"
:
/*!********************************!*\
!*** ./module/views/Module.ts ***!
\********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
ctrls_1
=
__webpack_require__
(
/*! ../ctrls */
"./module/ctrls/index.ts"
);
var
Module
=
(
function
(
_super
)
{
__extends
(
Module
,
_super
);
function
Module
(
data
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
data
=
data
;
_this
.
init
();
return
_this
;
}
Module
.
prototype
.
init
=
function
()
{
var
_this
=
this
;
this
.
preLoadRes
().
then
(
function
()
{
if
(
_this
.
skinName
)
RES_1
.
RES
.
initSkinDisplay
(
_this
,
_this
.
skinName
,
_this
);
_this
.
initUi
();
_this
.
onLoaded
&&
_this
.
onLoaded
();
},
function
()
{
_this
.
onLoadError
&&
_this
.
onLoadError
();
});
};
Module
.
prototype
.
preLoadRes
=
function
()
{
var
_this
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
_this
.
groupNames
&&
_this
.
groupNames
.
length
)
{
var
arr
=
[];
for
(
var
i
=
0
;
i
<
_this
.
groupNames
.
length
;
i
++
)
{
arr
.
push
(
RES_1
.
RES
.
loadGroup
(
_this
.
groupNames
[
i
]));
}
Promise
.
all
(
arr
).
then
(
resolve
,
reject
);
}
else
{
resolve
();
}
});
};
Module
.
prototype
.
initUi
=
function
()
{
};
Object
.
defineProperty
(
Module
.
prototype
,
"groupNames"
,
{
get
:
function
()
{
return
null
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Module
.
prototype
,
"skinName"
,
{
get
:
function
()
{
return
null
;
},
enumerable
:
true
,
configurable
:
true
});
;
Module
.
prototype
.
start
=
function
(
data
)
{
this
.
initEvents
();
};
Module
.
prototype
.
initEvents
=
function
()
{
};
Module
.
prototype
.
removeEvents
=
function
()
{
};
Module
.
prototype
.
enableMouseEvt
=
function
(
enable
)
{
this
.
mouseEnable
=
enable
;
this
.
mouseChildren
=
enable
;
};
Module
.
prototype
.
btnDelay
=
function
(
target
,
delay
)
{
if
(
delay
===
void
0
)
{
delay
=
2000
;
}
target
.
mouseEnable
=
false
;
target
.
mouseChildren
=
false
;
setTimeout
(
function
()
{
target
.
mouseEnable
=
true
;
target
.
mouseChildren
=
true
;
},
delay
);
};
Module
.
prototype
.
destroy
=
function
()
{
ctrls_1
.
removeTweens
(
this
);
this
.
removeEvents
();
this
.
dispatchEvent
(
"onDestroy"
);
_super
.
prototype
.
destroy
.
call
(
this
);
};
return
Module
;
}(
FYGE
.
Container
));
exports
.
Module
=
Module
;
/***/
}),
/***/
"./module/views/Scene.ts"
:
/*!*******************************!*\
!*** ./module/views/Scene.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
Module_1
=
__webpack_require__
(
/*! ./Module */
"./module/views/Module.ts"
);
var
Scene
=
(
function
(
_super
)
{
__extends
(
Scene
,
_super
);
function
Scene
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Scene
.
prototype
.
showAni
=
function
(
callback
)
{
callback
();
};
Scene
.
prototype
.
updateScene
=
function
()
{
};
return
Scene
;
}(
Module_1
.
Module
));
exports
.
Scene
=
Scene
;
/***/
}),
/***/
"./module/views/layers.ts"
:
/*!********************************!*\
!*** ./module/views/layers.ts ***!
\********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
panelCtrl_1
=
__webpack_require__
(
/*! ../ctrls/panelCtrl */
"./module/ctrls/panelCtrl.ts"
);
var
sceneCtrl_1
=
__webpack_require__
(
/*! ../ctrls/sceneCtrl */
"./module/ctrls/sceneCtrl.ts"
);
var
Layers
=
(
function
(
_super
)
{
__extends
(
Layers
,
_super
);
function
Layers
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Layers
.
prototype
.
init
=
function
(
stage
)
{
stage
.
addChild
(
this
);
var
arr
=
[
"_bottomLayer"
,
"_sceneLayer"
,
"_popupLayer"
,
"_toastLayer"
,
"_topLayer"
,
"_shareLayer"
];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
this
[
arr
[
i
]]
=
new
FYGE
.
Container
();
this
.
addChild
(
this
[
arr
[
i
]]);
}
this
.
sceneLayer
.
y
=
this
.
stageOffsetY
;
this
.
shareLayer
.
y
=
-
this
.
stageOffsetY
;
sceneCtrl_1
.
default
.
instance
.
init
(
this
.
sceneLayer
);
panelCtrl_1
.
default
.
instance
.
init
(
this
.
popupLayer
);
};
Object
.
defineProperty
(
Layers
.
prototype
,
"bottomLayer"
,
{
get
:
function
()
{
return
this
.
_bottomLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"sceneLayer"
,
{
get
:
function
()
{
return
this
.
_sceneLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"popupLayer"
,
{
get
:
function
()
{
return
this
.
_popupLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"toastLayer"
,
{
get
:
function
()
{
return
this
.
_toastLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"topLayer"
,
{
get
:
function
()
{
return
this
.
_topLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"shareLayer"
,
{
get
:
function
()
{
return
this
.
_shareLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageHeight"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
height
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageWidth"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
width
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageOffsetX"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
x
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageOffsetY"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
y
;
},
enumerable
:
true
,
configurable
:
true
});
return
Layers
;
}(
FYGE
.
Container
));
exports
.
layers
=
new
Layers
();
function
destroyLayers
()
{
exports
.
layers
.
removeChildren
();
if
(
exports
.
layers
.
parent
)
exports
.
layers
.
parent
.
removeChild
(
exports
.
layers
);
}
exports
.
destroyLayers
=
destroyLayers
;
/***/
}),
/***/
"./resCanvasList.js"
:
/*!**************************!*\
!*** ./resCanvasList.js ***!
\**************************/
/*! exports provided: default */
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
__webpack_require__
.
r
(
__webpack_exports__
);
const
resCanvasList
=
{
'4ee17a9c-5deb-43be-b205-16fb7593d172'
:
{
name
:
'spark'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png'
,
uuid
:
'4ee17a9c-5deb-43be-b205-16fb7593d172'
}
};
/* harmony default export */
__webpack_exports__
[
"default"
]
=
(
resCanvasList
);
// const resList = {
// '4ee17a9c-5deb-43be-b205-16fb7593d172': {
// name: 'spark',
// ext: '.png',
// url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
// uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
// }
// };
// export default resList;
/***/
}),
/***/
"./src/Main.ts"
:
/*!*********************!*\
!*** ./src/Main.ts ***!
\*********************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
var
__awaiter
=
(
this
&&
this
.
__awaiter
)
||
function
(
thisArg
,
_arguments
,
P
,
generator
)
{
return
new
(
P
||
(
P
=
Promise
))(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
step
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
"throw"
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
result
.
done
?
resolve
(
result
.
value
)
:
new
P
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
step
((
generator
=
generator
.
apply
(
thisArg
,
_arguments
||
[])).
next
());
});
};
var
__generator
=
(
this
&&
this
.
__generator
)
||
function
(
thisArg
,
body
)
{
var
_
=
{
label
:
0
,
sent
:
function
()
{
if
(
t
[
0
]
&
1
)
throw
t
[
1
];
return
t
[
1
];
},
trys
:
[],
ops
:
[]
},
f
,
y
,
t
,
g
;
return
g
=
{
next
:
verb
(
0
),
"throw"
:
verb
(
1
),
"return"
:
verb
(
2
)
},
typeof
Symbol
===
"function"
&&
(
g
[
Symbol
.
iterator
]
=
function
()
{
return
this
;
}),
g
;
function
verb
(
n
)
{
return
function
(
v
)
{
return
step
([
n
,
v
]);
};
}
function
step
(
op
)
{
if
(
f
)
throw
new
TypeError
(
"Generator is already executing."
);
while
(
_
)
try
{
if
(
f
=
1
,
y
&&
(
t
=
op
[
0
]
&
2
?
y
[
"return"
]
:
op
[
0
]
?
y
[
"throw"
]
||
((
t
=
y
[
"return"
])
&&
t
.
call
(
y
),
0
)
:
y
.
next
)
&&
!
(
t
=
t
.
call
(
y
,
op
[
1
])).
done
)
return
t
;
if
(
y
=
0
,
t
)
op
=
[
op
[
0
]
&
2
,
t
.
value
];
switch
(
op
[
0
])
{
case
0
:
case
1
:
t
=
op
;
break
;
case
4
:
_
.
label
++
;
return
{
value
:
op
[
1
],
done
:
false
};
case
5
:
_
.
label
++
;
y
=
op
[
1
];
op
=
[
0
];
continue
;
case
7
:
op
=
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
default
:
if
(
!
(
t
=
_
.
trys
,
t
=
t
.
length
>
0
&&
t
[
t
.
length
-
1
])
&&
(
op
[
0
]
===
6
||
op
[
0
]
===
2
))
{
_
=
0
;
continue
;
}
if
(
op
[
0
]
===
3
&&
(
!
t
||
(
op
[
1
]
>
t
[
0
]
&&
op
[
1
]
<
t
[
3
])))
{
_
.
label
=
op
[
1
];
break
;
}
if
(
op
[
0
]
===
6
&&
_
.
label
<
t
[
1
])
{
_
.
label
=
t
[
1
];
t
=
op
;
break
;
}
if
(
t
&&
_
.
label
<
t
[
2
])
{
_
.
label
=
t
[
2
];
_
.
ops
.
push
(
op
);
break
;
}
if
(
t
[
2
])
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
}
op
=
body
.
call
(
thisArg
,
_
);
}
catch
(
e
)
{
op
=
[
6
,
e
];
y
=
0
;
}
finally
{
f
=
t
=
0
;
}
if
(
op
[
0
]
&
5
)
throw
op
[
1
];
return
{
value
:
op
[
0
]
?
op
[
1
]
:
void
0
,
done
:
true
};
}
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../module/RES */
"./module/RES.ts"
);
var
layers_1
=
__webpack_require__
(
/*! ../module/views/layers */
"./module/views/layers.ts"
);
var
G_EVENT_1
=
__webpack_require__
(
/*! ./common/G_EVENT */
"./src/common/G_EVENT.ts"
);
var
ctrls_1
=
__webpack_require__
(
/*! ../module/ctrls */
"./module/ctrls/index.ts"
);
var
StartScene_1
=
__webpack_require__
(
/*! ./scenes/StartScene */
"./src/scenes/StartScene.ts"
);
var
TaoBaoNet_1
=
__webpack_require__
(
/*! ./TaoBaoNet */
"./src/TaoBaoNet.ts"
);
var
resCanvasList_1
=
__webpack_require__
(
/*! ../resCanvasList */
"./resCanvasList.js"
);
exports
.
GDispatcher
=
new
FYGE
.
EventDispatcher
();
var
Main
=
(
function
()
{
function
Main
(
canvas
)
{
var
sysInfo
;
if
(
my
)
{
FYGE
.
initedByCanvas
(
canvas
);
sysInfo
=
my
.
getSystemInfoSync
();
}
var
stage
=
new
FYGE
.
Stage
(
canvas
,
750
,
1624
,
sysInfo
&&
sysInfo
.
windowWidth
||
document
.
body
.
clientWidth
,
sysInfo
&&
sysInfo
.
windowHeight
||
document
.
body
.
clientHeight
,
FYGE
.
RENDERER_TYPE
.
CANVAS
);
this
.
stage
=
stage
;
stage
.
addEventListener
(
FYGE
.
Event
.
INIT_STAGE
,
this
.
onAddToStage
,
this
);
var
self
=
this
;
loop
();
function
loop
()
{
if
(
!
self
.
_pause
)
{
FYGE
.
Tween
.
flush
();
stage
.
flush
();
}
self
.
requestID
=
FYGE
.
getRequestAnimationFrame
()(
loop
);
}
}
Main
.
prototype
.
onAddToStage
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
layers_1
.
layers
.
init
(
this
.
stage
);
console
.
log
(
"初始化层级完成"
);
return
[
4
,
RES_1
.
RES
.
loadSparkAssets
(
resCanvasList_1
.
default
)];
case
1
:
_a
.
sent
();
console
.
log
(
"通用资源加载完成"
);
ctrls_1
.
changeScene
(
StartScene_1
.
StartScene
);
return
[
2
];
}
});
});
};
Main
.
prototype
.
run
=
function
()
{
this
.
_pause
=
false
;
exports
.
GDispatcher
.
dispatchEvent
(
G_EVENT_1
.
G_EVENT
.
ON_SHOW
);
};
Main
.
prototype
.
pause
=
function
()
{
exports
.
GDispatcher
.
dispatchEvent
(
G_EVENT_1
.
G_EVENT
.
ON_HIDE
);
};
Main
.
prototype
.
addGlobalEvent
=
function
(
name
,
fun
,
thisObj
,
once
)
{
if
(
once
===
void
0
)
{
once
=
false
;
}
if
(
once
)
{
exports
.
GDispatcher
.
once
(
name
,
fun
,
thisObj
);
}
else
{
exports
.
GDispatcher
.
addEventListener
(
name
,
fun
,
thisObj
);
}
};
Main
.
prototype
.
dispatchGlobalEvent
=
function
(
name
,
data
)
{
exports
.
GDispatcher
.
dispatchEvent
(
name
,
data
);
};
Main
.
prototype
.
removeGlobalEvent
=
function
(
name
,
fun
,
thisObj
)
{
exports
.
GDispatcher
.
removeEventListener
(
name
,
fun
,
thisObj
);
};
Main
.
prototype
.
destroy
=
function
()
{
FYGE
.
Tween
.
removeAllTweens
();
FYGE
.
getCancelAnimationFrame
()(
this
.
requestID
);
layers_1
.
destroyLayers
();
ctrls_1
.
destroyAllCtrls
();
this
.
stage
.
destroy
();
exports
.
GDispatcher
.
removeAllEventListener
();
TaoBaoNet_1
.
destroyNetData
();
};
return
Main
;
}());
exports
.
Main
=
Main
;
/***/
}),
/***/
"./src/TaoBaoNet.ts"
:
/*!**************************!*\
!*** ./src/TaoBaoNet.ts ***!
\**************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
var
__awaiter
=
(
this
&&
this
.
__awaiter
)
||
function
(
thisArg
,
_arguments
,
P
,
generator
)
{
return
new
(
P
||
(
P
=
Promise
))(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
step
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
"throw"
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
result
.
done
?
resolve
(
result
.
value
)
:
new
P
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
step
((
generator
=
generator
.
apply
(
thisArg
,
_arguments
||
[])).
next
());
});
};
var
__generator
=
(
this
&&
this
.
__generator
)
||
function
(
thisArg
,
body
)
{
var
_
=
{
label
:
0
,
sent
:
function
()
{
if
(
t
[
0
]
&
1
)
throw
t
[
1
];
return
t
[
1
];
},
trys
:
[],
ops
:
[]
},
f
,
y
,
t
,
g
;
return
g
=
{
next
:
verb
(
0
),
"throw"
:
verb
(
1
),
"return"
:
verb
(
2
)
},
typeof
Symbol
===
"function"
&&
(
g
[
Symbol
.
iterator
]
=
function
()
{
return
this
;
}),
g
;
function
verb
(
n
)
{
return
function
(
v
)
{
return
step
([
n
,
v
]);
};
}
function
step
(
op
)
{
if
(
f
)
throw
new
TypeError
(
"Generator is already executing."
);
while
(
_
)
try
{
if
(
f
=
1
,
y
&&
(
t
=
op
[
0
]
&
2
?
y
[
"return"
]
:
op
[
0
]
?
y
[
"throw"
]
||
((
t
=
y
[
"return"
])
&&
t
.
call
(
y
),
0
)
:
y
.
next
)
&&
!
(
t
=
t
.
call
(
y
,
op
[
1
])).
done
)
return
t
;
if
(
y
=
0
,
t
)
op
=
[
op
[
0
]
&
2
,
t
.
value
];
switch
(
op
[
0
])
{
case
0
:
case
1
:
t
=
op
;
break
;
case
4
:
_
.
label
++
;
return
{
value
:
op
[
1
],
done
:
false
};
case
5
:
_
.
label
++
;
y
=
op
[
1
];
op
=
[
0
];
continue
;
case
7
:
op
=
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
default
:
if
(
!
(
t
=
_
.
trys
,
t
=
t
.
length
>
0
&&
t
[
t
.
length
-
1
])
&&
(
op
[
0
]
===
6
||
op
[
0
]
===
2
))
{
_
=
0
;
continue
;
}
if
(
op
[
0
]
===
3
&&
(
!
t
||
(
op
[
1
]
>
t
[
0
]
&&
op
[
1
]
<
t
[
3
])))
{
_
.
label
=
op
[
1
];
break
;
}
if
(
op
[
0
]
===
6
&&
_
.
label
<
t
[
1
])
{
_
.
label
=
t
[
1
];
t
=
op
;
break
;
}
if
(
t
&&
_
.
label
<
t
[
2
])
{
_
.
label
=
t
[
2
];
_
.
ops
.
push
(
op
);
break
;
}
if
(
t
[
2
])
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
}
op
=
body
.
call
(
thisArg
,
_
);
}
catch
(
e
)
{
op
=
[
6
,
e
];
y
=
0
;
}
finally
{
f
=
t
=
0
;
}
if
(
op
[
0
]
&
5
)
throw
op
[
1
];
return
{
value
:
op
[
0
]
?
op
[
1
]
:
void
0
,
done
:
true
};
}
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
ctrls_1
=
__webpack_require__
(
/*! ../module/ctrls */
"./module/ctrls/index.ts"
);
var
Main_1
=
__webpack_require__
(
/*! ./Main */
"./src/Main.ts"
);
var
TbNetName
;
(
function
(
TbNetName
)
{
TbNetName
[
"trackingReport"
]
=
"squirrelsAdoptRest2c.trackingReport"
;
TbNetName
[
"getIndex"
]
=
"babycare.getIndex"
;
TbNetName
[
"getActivityBaseInfoById"
]
=
"babycare.getActivityBaseInfoById"
;
TbNetName
[
"getGameInfo"
]
=
"babycare.getGameInfo"
;
TbNetName
[
"consumerTools"
]
=
"babycare.consumerTools"
;
TbNetName
[
"gameOver"
]
=
"babycare.gameOver"
;
TbNetName
[
"receiveTaskRewards"
]
=
"babycare.receiveTaskRewards"
;
TbNetName
[
"exchange"
]
=
"babycare.exchange"
;
TbNetName
[
"getPrizesByLevel"
]
=
"babycare.getPrizesByLevel"
;
TbNetName
[
"queryCredits"
]
=
"babycare.queryCredits"
;
TbNetName
[
"dojoin"
]
=
"babycare.dojoin"
;
TbNetName
[
"completeTask"
]
=
"babycare.completeTask"
;
TbNetName
[
"getTaskList"
]
=
"babycare.getTaskList"
;
TbNetName
[
"authorize"
]
=
"mine.authorize"
;
TbNetName
[
"favorShop"
]
=
"mine.favorShop"
;
TbNetName
[
"getUserAddress"
]
=
"mine.getUserAddress"
;
TbNetName
[
"getAdoptName"
]
=
"mine.getAdoptName"
;
TbNetName
[
"getAppData"
]
=
"mine.getAppData"
;
TbNetName
[
"navigateToOutside"
]
=
"mine.navigateToOutside"
;
TbNetName
[
"navigateTo"
]
=
"mine.navigateTo"
;
TbNetName
[
"navigateBack"
]
=
"mine.navigateBack"
;
TbNetName
[
"showSharePanel"
]
=
"mine.showSharePanel"
;
TbNetName
[
"openDetail"
]
=
"mine.openDetail"
;
TbNetName
[
"reportAnalytics"
]
=
"mine.reportAnalytics"
;
})(
TbNetName
=
exports
.
TbNetName
||
(
exports
.
TbNetName
=
{}));
var
dataRecord
=
{};
var
fc
;
function
sendTbNet
(
netName
,
parameter
,
callback
,
hideMsg
)
{
if
(
hideMsg
===
void
0
)
{
hideMsg
=
false
;
}
return
new
Promise
(
function
(
resolve
,
reject
)
{
var
waitObj
;
if
(
!
my
)
{
var
url
=
"../../mock/miniTb/"
+
netName
+
".json"
;
fetchAsync
(
url
)
.
then
(
function
(
data
)
{
dataRecord
[
netName
]
=
data
;
if
(
!
hideMsg
&&
!
data
.
success
)
ctrls_1
.
showToast
(
data
.
message
||
"网络异常"
);
callback
&&
callback
(
data
.
success
,
data
);
resolve
(
data
);
console
.
log
(
"
\n
%c[ mock ]
\n
"
+
(
"NAME : "
+
netName
+
"
\n
"
)
+
"STATE : %o
\n
"
+
"PARAM : %o
\n
"
+
"%cDATA : %o
\n
"
,
""
+
(
data
.
success
?
'color:green'
:
'color:red'
),
data
.
success
,
parameter
,
""
+
(
data
.
success
?
'color:green'
:
'color:red'
),
data
);
},
function
()
{
});
return
;
}
var
fun
=
function
(
e
)
{
ctrls_1
.
clearWait
(
waitObj
);
Main_1
.
GDispatcher
.
removeEventListener
(
netName
,
fun
);
var
d
=
e
.
data
;
dataRecord
[
netName
]
=
d
;
if
(
!
hideMsg
&&
!
d
.
success
)
ctrls_1
.
showToast
(
d
.
message
||
"网络超时"
);
callback
&&
callback
(
d
.
success
,
d
);
resolve
(
d
);
console
.
log
(
"
\n
%c[ request ]
\n
"
+
(
"NAME : "
+
netName
+
"
\n
"
)
+
"STATE : %o
\n
"
+
"PARAM : %o
\n
"
+
"%cDATA : %o
\n
"
,
""
+
(
d
.
success
?
'color:green'
:
'color:red'
),
d
.
success
,
parameter
,
""
+
(
d
.
success
?
'color:green'
:
'color:red'
),
d
);
};
Main_1
.
GDispatcher
.
addEventListener
(
netName
,
fun
);
waitObj
=
ctrls_1
.
wait
(
function
()
{
if
(
netName
!=
TbNetName
.
favorShop
&&
netName
!=
TbNetName
.
getUserAddress
&&
netName
!=
TbNetName
.
authorize
&&
netName
!=
TbNetName
.
getAdoptName
&&
netName
!=
TbNetName
.
trackingReport
&&
netName
!=
TbNetName
.
reportAnalytics
)
{
fun
({
type
:
netName
,
data
:
{
success
:
false
}
});
}
},
10000
);
Main_1
.
GDispatcher
.
dispatchEvent
({
type
:
"onMessage"
},
{
netName
:
netName
,
parameter
:
parameter
});
});
}
exports
.
sendTbNet
=
sendTbNet
;
function
getTbData
(
netName
)
{
return
dataRecord
[
netName
]
||
null
;
}
exports
.
getTbData
=
getTbData
;
function
destroyNetData
()
{
dataRecord
=
{};
}
exports
.
destroyNetData
=
destroyNetData
;
function
fetchAsync
(
url
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
response
,
data
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
return
[
4
,
fetch
(
url
)];
case
1
:
response
=
_a
.
sent
();
return
[
4
,
response
.
json
()];
case
2
:
data
=
_a
.
sent
();
return
[
2
,
data
];
}
});
});
}
var
codeMsg
=
{
"210001"
:
"服务器异常"
,
"210002"
:
"用户不存在"
,
"210003"
:
"邀请已达上限"
,
"210004"
:
"无法邀请自己"
,
"210006"
:
"该活动ID无效"
,
"210009"
:
"该活动暂未开始"
,
"210010"
:
"该分享ID不存在"
,
"210012"
:
"该用户暂未获奖"
,
"210013"
:
"领取失败"
,
"210015"
:
"该活动已删除"
,
"210016"
:
"该活动已经结束"
,
"210017"
:
"该奖品已达领取上线"
,
"210018"
:
"请先分享好友"
,
"210019"
:
"暂有奖品未领取"
,
"210020"
:
"暂有奖品未完成"
,
"210021"
:
"请先玩一局游戏"
,
"210022"
:
"请先选择奖品"
,
"210023"
:
"领取失败,库存不足"
,
"210024"
:
"请先成为会员"
,
"210025"
:
"奖品已经过期"
,
"210026"
:
"不能重复助力"
,
"210028"
:
"请至我的奖品页重新领取"
,
};
/***/
}),
/***/
"./src/common/G_EVENT.ts"
:
/*!*******************************!*\
!*** ./src/common/G_EVENT.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
G_EVENT
;
(
function
(
G_EVENT
)
{
G_EVENT
[
"ON_SHOW"
]
=
"onShow"
;
G_EVENT
[
"ON_HIDE"
]
=
"onHide"
;
G_EVENT
[
"UPDATE_TASK"
]
=
"UpdateTask"
;
})(
G_EVENT
=
exports
.
G_EVENT
||
(
exports
.
G_EVENT
=
{}));
/***/
}),
/***/
"./src/scenes/Root.ts"
:
/*!****************************!*\
!*** ./src/scenes/Root.ts ***!
\****************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../../module/RES */
"./module/RES.ts"
);
var
resCanvasList_1
=
__webpack_require__
(
/*! ../../resCanvasList */
"./resCanvasList.js"
);
var
Root
=
(
function
(
_super
)
{
__extends
(
Root
,
_super
);
function
Root
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
bg
=
new
FYGE
.
Sprite
();
bg
.
x
=
0
;
bg
.
y
=
0
;
bg
.
texture
=
RES_1
.
RES
.
getRes
(
resCanvasList_1
.
default
[
"4ee17a9c-5deb-43be-b205-16fb7593d172"
].
url
);
_this
.
addChild
(
bg
);
return
_this
;
}
return
Root
;
}(
FYGE
.
Container
));
exports
.
default
=
Root
;
/***/
}),
/***/
"./src/scenes/StartScene.ts"
:
/*!**********************************!*\
!*** ./src/scenes/StartScene.ts ***!
\**********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
Scene_1
=
__webpack_require__
(
/*! ../../module/views/Scene */
"./module/views/Scene.ts"
);
var
Root_1
=
__webpack_require__
(
/*! ./Root */
"./src/scenes/Root.ts"
);
var
StartScene
=
(
function
(
_super
)
{
__extends
(
StartScene
,
_super
);
function
StartScene
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
StartScene
.
prototype
.
initUi
=
function
()
{
_super
.
prototype
.
initUi
.
call
(
this
);
var
canvas
=
new
FYGE
.
Container
();
canvas
.
position
.
set
(
0
,
0
);
this
.
addChild
(
canvas
);
};
StartScene
.
prototype
.
start
=
function
()
{
this
.
addChild
(
new
Root_1
.
default
());
};
return
StartScene
;
}(
Scene_1
.
Scene
));
exports
.
StartScene
=
StartScene
;
/***/
})
/******/
});
});
//# sourceMappingURL=output.js.map
\ No newline at end of file
project/src/canvas/game/scripts/copyJs.js
View file @
8dbf83d0
...
...
@@ -6,7 +6,7 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var
endPath
=
'
D:/duibaGame/淘宝项目/babycareXiaoxiaoleTBminiTry/client/pages/index
/'
;
var
endPath
=
'
/Users/wanghongyuan/hello_canvas/project/src/pages/pagecanvas
/'
;
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs
.
writeFileSync
(
endPath
+
"output.js"
,
fs
.
readFileSync
(
"./released/output.js"
));
...
...
project/src/pages/pagecanvas/output.js
0 → 100644
View file @
8dbf83d0
import
*
as
FYGE
from
"fyge-tbmini"
;
(
function
webpackUniversalModuleDefinition
(
root
,
factory
)
{
if
(
typeof
exports
===
'object'
&&
typeof
module
===
'object'
)
module
.
exports
=
factory
();
else
if
(
typeof
define
===
'function'
&&
define
.
amd
)
define
([],
factory
);
else
{
var
a
=
factory
();
for
(
var
i
in
a
)
(
typeof
exports
===
'object'
?
exports
:
root
)[
i
]
=
a
[
i
];
}
})(
window
,
function
()
{
return
/******/
(
function
(
modules
)
{
// webpackBootstrap
/******/
// The module cache
/******/
var
installedModules
=
{};
/******/
/******/
// The require function
/******/
function
__webpack_require__
(
moduleId
)
{
/******/
/******/
// Check if module is in cache
/******/
if
(
installedModules
[
moduleId
])
{
/******/
return
installedModules
[
moduleId
].
exports
;
/******/
}
/******/
// Create a new module (and put it into the cache)
/******/
var
module
=
installedModules
[
moduleId
]
=
{
/******/
i
:
moduleId
,
/******/
l
:
false
,
/******/
exports
:
{}
/******/
};
/******/
/******/
// Execute the module function
/******/
modules
[
moduleId
].
call
(
module
.
exports
,
module
,
module
.
exports
,
__webpack_require__
);
/******/
/******/
// Flag the module as loaded
/******/
module
.
l
=
true
;
/******/
/******/
// Return the exports of the module
/******/
return
module
.
exports
;
/******/
}
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
__webpack_require__
.
m
=
modules
;
/******/
/******/
// expose the module cache
/******/
__webpack_require__
.
c
=
installedModules
;
/******/
/******/
// define getter function for harmony exports
/******/
__webpack_require__
.
d
=
function
(
exports
,
name
,
getter
)
{
/******/
if
(
!
__webpack_require__
.
o
(
exports
,
name
))
{
/******/
Object
.
defineProperty
(
exports
,
name
,
{
enumerable
:
true
,
get
:
getter
});
/******/
}
/******/
};
/******/
/******/
// define __esModule on exports
/******/
__webpack_require__
.
r
=
function
(
exports
)
{
/******/
if
(
typeof
Symbol
!==
'undefined'
&&
Symbol
.
toStringTag
)
{
/******/
Object
.
defineProperty
(
exports
,
Symbol
.
toStringTag
,
{
value
:
'Module'
});
/******/
}
/******/
Object
.
defineProperty
(
exports
,
'__esModule'
,
{
value
:
true
});
/******/
};
/******/
/******/
// create a fake namespace object
/******/
// mode & 1: value is a module id, require it
/******/
// mode & 2: merge all properties of value into the ns
/******/
// mode & 4: return value when already ns object
/******/
// mode & 8|1: behave like require
/******/
__webpack_require__
.
t
=
function
(
value
,
mode
)
{
/******/
if
(
mode
&
1
)
value
=
__webpack_require__
(
value
);
/******/
if
(
mode
&
8
)
return
value
;
/******/
if
((
mode
&
4
)
&&
typeof
value
===
'object'
&&
value
&&
value
.
__esModule
)
return
value
;
/******/
var
ns
=
Object
.
create
(
null
);
/******/
__webpack_require__
.
r
(
ns
);
/******/
Object
.
defineProperty
(
ns
,
'default'
,
{
enumerable
:
true
,
value
:
value
});
/******/
if
(
mode
&
2
&&
typeof
value
!=
'string'
)
for
(
var
key
in
value
)
__webpack_require__
.
d
(
ns
,
key
,
function
(
key
)
{
return
value
[
key
];
}.
bind
(
null
,
key
));
/******/
return
ns
;
/******/
};
/******/
/******/
// getDefaultExport function for compatibility with non-harmony modules
/******/
__webpack_require__
.
n
=
function
(
module
)
{
/******/
var
getter
=
module
&&
module
.
__esModule
?
/******/
function
getDefault
()
{
return
module
[
'default'
];
}
:
/******/
function
getModuleExports
()
{
return
module
;
};
/******/
__webpack_require__
.
d
(
getter
,
'a'
,
getter
);
/******/
return
getter
;
/******/
};
/******/
/******/
// Object.prototype.hasOwnProperty.call
/******/
__webpack_require__
.
o
=
function
(
object
,
property
)
{
return
Object
.
prototype
.
hasOwnProperty
.
call
(
object
,
property
);
};
/******/
/******/
// __webpack_public_path__
/******/
__webpack_require__
.
p
=
""
;
/******/
/******/
/******/
// Load entry module and return exports
/******/
return
__webpack_require__
(
__webpack_require__
.
s
=
"./src/Main.ts"
);
/******/
})
/************************************************************************/
/******/
({
/***/
"./module/RES.ts"
:
/*!***********************!*\
!*** ./module/RES.ts ***!
\***********************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES
;
(
function
(
RES
)
{
var
resData
;
var
videoEntityHash
=
{};
var
soundHash
=
{};
var
groupsCompleteHash
=
{};
var
groupsPromiseHash
=
{};
var
singleResPromiseHash
=
{};
function
loadConfig
(
res
)
{
resData
=
res
;
RES
.
resPath
=
res
.
path
;
}
RES
.
loadConfig
=
loadConfig
;
function
loadSparkAssets
(
resList
)
{
var
list
=
[];
for
(
var
key
in
resList
)
{
list
.
push
(
resList
[
key
]);
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
if
(
s
)
{
resolve
();
}
else
{
reject
();
}
},
list
);
});
return
p
;
}
RES
.
loadSparkAssets
=
loadSparkAssets
;
function
loadGroup
(
name
)
{
if
(
groupsCompleteHash
[
name
])
{
return
new
Promise
(
function
(
resolve
)
{
resolve
();
});
}
if
(
groupsPromiseHash
[
name
])
{
return
groupsPromiseHash
[
name
];
}
var
arr
=
getGroupResByName
(
name
);
if
(
!
arr
||
!
arr
.
length
)
{
groupsCompleteHash
[
name
]
=
true
;
return
new
Promise
(
function
(
resolve
)
{
resolve
();
});
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
delete
groupsPromiseHash
[
name
];
if
(
s
)
{
groupsCompleteHash
[
name
]
=
true
;
resolve
();
}
else
{
reject
();
}
},
arr
);
});
groupsPromiseHash
[
name
]
=
p
;
return
p
;
}
RES
.
loadGroup
=
loadGroup
;
function
getResAsync
(
str
,
comFun
,
thisObj
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
if
(
type
==
"png"
||
type
==
"jpg"
)
{
if
(
FYGE
.
TextureCache
[
str
])
{
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
new
Promise
(
function
(
r
)
{
r
(
FYGE
.
TextureCache
[
str
]);
});
}
else
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
FYGE
.
GlobalLoader
.
loadImage
(
function
(
s
,
image
)
{
if
(
s
)
{
FYGE
.
Texture
.
addToCache
(
FYGE
.
Texture
.
from
(
image
),
str
);
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
resolve
(
FYGE
.
TextureCache
[
str
]);
}
else
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
reject
();
}
},
str
);
});
}
}
}
RES
.
getResAsync
=
getResAsync
;
function
getResByUrl
()
{
}
RES
.
getResByUrl
=
getResByUrl
;
function
getRes
(
str
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
if
(
type
==
"png"
||
type
==
"jpg"
)
{
return
FYGE
.
TextureCache
[
str
]
||
null
;
}
}
RES
.
getRes
=
getRes
;
function
hasRes
(
str
)
{
for
(
var
i
=
0
;
i
<
resData
.
groups
.
length
;
i
++
)
{
var
group
=
resData
.
groups
[
i
];
var
keys
=
group
.
keys
;
if
(
keys
&&
keys
.
split
(
","
).
indexOf
(
str
)
>
-
1
)
{
return
group
.
name
;
}
if
(
group
.
atlas
&&
group
.
name
+
".json"
==
str
)
{
return
group
.
name
;
}
}
return
null
;
}
function
getGroupResByName
(
name
)
{
var
group
=
getGroupByName
(
name
);
if
(
!
group
)
return
null
;
if
(
group
.
atlas
)
{
var
arr
=
[
name
+
".json"
];
if
(
group
.
keys
)
{
arr
=
arr
.
concat
(
group
.
keys
.
split
(
","
).
filter
(
function
(
k
)
{
return
k
.
substr
(
-
4
)
!=
".png"
;
}));
}
return
arr
;
}
else
if
(
group
.
keys
)
{
return
group
.
keys
.
split
(
","
);
}
else
{
return
null
;
}
}
function
getGroupByName
(
name
)
{
var
groups
=
resData
.
groups
;
var
group
;
for
(
var
i
=
0
;
i
<
groups
.
length
;
i
++
)
{
if
(
groups
[
i
].
name
===
name
)
{
group
=
groups
[
i
];
break
;
}
}
return
group
;
}
function
loadResList
(
callback
,
arr
)
{
var
count
=
0
;
var
countAll
=
arr
.
length
;
if
(
!
countAll
)
callback
(
true
);
var
mark
=
true
;
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
var
resName
=
arr
[
i
][
'url'
];
getResAsync
(
resName
,
function
(
res
,
str
)
{
if
(
!
res
)
mark
=
false
;
if
(
++
count
==
countAll
)
callback
(
mark
);
},
this
);
}
}
RES
.
loadResList
=
loadResList
;
function
returnSingleResPromise
(
str
,
comFun
,
thisObj
)
{
singleResPromiseHash
[
str
].
then
(
function
(
r
)
{
comFun
&&
comFun
.
call
(
thisObj
,
r
,
str
);
},
function
()
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
});
return
singleResPromiseHash
[
str
];
}
var
skinData
;
function
loadSkinConfig
(
skinJson
)
{
skinData
=
skinJson
;
}
RES
.
loadSkinConfig
=
loadSkinConfig
;
function
initSkinDisplay
(
con
,
skin
,
root
)
{
var
data
=
typeof
(
skin
)
==
'string'
?
getSkinDataByName
(
skin
)
:
skin
;
if
(
!
data
.
children
||
!
data
.
children
.
length
)
return
;
for
(
var
i
=
0
;
i
<
data
.
children
.
length
;
i
++
)
{
var
child
=
data
.
children
[
i
];
if
(
child
.
type
==
"skin"
)
continue
;
var
dis
=
con
.
addChild
(
getDisplayByData
(
child
));
if
(
root
&&
child
.
id
)
root
[
child
.
id
]
=
dis
;
if
(
child
.
type
==
"container"
)
initSkinDisplay
(
dis
,
child
,
root
);
}
}
RES
.
initSkinDisplay
=
initSkinDisplay
;
function
getSkinDataByName
(
skinName
,
skinNode
)
{
if
(
skinNode
===
void
0
)
{
skinNode
=
skinData
;
}
if
(
!
skinNode
||
!
skinNode
.
children
||
!
skinNode
.
children
.
length
)
return
null
;
for
(
var
i
=
0
;
i
<
skinNode
.
children
.
length
;
i
++
)
{
var
child
=
skinNode
.
children
[
i
];
if
(
child
.
name
==
skinName
&&
(
child
.
type
==
"container"
||
child
.
type
==
"skin"
))
return
child
;
var
gson
=
getSkinDataByName
(
skinName
,
child
);
if
(
gson
)
return
gson
;
}
return
null
;
}
RES
.
getSkinDataByName
=
getSkinDataByName
;
function
getSrcByUuid
(
resList
,
uuid
)
{
resList
=
resList
||
[];
for
(
var
i
=
0
;
i
<
resList
.
length
;
i
++
)
{
if
(
resList
[
i
].
uuid
==
uuid
)
{
return
resList
[
i
].
url
;
}
}
return
""
;
}
RES
.
getSrcByUuid
=
getSrcByUuid
;
function
getDisplayByData
(
data
)
{
var
dis
;
switch
(
data
.
type
)
{
case
"container"
:
dis
=
new
FYGE
.
Container
();
break
;
case
"button"
:
dis
=
new
FYGE
.
Button
(
getRes
(
data
.
props
.
tUp
),
data
.
props
.
tDown
?
getRes
(
data
.
props
.
tDown
)
:
null
,
data
.
props
.
tDisable
?
getRes
(
data
.
props
.
tDisable
)
:
null
);
break
;
case
"text"
:
dis
=
new
FYGE
.
TextField
();
for
(
var
key
in
data
.
props
)
dis
[
key
]
=
data
.
props
[
key
];
break
;
case
"sprite"
:
dis
=
new
FYGE
.
Sprite
(
getRes
(
data
.
props
.
source
));
break
;
case
"rect"
:
dis
=
new
FYGE
.
Shape
();
dis
.
beginFill
(
FYGE
.
string2hex
(
data
.
props
.
fillColor
));
dis
.
drawRect
(
0
,
0
,
data
.
props
.
width
,
data
.
props
.
height
);
dis
.
endFill
();
break
;
}
dis
.
name
=
data
.
name
;
dis
.
alpha
=
data
.
alpha
||
1
;
dis
.
position
.
set
(
data
.
x
,
data
.
y
);
return
dis
;
}
function
destroyRES
()
{
}
})(
RES
=
exports
.
RES
||
(
exports
.
RES
=
{}));
/***/
}),
/***/
"./module/ctrls/index.ts"
:
/*!*******************************!*\
!*** ./module/ctrls/index.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
function
__export
(
m
)
{
for
(
var
p
in
m
)
if
(
!
exports
.
hasOwnProperty
(
p
))
exports
[
p
]
=
m
[
p
];
}
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
panelCtrl_1
=
__webpack_require__
(
/*! ./panelCtrl */
"./module/ctrls/panelCtrl.ts"
);
var
sceneCtrl_1
=
__webpack_require__
(
/*! ./sceneCtrl */
"./module/ctrls/sceneCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
toastCtrl_2
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
exports
.
showToast
=
toastCtrl_2
.
showToast
;
__export
(
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
));
exports
.
showPanel
=
function
(
panel
,
data
)
{
return
panelCtrl_1
.
default
.
instance
.
show
(
panel
,
data
);
};
exports
.
showConfirm
=
function
(
panel
,
data
)
{
var
confirmPanel
=
panelCtrl_1
.
default
.
instance
.
show
(
panel
,
data
);
return
confirmPanel
.
makePromise
();
};
exports
.
closeAllPanels
=
function
()
{
panelCtrl_1
.
default
.
instance
.
closeAll
();
};
exports
.
closeCurrentPanel
=
function
()
{
panelCtrl_1
.
default
.
instance
.
closeCurrent
();
};
exports
.
changeScene
=
function
(
scene
,
data
)
{
sceneCtrl_1
.
default
.
instance
.
change
(
scene
,
data
);
};
function
getCurrentScene
()
{
return
sceneCtrl_1
.
default
.
instance
.
currentScene
;
}
exports
.
getCurrentScene
=
getCurrentScene
;
exports
.
showAlert
=
function
(
title
,
content
)
{
if
(
my
)
{
my
.
alert
({
title
:
title
||
""
,
content
:
content
||
""
});
}
else
{
console
.
log
(
title
,
content
);
}
};
function
wait
(
callback
,
time
)
{
var
obj
=
{};
FYGE
.
Tween
.
get
(
obj
)
.
wait
(
time
)
.
call
(
callback
);
return
obj
;
}
exports
.
wait
=
wait
;
function
clearWait
(
obj
)
{
obj
&&
FYGE
.
Tween
.
removeTweens
(
obj
);
}
exports
.
clearWait
=
clearWait
;
function
removeTweens
(
obj
,
isRecursive
)
{
if
(
isRecursive
===
void
0
)
{
isRecursive
=
true
;
}
if
(
!
obj
)
return
;
FYGE
.
Tween
.
removeTweens
(
obj
);
if
(
!
isRecursive
||
!
obj
.
children
||
!
obj
.
children
.
length
)
return
;
obj
.
children
.
forEach
(
function
(
child
)
{
removeTweens
(
child
);
});
}
exports
.
removeTweens
=
removeTweens
;
function
destroyAllCtrls
()
{
toastCtrl_1
.
destroyToast
();
waitingCtrl_1
.
destroyWaiting
();
panelCtrl_1
.
default
.
instance
.
destroy
();
sceneCtrl_1
.
default
.
instance
.
destroy
();
}
exports
.
destroyAllCtrls
=
destroyAllCtrls
;
/***/
}),
/***/
"./module/ctrls/panelCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/panelCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
PanelCtrl
=
(
function
()
{
function
PanelCtrl
()
{
this
.
stacks
=
[];
}
Object
.
defineProperty
(
PanelCtrl
,
"instance"
,
{
get
:
function
()
{
return
PanelCtrl
.
_instance
||
(
PanelCtrl
.
_instance
=
new
PanelCtrl
());
},
enumerable
:
true
,
configurable
:
true
});
PanelCtrl
.
prototype
.
init
=
function
(
parent
)
{
this
.
_parent
=
parent
;
var
bg
=
new
FYGE
.
Shape
();
bg
.
beginFill
(
0
);
bg
.
drawRect
(
layers_1
.
layers
.
stageOffsetX
-
parent
.
x
,
layers_1
.
layers
.
stageOffsetY
-
parent
.
y
,
layers_1
.
layers
.
stageWidth
,
layers_1
.
layers
.
stageHeight
);
bg
.
endFill
();
bg
.
hitTestByPixel
=
false
;
bg
.
visible
=
false
;
this
.
_parent
.
addChild
(
bg
);
this
.
_bg
=
bg
;
};
PanelCtrl
.
prototype
.
closeAll
=
function
()
{
this
.
stacks
.
forEach
(
function
(
e
)
{
return
e
.
hidePanel
();
});
};
PanelCtrl
.
prototype
.
show
=
function
(
cls
,
data
)
{
var
_this
=
this
;
waitingCtrl_1
.
showWaiting
();
var
panel
=
new
cls
(
data
);
this
.
add
(
panel
);
this
.
stacks
.
push
(
panel
);
panel
.
onLoaded
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
_this
.
updateView
(
false
);
panel
.
start
(
data
);
if
(
panel
.
visible
)
panel
.
showAni
();
};
panel
.
onLoadError
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
toastCtrl_1
.
showToast
(
"资源加载失败"
);
panel
.
removeEventListener
(
'onDestroy'
,
_this
.
onPanelHide
,
_this
);
_this
.
remove
(
panel
);
};
return
panel
;
};
PanelCtrl
.
prototype
.
updateView
=
function
(
showPanelAni
)
{
var
_this
=
this
;
if
(
showPanelAni
===
void
0
)
{
showPanelAni
=
true
;
}
if
(
!
this
.
stacks
.
length
)
{
if
(
this
.
_bg
.
visible
)
{
this
.
bgAni
=
"hide"
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
FYGE
.
Tween
.
get
(
this
.
_bg
)
.
to
({
alpha
:
0
},
200
,
FYGE
.
Ease
.
cubicOut
)
.
call
(
function
()
{
_this
.
_bg
.
visible
=
false
;
_this
.
_current
=
null
;
_this
.
_parent
.
visible
=
false
;
});
}
}
else
{
this
.
_parent
.
visible
=
true
;
if
(
this
.
bgAni
==
"hide"
)
{
this
.
bgAni
=
"show"
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
this
.
_bg
.
alpha
=
0.7
;
}
if
(
this
.
_bg
.
visible
===
false
)
{
this
.
_bg
.
visible
=
true
;
this
.
_bg
.
alpha
=
0
;
FYGE
.
Tween
.
get
(
this
.
_bg
).
to
({
alpha
:
0.7
},
200
,
FYGE
.
Ease
.
cubicOut
);
}
}
for
(
var
i
=
0
;
i
<
this
.
stacks
.
length
;
i
++
)
{
if
(
i
<
this
.
stacks
.
length
-
1
)
{
this
.
stacks
[
i
].
visible
=
false
;
}
else
{
this
.
stacks
[
i
].
visible
=
true
;
if
(
showPanelAni
)
this
.
stacks
[
i
].
showAni
();
this
.
_current
=
this
.
stacks
[
i
];
}
}
};
PanelCtrl
.
prototype
.
add
=
function
(
panel
)
{
this
.
_parent
.
addChild
(
panel
);
panel
.
addEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
};
PanelCtrl
.
prototype
.
remove
=
function
(
panel
)
{
this
.
_parent
.
removeChild
(
panel
);
this
.
stacks
=
this
.
stacks
.
filter
(
function
(
e
)
{
return
e
!=
panel
;
});
};
PanelCtrl
.
prototype
.
onPanelHide
=
function
(
e
)
{
var
panel
=
e
.
target
;
panel
.
removeEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
this
.
remove
(
panel
);
this
.
updateView
();
};
PanelCtrl
.
prototype
.
closeCurrent
=
function
()
{
if
(
this
.
_current
)
{
this
.
_current
.
hidePanel
();
}
};
PanelCtrl
.
prototype
.
destroy
=
function
()
{
PanelCtrl
.
_instance
=
null
;
this
.
stacks
=
null
;
this
.
_current
=
null
;
this
.
_parent
=
null
;
FYGE
.
Tween
.
removeTweens
(
this
.
_bg
);
this
.
_bg
=
null
;
};
return
PanelCtrl
;
}());
exports
.
default
=
PanelCtrl
;
/***/
}),
/***/
"./module/ctrls/sceneCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/sceneCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
waitingCtrl_1
=
__webpack_require__
(
/*! ./waitingCtrl */
"./module/ctrls/waitingCtrl.ts"
);
var
toastCtrl_1
=
__webpack_require__
(
/*! ./toastCtrl */
"./module/ctrls/toastCtrl.ts"
);
var
SceneCtrl
=
(
function
()
{
function
SceneCtrl
()
{
}
Object
.
defineProperty
(
SceneCtrl
,
"instance"
,
{
get
:
function
()
{
return
SceneCtrl
.
_instance
||
(
SceneCtrl
.
_instance
=
new
SceneCtrl
());
},
enumerable
:
true
,
configurable
:
true
});
SceneCtrl
.
prototype
.
init
=
function
(
parent
)
{
this
.
_parent
=
parent
;
};
SceneCtrl
.
prototype
.
change
=
function
(
cls
,
data
)
{
var
_this
=
this
;
var
scene
=
new
cls
(
data
);
scene
.
visible
=
false
;
waitingCtrl_1
.
showWaiting
();
var
preScene
=
this
.
_currentScene
;
scene
.
onLoaded
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
scene
.
showAni
(
function
()
{
if
(
preScene
)
preScene
.
destroy
();
});
scene
.
visible
=
true
;
scene
.
start
(
data
);
};
scene
.
onLoadError
=
function
()
{
waitingCtrl_1
.
hideWaiting
();
toastCtrl_1
.
showToast
(
"资源加载失败"
);
_this
.
_currentScene
=
preScene
||
null
;
_this
.
_parent
.
removeChild
(
scene
);
};
this
.
_currentScene
=
scene
;
this
.
_parent
.
addChild
(
scene
);
};
Object
.
defineProperty
(
SceneCtrl
.
prototype
,
"currentScene"
,
{
get
:
function
()
{
return
this
.
_currentScene
;
},
enumerable
:
true
,
configurable
:
true
});
SceneCtrl
.
prototype
.
destroy
=
function
()
{
SceneCtrl
.
_instance
=
null
;
this
.
_currentScene
=
null
;
this
.
_parent
=
null
;
};
return
SceneCtrl
;
}());
exports
.
default
=
SceneCtrl
;
/***/
}),
/***/
"./module/ctrls/toastCtrl.ts"
:
/*!***********************************!*\
!*** ./module/ctrls/toastCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
inited
=
false
;
var
_toast
;
var
_parent
;
var
startY
;
var
endY
;
var
initToast
=
function
()
{
if
(
!
inited
)
{
inited
=
true
;
_toast
=
new
Toast
();
_parent
=
layers_1
.
layers
.
toastLayer
;
_toast
.
alpha
=
0
;
_toast
.
x
=
layers_1
.
layers
.
stageOffsetX
-
_parent
.
x
+
(
layers_1
.
layers
.
stageWidth
-
_toast
.
width
)
/
2
;
var
h
=
_toast
.
height
;
var
y
=
layers_1
.
layers
.
stageOffsetY
-
_parent
.
y
;
startY
=
y
-
h
;
endY
=
y
+
(
layers_1
.
layers
.
stageHeight
-
h
)
/
2
;
}
};
exports
.
showToast
=
function
(
msg
)
{
initToast
();
_toast
.
show
(
msg
);
_parent
.
addChild
(
_toast
);
FYGE
.
Tween
.
removeTweens
(
_toast
);
FYGE
.
Tween
.
get
(
_toast
)
.
set
({
y
:
startY
,
alpha
:
1
})
.
to
({
y
:
endY
},
500
,
FYGE
.
Ease
.
quartOut
)
.
wait
(
800
)
.
to
({
alpha
:
0
},
300
)
.
call
(
function
()
{
_parent
.
removeChild
(
_toast
);
});
};
exports
.
destroyToast
=
function
()
{
if
(
inited
&&
_toast
&&
!
_toast
.
destroyed
)
{
_toast
.
destroy
();
_toast
=
null
;
_parent
=
null
;
inited
=
false
;
}
};
var
Toast
=
(
function
(
_super
)
{
__extends
(
Toast
,
_super
);
function
Toast
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
PADDING
=
40
;
_this
.
mouseChildren
=
false
;
_this
.
mouseEnable
=
false
;
var
toastBgTexture
=
RES_1
.
RES
.
getRes
(
"toastBg.png"
);
if
(
toastBgTexture
)
{
_this
.
bg
=
new
FYGE
.
Sprite
(
toastBgTexture
);
_this
.
addChild
(
_this
.
bg
);
}
_this
.
msg
=
new
FYGE
.
TextField
();
_this
.
msg
.
size
=
28
;
_this
.
msg
.
fillColor
=
"0xffffff"
;
_this
.
msg
.
text
=
""
;
_this
.
msg
.
verticalAlign
=
FYGE
.
VERTICAL_ALIGN
.
MIDDLE
;
_this
.
msg
.
textHeight
=
toastBgTexture
?
toastBgTexture
.
height
:
200
;
_this
.
msg
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
_this
.
addChild
(
_this
.
msg
);
return
_this
;
}
Toast
.
prototype
.
show
=
function
(
msg
)
{
this
.
msg
.
text
=
msg
;
this
.
msg
.
x
=
((
this
.
bg
?
this
.
bg
.
width
:
0
)
-
this
.
msg
.
textWidth
)
/
2
;
};
Toast
.
prototype
.
destroy
=
function
()
{
_super
.
prototype
.
destroy
.
call
(
this
);
this
.
msg
=
null
;
this
.
bg
=
null
;
};
return
Toast
;
}(
FYGE
.
Container
));
/***/
}),
/***/
"./module/ctrls/waitingCtrl.ts"
:
/*!*************************************!*\
!*** ./module/ctrls/waitingCtrl.ts ***!
\*************************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
layers_1
=
__webpack_require__
(
/*! ../views/layers */
"./module/views/layers.ts"
);
var
inited
=
false
;
var
_waiting
;
var
_parent
;
var
initWaiting
=
function
()
{
if
(
!
inited
)
{
inited
=
true
;
var
waiting
=
new
Waiting
();
_parent
=
layers_1
.
layers
.
topLayer
;
_waiting
=
waiting
;
var
offX
=
(
layers_1
.
layers
.
stageWidth
-
160
)
/
2
;
var
offY
=
(
layers_1
.
layers
.
stageHeight
-
_waiting
.
height
)
/
2
;
_waiting
.
x
=
layers_1
.
layers
.
stageOffsetX
-
_parent
.
x
+
offX
;
_waiting
.
y
=
layers_1
.
layers
.
stageOffsetY
-
_parent
.
y
+
offY
;
var
bg
=
new
FYGE
.
Graphics
()
.
beginFill
(
0x000000
)
.
drawRect
(
-
offX
,
-
offY
,
layers_1
.
layers
.
stageWidth
,
layers_1
.
layers
.
stageHeight
)
.
endFill
();
bg
.
alpha
=
0
;
_waiting
.
addChildAt
(
bg
,
0
);
}
};
exports
.
showWaiting
=
function
(
msg
)
{
initWaiting
();
_waiting
.
show
(
msg
);
_parent
.
addChild
(
_waiting
);
};
exports
.
hideWaiting
=
function
()
{
_parent
.
removeChild
(
_waiting
);
};
exports
.
destroyWaiting
=
function
()
{
if
(
inited
&&
_waiting
&&
!
_waiting
.
destroyed
)
{
_waiting
.
destroy
();
_waiting
=
null
;
_parent
=
null
;
inited
=
false
;
}
};
var
Waiting
=
(
function
(
_super
)
{
__extends
(
Waiting
,
_super
);
function
Waiting
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
rectBgTexture
=
RES_1
.
RES
.
getRes
(
"waitingBg.png"
);
if
(
rectBgTexture
)
{
var
rectBg
=
new
FYGE
.
Sprite
(
rectBgTexture
);
_this
.
addChild
(
rectBg
);
var
rotTexture
=
RES_1
.
RES
.
getRes
(
"waitingRot.png"
);
var
rot_1
=
new
FYGE
.
Sprite
(
rotTexture
);
rot_1
.
x
=
(
rectBgTexture
.
width
-
rotTexture
.
width
)
/
2
;
rot_1
.
y
=
47
;
rot_1
.
anchorX
=
rotTexture
.
width
/
2
;
rot_1
.
anchorY
=
rotTexture
.
height
/
2
;
_this
.
addChild
(
rot_1
);
var
count_1
=
0
;
rot_1
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
function
()
{
count_1
++
;
if
(
count_1
%
30
==
0
)
rot_1
.
rotation
+=
45
;
},
_this
);
}
_this
.
msg
=
new
FYGE
.
TextField
();
_this
.
msg
.
y
=
125
;
_this
.
msg
.
textWidth
=
rectBgTexture
?
rectBgTexture
.
width
:
200
;
_this
.
msg
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
_this
.
msg
.
size
=
26
;
_this
.
msg
.
fillColor
=
"#ffffff"
;
_this
.
addChild
(
_this
.
msg
);
return
_this
;
}
Waiting
.
prototype
.
show
=
function
(
msg
)
{
if
(
msg
===
void
0
)
{
msg
=
"加载中"
;
}
this
.
msg
.
text
=
msg
;
};
Waiting
.
prototype
.
destroy
=
function
()
{
_super
.
prototype
.
destroy
.
call
(
this
);
this
.
msg
=
null
;
};
return
Waiting
;
}(
FYGE
.
Container
));
/***/
}),
/***/
"./module/views/Module.ts"
:
/*!********************************!*\
!*** ./module/views/Module.ts ***!
\********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../RES */
"./module/RES.ts"
);
var
ctrls_1
=
__webpack_require__
(
/*! ../ctrls */
"./module/ctrls/index.ts"
);
var
Module
=
(
function
(
_super
)
{
__extends
(
Module
,
_super
);
function
Module
(
data
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
data
=
data
;
_this
.
init
();
return
_this
;
}
Module
.
prototype
.
init
=
function
()
{
var
_this
=
this
;
this
.
preLoadRes
().
then
(
function
()
{
if
(
_this
.
skinName
)
RES_1
.
RES
.
initSkinDisplay
(
_this
,
_this
.
skinName
,
_this
);
_this
.
initUi
();
_this
.
onLoaded
&&
_this
.
onLoaded
();
},
function
()
{
_this
.
onLoadError
&&
_this
.
onLoadError
();
});
};
Module
.
prototype
.
preLoadRes
=
function
()
{
var
_this
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
_this
.
groupNames
&&
_this
.
groupNames
.
length
)
{
var
arr
=
[];
for
(
var
i
=
0
;
i
<
_this
.
groupNames
.
length
;
i
++
)
{
arr
.
push
(
RES_1
.
RES
.
loadGroup
(
_this
.
groupNames
[
i
]));
}
Promise
.
all
(
arr
).
then
(
resolve
,
reject
);
}
else
{
resolve
();
}
});
};
Module
.
prototype
.
initUi
=
function
()
{
};
Object
.
defineProperty
(
Module
.
prototype
,
"groupNames"
,
{
get
:
function
()
{
return
null
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Module
.
prototype
,
"skinName"
,
{
get
:
function
()
{
return
null
;
},
enumerable
:
true
,
configurable
:
true
});
;
Module
.
prototype
.
start
=
function
(
data
)
{
this
.
initEvents
();
};
Module
.
prototype
.
initEvents
=
function
()
{
};
Module
.
prototype
.
removeEvents
=
function
()
{
};
Module
.
prototype
.
enableMouseEvt
=
function
(
enable
)
{
this
.
mouseEnable
=
enable
;
this
.
mouseChildren
=
enable
;
};
Module
.
prototype
.
btnDelay
=
function
(
target
,
delay
)
{
if
(
delay
===
void
0
)
{
delay
=
2000
;
}
target
.
mouseEnable
=
false
;
target
.
mouseChildren
=
false
;
setTimeout
(
function
()
{
target
.
mouseEnable
=
true
;
target
.
mouseChildren
=
true
;
},
delay
);
};
Module
.
prototype
.
destroy
=
function
()
{
ctrls_1
.
removeTweens
(
this
);
this
.
removeEvents
();
this
.
dispatchEvent
(
"onDestroy"
);
_super
.
prototype
.
destroy
.
call
(
this
);
};
return
Module
;
}(
FYGE
.
Container
));
exports
.
Module
=
Module
;
/***/
}),
/***/
"./module/views/Scene.ts"
:
/*!*******************************!*\
!*** ./module/views/Scene.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
Module_1
=
__webpack_require__
(
/*! ./Module */
"./module/views/Module.ts"
);
var
Scene
=
(
function
(
_super
)
{
__extends
(
Scene
,
_super
);
function
Scene
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Scene
.
prototype
.
showAni
=
function
(
callback
)
{
callback
();
};
Scene
.
prototype
.
updateScene
=
function
()
{
};
return
Scene
;
}(
Module_1
.
Module
));
exports
.
Scene
=
Scene
;
/***/
}),
/***/
"./module/views/layers.ts"
:
/*!********************************!*\
!*** ./module/views/layers.ts ***!
\********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
panelCtrl_1
=
__webpack_require__
(
/*! ../ctrls/panelCtrl */
"./module/ctrls/panelCtrl.ts"
);
var
sceneCtrl_1
=
__webpack_require__
(
/*! ../ctrls/sceneCtrl */
"./module/ctrls/sceneCtrl.ts"
);
var
Layers
=
(
function
(
_super
)
{
__extends
(
Layers
,
_super
);
function
Layers
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Layers
.
prototype
.
init
=
function
(
stage
)
{
stage
.
addChild
(
this
);
var
arr
=
[
"_bottomLayer"
,
"_sceneLayer"
,
"_popupLayer"
,
"_toastLayer"
,
"_topLayer"
,
"_shareLayer"
];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
this
[
arr
[
i
]]
=
new
FYGE
.
Container
();
this
.
addChild
(
this
[
arr
[
i
]]);
}
this
.
sceneLayer
.
y
=
this
.
stageOffsetY
;
this
.
shareLayer
.
y
=
-
this
.
stageOffsetY
;
sceneCtrl_1
.
default
.
instance
.
init
(
this
.
sceneLayer
);
panelCtrl_1
.
default
.
instance
.
init
(
this
.
popupLayer
);
};
Object
.
defineProperty
(
Layers
.
prototype
,
"bottomLayer"
,
{
get
:
function
()
{
return
this
.
_bottomLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"sceneLayer"
,
{
get
:
function
()
{
return
this
.
_sceneLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"popupLayer"
,
{
get
:
function
()
{
return
this
.
_popupLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"toastLayer"
,
{
get
:
function
()
{
return
this
.
_toastLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"topLayer"
,
{
get
:
function
()
{
return
this
.
_topLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"shareLayer"
,
{
get
:
function
()
{
return
this
.
_shareLayer
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageHeight"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
height
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageWidth"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
width
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageOffsetX"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
x
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Layers
.
prototype
,
"stageOffsetY"
,
{
get
:
function
()
{
if
(
!
this
.
stage
)
return
0
;
return
this
.
stage
.
viewRect
.
y
;
},
enumerable
:
true
,
configurable
:
true
});
return
Layers
;
}(
FYGE
.
Container
));
exports
.
layers
=
new
Layers
();
function
destroyLayers
()
{
exports
.
layers
.
removeChildren
();
if
(
exports
.
layers
.
parent
)
exports
.
layers
.
parent
.
removeChild
(
exports
.
layers
);
}
exports
.
destroyLayers
=
destroyLayers
;
/***/
}),
/***/
"./resCanvasList.js"
:
/*!**************************!*\
!*** ./resCanvasList.js ***!
\**************************/
/*! exports provided: default */
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
__webpack_require__
.
r
(
__webpack_exports__
);
const
resCanvasList
=
{
'4ee17a9c-5deb-43be-b205-16fb7593d172'
:
{
name
:
'spark'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png'
,
uuid
:
'4ee17a9c-5deb-43be-b205-16fb7593d172'
}
};
/* harmony default export */
__webpack_exports__
[
"default"
]
=
(
resCanvasList
);
// const resList = {
// '4ee17a9c-5deb-43be-b205-16fb7593d172': {
// name: 'spark',
// ext: '.png',
// url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
// uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
// }
// };
// export default resList;
/***/
}),
/***/
"./src/Main.ts"
:
/*!*********************!*\
!*** ./src/Main.ts ***!
\*********************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
var
__awaiter
=
(
this
&&
this
.
__awaiter
)
||
function
(
thisArg
,
_arguments
,
P
,
generator
)
{
return
new
(
P
||
(
P
=
Promise
))(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
step
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
"throw"
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
result
.
done
?
resolve
(
result
.
value
)
:
new
P
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
step
((
generator
=
generator
.
apply
(
thisArg
,
_arguments
||
[])).
next
());
});
};
var
__generator
=
(
this
&&
this
.
__generator
)
||
function
(
thisArg
,
body
)
{
var
_
=
{
label
:
0
,
sent
:
function
()
{
if
(
t
[
0
]
&
1
)
throw
t
[
1
];
return
t
[
1
];
},
trys
:
[],
ops
:
[]
},
f
,
y
,
t
,
g
;
return
g
=
{
next
:
verb
(
0
),
"throw"
:
verb
(
1
),
"return"
:
verb
(
2
)
},
typeof
Symbol
===
"function"
&&
(
g
[
Symbol
.
iterator
]
=
function
()
{
return
this
;
}),
g
;
function
verb
(
n
)
{
return
function
(
v
)
{
return
step
([
n
,
v
]);
};
}
function
step
(
op
)
{
if
(
f
)
throw
new
TypeError
(
"Generator is already executing."
);
while
(
_
)
try
{
if
(
f
=
1
,
y
&&
(
t
=
op
[
0
]
&
2
?
y
[
"return"
]
:
op
[
0
]
?
y
[
"throw"
]
||
((
t
=
y
[
"return"
])
&&
t
.
call
(
y
),
0
)
:
y
.
next
)
&&
!
(
t
=
t
.
call
(
y
,
op
[
1
])).
done
)
return
t
;
if
(
y
=
0
,
t
)
op
=
[
op
[
0
]
&
2
,
t
.
value
];
switch
(
op
[
0
])
{
case
0
:
case
1
:
t
=
op
;
break
;
case
4
:
_
.
label
++
;
return
{
value
:
op
[
1
],
done
:
false
};
case
5
:
_
.
label
++
;
y
=
op
[
1
];
op
=
[
0
];
continue
;
case
7
:
op
=
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
default
:
if
(
!
(
t
=
_
.
trys
,
t
=
t
.
length
>
0
&&
t
[
t
.
length
-
1
])
&&
(
op
[
0
]
===
6
||
op
[
0
]
===
2
))
{
_
=
0
;
continue
;
}
if
(
op
[
0
]
===
3
&&
(
!
t
||
(
op
[
1
]
>
t
[
0
]
&&
op
[
1
]
<
t
[
3
])))
{
_
.
label
=
op
[
1
];
break
;
}
if
(
op
[
0
]
===
6
&&
_
.
label
<
t
[
1
])
{
_
.
label
=
t
[
1
];
t
=
op
;
break
;
}
if
(
t
&&
_
.
label
<
t
[
2
])
{
_
.
label
=
t
[
2
];
_
.
ops
.
push
(
op
);
break
;
}
if
(
t
[
2
])
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
}
op
=
body
.
call
(
thisArg
,
_
);
}
catch
(
e
)
{
op
=
[
6
,
e
];
y
=
0
;
}
finally
{
f
=
t
=
0
;
}
if
(
op
[
0
]
&
5
)
throw
op
[
1
];
return
{
value
:
op
[
0
]
?
op
[
1
]
:
void
0
,
done
:
true
};
}
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../module/RES */
"./module/RES.ts"
);
var
layers_1
=
__webpack_require__
(
/*! ../module/views/layers */
"./module/views/layers.ts"
);
var
G_EVENT_1
=
__webpack_require__
(
/*! ./common/G_EVENT */
"./src/common/G_EVENT.ts"
);
var
ctrls_1
=
__webpack_require__
(
/*! ../module/ctrls */
"./module/ctrls/index.ts"
);
var
StartScene_1
=
__webpack_require__
(
/*! ./scenes/StartScene */
"./src/scenes/StartScene.ts"
);
var
TaoBaoNet_1
=
__webpack_require__
(
/*! ./TaoBaoNet */
"./src/TaoBaoNet.ts"
);
var
resCanvasList_1
=
__webpack_require__
(
/*! ../resCanvasList */
"./resCanvasList.js"
);
exports
.
GDispatcher
=
new
FYGE
.
EventDispatcher
();
var
Main
=
(
function
()
{
function
Main
(
canvas
)
{
var
sysInfo
;
if
(
my
)
{
FYGE
.
initedByCanvas
(
canvas
);
sysInfo
=
my
.
getSystemInfoSync
();
}
var
stage
=
new
FYGE
.
Stage
(
canvas
,
750
,
1624
,
sysInfo
&&
sysInfo
.
windowWidth
||
document
.
body
.
clientWidth
,
sysInfo
&&
sysInfo
.
windowHeight
||
document
.
body
.
clientHeight
,
FYGE
.
RENDERER_TYPE
.
CANVAS
);
this
.
stage
=
stage
;
stage
.
addEventListener
(
FYGE
.
Event
.
INIT_STAGE
,
this
.
onAddToStage
,
this
);
var
self
=
this
;
loop
();
function
loop
()
{
if
(
!
self
.
_pause
)
{
FYGE
.
Tween
.
flush
();
stage
.
flush
();
}
self
.
requestID
=
FYGE
.
getRequestAnimationFrame
()(
loop
);
}
}
Main
.
prototype
.
onAddToStage
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
layers_1
.
layers
.
init
(
this
.
stage
);
console
.
log
(
"初始化层级完成"
);
return
[
4
,
RES_1
.
RES
.
loadSparkAssets
(
resCanvasList_1
.
default
)];
case
1
:
_a
.
sent
();
console
.
log
(
"通用资源加载完成"
);
ctrls_1
.
changeScene
(
StartScene_1
.
StartScene
);
return
[
2
];
}
});
});
};
Main
.
prototype
.
run
=
function
()
{
this
.
_pause
=
false
;
exports
.
GDispatcher
.
dispatchEvent
(
G_EVENT_1
.
G_EVENT
.
ON_SHOW
);
};
Main
.
prototype
.
pause
=
function
()
{
exports
.
GDispatcher
.
dispatchEvent
(
G_EVENT_1
.
G_EVENT
.
ON_HIDE
);
};
Main
.
prototype
.
addGlobalEvent
=
function
(
name
,
fun
,
thisObj
,
once
)
{
if
(
once
===
void
0
)
{
once
=
false
;
}
if
(
once
)
{
exports
.
GDispatcher
.
once
(
name
,
fun
,
thisObj
);
}
else
{
exports
.
GDispatcher
.
addEventListener
(
name
,
fun
,
thisObj
);
}
};
Main
.
prototype
.
dispatchGlobalEvent
=
function
(
name
,
data
)
{
exports
.
GDispatcher
.
dispatchEvent
(
name
,
data
);
};
Main
.
prototype
.
removeGlobalEvent
=
function
(
name
,
fun
,
thisObj
)
{
exports
.
GDispatcher
.
removeEventListener
(
name
,
fun
,
thisObj
);
};
Main
.
prototype
.
destroy
=
function
()
{
FYGE
.
Tween
.
removeAllTweens
();
FYGE
.
getCancelAnimationFrame
()(
this
.
requestID
);
layers_1
.
destroyLayers
();
ctrls_1
.
destroyAllCtrls
();
this
.
stage
.
destroy
();
exports
.
GDispatcher
.
removeAllEventListener
();
TaoBaoNet_1
.
destroyNetData
();
};
return
Main
;
}());
exports
.
Main
=
Main
;
/***/
}),
/***/
"./src/TaoBaoNet.ts"
:
/*!**************************!*\
!*** ./src/TaoBaoNet.ts ***!
\**************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
var
__awaiter
=
(
this
&&
this
.
__awaiter
)
||
function
(
thisArg
,
_arguments
,
P
,
generator
)
{
return
new
(
P
||
(
P
=
Promise
))(
function
(
resolve
,
reject
)
{
function
fulfilled
(
value
)
{
try
{
step
(
generator
.
next
(
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
rejected
(
value
)
{
try
{
step
(
generator
[
"throw"
](
value
));
}
catch
(
e
)
{
reject
(
e
);
}
}
function
step
(
result
)
{
result
.
done
?
resolve
(
result
.
value
)
:
new
P
(
function
(
resolve
)
{
resolve
(
result
.
value
);
}).
then
(
fulfilled
,
rejected
);
}
step
((
generator
=
generator
.
apply
(
thisArg
,
_arguments
||
[])).
next
());
});
};
var
__generator
=
(
this
&&
this
.
__generator
)
||
function
(
thisArg
,
body
)
{
var
_
=
{
label
:
0
,
sent
:
function
()
{
if
(
t
[
0
]
&
1
)
throw
t
[
1
];
return
t
[
1
];
},
trys
:
[],
ops
:
[]
},
f
,
y
,
t
,
g
;
return
g
=
{
next
:
verb
(
0
),
"throw"
:
verb
(
1
),
"return"
:
verb
(
2
)
},
typeof
Symbol
===
"function"
&&
(
g
[
Symbol
.
iterator
]
=
function
()
{
return
this
;
}),
g
;
function
verb
(
n
)
{
return
function
(
v
)
{
return
step
([
n
,
v
]);
};
}
function
step
(
op
)
{
if
(
f
)
throw
new
TypeError
(
"Generator is already executing."
);
while
(
_
)
try
{
if
(
f
=
1
,
y
&&
(
t
=
op
[
0
]
&
2
?
y
[
"return"
]
:
op
[
0
]
?
y
[
"throw"
]
||
((
t
=
y
[
"return"
])
&&
t
.
call
(
y
),
0
)
:
y
.
next
)
&&
!
(
t
=
t
.
call
(
y
,
op
[
1
])).
done
)
return
t
;
if
(
y
=
0
,
t
)
op
=
[
op
[
0
]
&
2
,
t
.
value
];
switch
(
op
[
0
])
{
case
0
:
case
1
:
t
=
op
;
break
;
case
4
:
_
.
label
++
;
return
{
value
:
op
[
1
],
done
:
false
};
case
5
:
_
.
label
++
;
y
=
op
[
1
];
op
=
[
0
];
continue
;
case
7
:
op
=
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
default
:
if
(
!
(
t
=
_
.
trys
,
t
=
t
.
length
>
0
&&
t
[
t
.
length
-
1
])
&&
(
op
[
0
]
===
6
||
op
[
0
]
===
2
))
{
_
=
0
;
continue
;
}
if
(
op
[
0
]
===
3
&&
(
!
t
||
(
op
[
1
]
>
t
[
0
]
&&
op
[
1
]
<
t
[
3
])))
{
_
.
label
=
op
[
1
];
break
;
}
if
(
op
[
0
]
===
6
&&
_
.
label
<
t
[
1
])
{
_
.
label
=
t
[
1
];
t
=
op
;
break
;
}
if
(
t
&&
_
.
label
<
t
[
2
])
{
_
.
label
=
t
[
2
];
_
.
ops
.
push
(
op
);
break
;
}
if
(
t
[
2
])
_
.
ops
.
pop
();
_
.
trys
.
pop
();
continue
;
}
op
=
body
.
call
(
thisArg
,
_
);
}
catch
(
e
)
{
op
=
[
6
,
e
];
y
=
0
;
}
finally
{
f
=
t
=
0
;
}
if
(
op
[
0
]
&
5
)
throw
op
[
1
];
return
{
value
:
op
[
0
]
?
op
[
1
]
:
void
0
,
done
:
true
};
}
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
ctrls_1
=
__webpack_require__
(
/*! ../module/ctrls */
"./module/ctrls/index.ts"
);
var
Main_1
=
__webpack_require__
(
/*! ./Main */
"./src/Main.ts"
);
var
TbNetName
;
(
function
(
TbNetName
)
{
TbNetName
[
"trackingReport"
]
=
"squirrelsAdoptRest2c.trackingReport"
;
TbNetName
[
"getIndex"
]
=
"babycare.getIndex"
;
TbNetName
[
"getActivityBaseInfoById"
]
=
"babycare.getActivityBaseInfoById"
;
TbNetName
[
"getGameInfo"
]
=
"babycare.getGameInfo"
;
TbNetName
[
"consumerTools"
]
=
"babycare.consumerTools"
;
TbNetName
[
"gameOver"
]
=
"babycare.gameOver"
;
TbNetName
[
"receiveTaskRewards"
]
=
"babycare.receiveTaskRewards"
;
TbNetName
[
"exchange"
]
=
"babycare.exchange"
;
TbNetName
[
"getPrizesByLevel"
]
=
"babycare.getPrizesByLevel"
;
TbNetName
[
"queryCredits"
]
=
"babycare.queryCredits"
;
TbNetName
[
"dojoin"
]
=
"babycare.dojoin"
;
TbNetName
[
"completeTask"
]
=
"babycare.completeTask"
;
TbNetName
[
"getTaskList"
]
=
"babycare.getTaskList"
;
TbNetName
[
"authorize"
]
=
"mine.authorize"
;
TbNetName
[
"favorShop"
]
=
"mine.favorShop"
;
TbNetName
[
"getUserAddress"
]
=
"mine.getUserAddress"
;
TbNetName
[
"getAdoptName"
]
=
"mine.getAdoptName"
;
TbNetName
[
"getAppData"
]
=
"mine.getAppData"
;
TbNetName
[
"navigateToOutside"
]
=
"mine.navigateToOutside"
;
TbNetName
[
"navigateTo"
]
=
"mine.navigateTo"
;
TbNetName
[
"navigateBack"
]
=
"mine.navigateBack"
;
TbNetName
[
"showSharePanel"
]
=
"mine.showSharePanel"
;
TbNetName
[
"openDetail"
]
=
"mine.openDetail"
;
TbNetName
[
"reportAnalytics"
]
=
"mine.reportAnalytics"
;
})(
TbNetName
=
exports
.
TbNetName
||
(
exports
.
TbNetName
=
{}));
var
dataRecord
=
{};
var
fc
;
function
sendTbNet
(
netName
,
parameter
,
callback
,
hideMsg
)
{
if
(
hideMsg
===
void
0
)
{
hideMsg
=
false
;
}
return
new
Promise
(
function
(
resolve
,
reject
)
{
var
waitObj
;
if
(
!
my
)
{
var
url
=
"../../mock/miniTb/"
+
netName
+
".json"
;
fetchAsync
(
url
)
.
then
(
function
(
data
)
{
dataRecord
[
netName
]
=
data
;
if
(
!
hideMsg
&&
!
data
.
success
)
ctrls_1
.
showToast
(
data
.
message
||
"网络异常"
);
callback
&&
callback
(
data
.
success
,
data
);
resolve
(
data
);
console
.
log
(
"
\n
%c[ mock ]
\n
"
+
(
"NAME : "
+
netName
+
"
\n
"
)
+
"STATE : %o
\n
"
+
"PARAM : %o
\n
"
+
"%cDATA : %o
\n
"
,
""
+
(
data
.
success
?
'color:green'
:
'color:red'
),
data
.
success
,
parameter
,
""
+
(
data
.
success
?
'color:green'
:
'color:red'
),
data
);
},
function
()
{
});
return
;
}
var
fun
=
function
(
e
)
{
ctrls_1
.
clearWait
(
waitObj
);
Main_1
.
GDispatcher
.
removeEventListener
(
netName
,
fun
);
var
d
=
e
.
data
;
dataRecord
[
netName
]
=
d
;
if
(
!
hideMsg
&&
!
d
.
success
)
ctrls_1
.
showToast
(
d
.
message
||
"网络超时"
);
callback
&&
callback
(
d
.
success
,
d
);
resolve
(
d
);
console
.
log
(
"
\n
%c[ request ]
\n
"
+
(
"NAME : "
+
netName
+
"
\n
"
)
+
"STATE : %o
\n
"
+
"PARAM : %o
\n
"
+
"%cDATA : %o
\n
"
,
""
+
(
d
.
success
?
'color:green'
:
'color:red'
),
d
.
success
,
parameter
,
""
+
(
d
.
success
?
'color:green'
:
'color:red'
),
d
);
};
Main_1
.
GDispatcher
.
addEventListener
(
netName
,
fun
);
waitObj
=
ctrls_1
.
wait
(
function
()
{
if
(
netName
!=
TbNetName
.
favorShop
&&
netName
!=
TbNetName
.
getUserAddress
&&
netName
!=
TbNetName
.
authorize
&&
netName
!=
TbNetName
.
getAdoptName
&&
netName
!=
TbNetName
.
trackingReport
&&
netName
!=
TbNetName
.
reportAnalytics
)
{
fun
({
type
:
netName
,
data
:
{
success
:
false
}
});
}
},
10000
);
Main_1
.
GDispatcher
.
dispatchEvent
({
type
:
"onMessage"
},
{
netName
:
netName
,
parameter
:
parameter
});
});
}
exports
.
sendTbNet
=
sendTbNet
;
function
getTbData
(
netName
)
{
return
dataRecord
[
netName
]
||
null
;
}
exports
.
getTbData
=
getTbData
;
function
destroyNetData
()
{
dataRecord
=
{};
}
exports
.
destroyNetData
=
destroyNetData
;
function
fetchAsync
(
url
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
response
,
data
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
return
[
4
,
fetch
(
url
)];
case
1
:
response
=
_a
.
sent
();
return
[
4
,
response
.
json
()];
case
2
:
data
=
_a
.
sent
();
return
[
2
,
data
];
}
});
});
}
var
codeMsg
=
{
"210001"
:
"服务器异常"
,
"210002"
:
"用户不存在"
,
"210003"
:
"邀请已达上限"
,
"210004"
:
"无法邀请自己"
,
"210006"
:
"该活动ID无效"
,
"210009"
:
"该活动暂未开始"
,
"210010"
:
"该分享ID不存在"
,
"210012"
:
"该用户暂未获奖"
,
"210013"
:
"领取失败"
,
"210015"
:
"该活动已删除"
,
"210016"
:
"该活动已经结束"
,
"210017"
:
"该奖品已达领取上线"
,
"210018"
:
"请先分享好友"
,
"210019"
:
"暂有奖品未领取"
,
"210020"
:
"暂有奖品未完成"
,
"210021"
:
"请先玩一局游戏"
,
"210022"
:
"请先选择奖品"
,
"210023"
:
"领取失败,库存不足"
,
"210024"
:
"请先成为会员"
,
"210025"
:
"奖品已经过期"
,
"210026"
:
"不能重复助力"
,
"210028"
:
"请至我的奖品页重新领取"
,
};
/***/
}),
/***/
"./src/common/G_EVENT.ts"
:
/*!*******************************!*\
!*** ./src/common/G_EVENT.ts ***!
\*******************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
G_EVENT
;
(
function
(
G_EVENT
)
{
G_EVENT
[
"ON_SHOW"
]
=
"onShow"
;
G_EVENT
[
"ON_HIDE"
]
=
"onHide"
;
G_EVENT
[
"UPDATE_TASK"
]
=
"UpdateTask"
;
})(
G_EVENT
=
exports
.
G_EVENT
||
(
exports
.
G_EVENT
=
{}));
/***/
}),
/***/
"./src/scenes/Root.ts"
:
/*!****************************!*\
!*** ./src/scenes/Root.ts ***!
\****************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
RES_1
=
__webpack_require__
(
/*! ../../module/RES */
"./module/RES.ts"
);
var
resCanvasList_1
=
__webpack_require__
(
/*! ../../resCanvasList */
"./resCanvasList.js"
);
var
Root
=
(
function
(
_super
)
{
__extends
(
Root
,
_super
);
function
Root
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
bg
=
new
FYGE
.
Sprite
();
bg
.
x
=
0
;
bg
.
y
=
0
;
bg
.
texture
=
RES_1
.
RES
.
getRes
(
resCanvasList_1
.
default
[
"4ee17a9c-5deb-43be-b205-16fb7593d172"
].
url
);
_this
.
addChild
(
bg
);
return
_this
;
}
return
Root
;
}(
FYGE
.
Container
));
exports
.
default
=
Root
;
/***/
}),
/***/
"./src/scenes/StartScene.ts"
:
/*!**********************************!*\
!*** ./src/scenes/StartScene.ts ***!
\**********************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
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
__
());
};
})();
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
Scene_1
=
__webpack_require__
(
/*! ../../module/views/Scene */
"./module/views/Scene.ts"
);
var
Root_1
=
__webpack_require__
(
/*! ./Root */
"./src/scenes/Root.ts"
);
var
StartScene
=
(
function
(
_super
)
{
__extends
(
StartScene
,
_super
);
function
StartScene
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
StartScene
.
prototype
.
initUi
=
function
()
{
_super
.
prototype
.
initUi
.
call
(
this
);
var
canvas
=
new
FYGE
.
Container
();
canvas
.
position
.
set
(
0
,
0
);
this
.
addChild
(
canvas
);
};
StartScene
.
prototype
.
start
=
function
()
{
this
.
addChild
(
new
Root_1
.
default
());
};
return
StartScene
;
}(
Scene_1
.
Scene
));
exports
.
StartScene
=
StartScene
;
/***/
})
/******/
});
});
//# sourceMappingURL=output.js.map
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment