Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
xiaoxiaole
Commits
b1e98e06
Commit
b1e98e06
authored
Aug 23, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
e84672cf
1a096253
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
63 deletions
+150
-63
MainBase.ts
egret/libs/new_wx/MainBase.ts
+3
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+58
-24
Chapters.ts
egret/src/something/Chapters.ts
+15
-32
Loading2.ts
egret/src/something/uis/Loading2.ts
+74
-0
PropGuide.ts
egret/src/something/uis/PropGuide.ts
+0
-7
No files found.
egret/libs/new_wx/MainBase.ts
View file @
b1e98e06
...
@@ -32,11 +32,13 @@ import FailedPanel from "../../src/panels/FailedPanel";
...
@@ -32,11 +32,13 @@ import FailedPanel from "../../src/panels/FailedPanel";
import
QuitPanel
from
"../../src/panels/QuitPanel"
;
import
QuitPanel
from
"../../src/panels/QuitPanel"
;
import
BoxPanel
from
"../../src/panels/BoxPanel"
;
import
BoxPanel
from
"../../src/panels/BoxPanel"
;
import
MainScene
from
"../../src/mainScene/MainScene"
;
import
MainScene
from
"../../src/mainScene/MainScene"
;
import
{
Loading2
}
from
"../../src/something/uis/Loading2"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
constructor
()
{
super
();
super
();
Loading
.
instace
.
loadImage
();
Loading
.
instace
.
loadImage
();
Loading2
.
instace
.
loadImage
();
DataManager
.
ins
.
customCfgData
=
window
[
'CFG'
];
DataManager
.
ins
.
customCfgData
=
window
[
'CFG'
];
this
.
getData
();
this
.
getData
();
}
}
...
@@ -103,6 +105,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -103,6 +105,7 @@ export default class MainBase extends eui.UILayer {
layers
.
init
(
this
);
layers
.
init
(
this
);
Loading
.
init
(
layers
.
topLayer
);
Loading
.
init
(
layers
.
topLayer
);
Loading2
.
init
(
layers
.
topLayer
);
Loading
.
instace
.
show
();
Loading
.
instace
.
show
();
PanelCtrl
.
instance
.
init
(
layers
.
popupLayer
);
PanelCtrl
.
instance
.
init
(
layers
.
popupLayer
);
...
...
egret/src/mainScene/MainScene.ts
View file @
b1e98e06
This diff is collapsed.
Click to expand it.
egret/src/something/Chapters.ts
View file @
b1e98e06
...
@@ -9,12 +9,12 @@ export const Chapters: ChapterData[] = [
...
@@ -9,12 +9,12 @@ export const Chapters: ChapterData[] = [
{
{
map
:
{
map
:
{
lattices
:
[
lattices
:
[
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
3
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
5
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
6
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
...
@@ -33,33 +33,16 @@ export const Chapters: ChapterData[] = [
...
@@ -33,33 +33,16 @@ export const Chapters: ChapterData[] = [
]
]
}
}
],
],
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
//
connectedLats: [[27, 45], [28, 46], [29, 47]]
},
},
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.15
,
effectInitProbability
:
0.1
,
stepCount
:
30
,
stepCount
:
50
,
// passTarget: {
// type: PassType.SCORE_TARGET,
// score: 10000,
// },
passTarget
:
{
passTarget
:
{
type
:
PassType
.
ELEMENT_TARGET
,
type
:
PassType
.
SCORE_TARGET
,
elements
:
[
score
:
2000
,
// {
// type: ElementType.ICE,
// count: 100,
// },
{
type
:
ElementType
.
RABBIT
,
count
:
56
,
},
{
type
:
ElementType
.
LOLLIPOP
,
count
:
4
,
}
],
},
},
starScores
:
[
3000
,
5000
,
100
00
]
starScores
:
[
1200
,
1500
,
25
00
]
},
},
//第二关
//第二关
{
{
...
@@ -574,14 +557,14 @@ export const Chapters: ChapterData[] = [
...
@@ -574,14 +557,14 @@ export const Chapters: ChapterData[] = [
generateLats
:
[
0
,
1
,
2
,
4
,
5
,
6
,
7
,
8
],
generateLats
:
[
0
,
1
,
2
,
4
,
5
,
6
,
7
,
8
],
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
connectedLats
:
[[
27
,
45
],
[
28
,
46
],
[
29
,
47
]]
},
},
baseElementTypes
:
[
0
,
1
,
2
,
3
],
baseElementTypes
:
[
0
,
1
,
2
,
4
],
effectInitProbability
:
0.05
,
effectInitProbability
:
0.05
,
stepCount
:
15
,
stepCount
:
15
,
passTarget
:
{
passTarget
:
{
type
:
PassType
.
SCORE_TARGET
,
type
:
PassType
.
SCORE_TARGET
,
score
:
22
000
score
:
18
000
},
},
starScores
:
[
8000
,
1
6000
,
22
000
]
starScores
:
[
8000
,
1
2000
,
18
000
]
},
},
//第二十关
//第二十关
{
{
...
...
egret/src/something/uis/Loading2.ts
0 → 100644
View file @
b1e98e06
export
class
Loading2
extends
egret
.
Sprite
{
private
static
_parent
:
egret
.
Sprite
;
private
static
_instance
:
Loading2
;
private
static
bg
=
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAC0CAYAAAATiCegAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQwIDc5LjE2MDQ1MSwgMjAxNy8wNS8wNi0wMTowODoyMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWR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ZGlkOjJGRDM0MjA2QTc4NDExRTg5QTUzRjU2RkQ3RDBDQzhDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0JDNjIyNjhBNzY0MTFFODlBNTNGNTZGRDdEMENDOEMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MkZEMzQyMDRBNzg0MTFFODlBNTNGNTZGRDdEMENDOEMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4SQhovAAABqUlEQVR42uyavW6EMAzHSQbEgrqxlQWpU5+m6ov0SfoifZxOlVArurFVLIAEbS0ViUbJ5ds57vxbDhhs/xMfJI6zDIllWd6//4BrLL8MyxEI++f4Fwy/PLtwSCAJJIFnLrBt25thGO7h91yCtomJ6QzVdf203Y/j+FKW5WvKzwQIK4ricbvvuu65aZovpxmsqup2fw+GwUGqmRPFyWK0Etj3/af4LJVImThVjFYrGZVh23T1SVGfGLQvGTAAhlLNpO8AG30mQohc1/VDdh07exjmaKbwxVI5xvJhvZJRpWue53ehZk9my3UAnZZqMpHzPL+FEijaivEXME6laZoeYrxNY9omCIIgiI19xdkUzMq0b5xM3KcZL2KRKtOq/WTUpdqR4KZ7M9XeDoujxEkQBEFcD0coWTCfAPalvZhlQx/bPEQAQMyyoc8xAQ8hDohZNvQRefGle47l0LbTKdSpFsMaTdfzwejHZ5hpGWMmTwqEJoSU4kxE6jotrJoQUojTiQzahJDslOeESF0TgpZQjUBixQsrJuoXPTokkASSwCsR6NLpFIIfAQYAmaA+/cC+3MAAAAAASUVORK5CYII='
;
getBitmap
(
base64
:
string
,
callback
:
(
bitmap
)
=>
void
):
void
{
const
img
=
new
Image
();
img
[
"avaliable"
]
=
true
;
img
.
src
=
base64
;
img
.
onload
=
()
=>
{
const
texture
=
new
egret
.
Texture
();
const
bitmapdata
=
new
egret
.
BitmapData
(
img
);
texture
.
_setBitmapData
(
bitmapdata
);
callback
(
new
egret
.
Bitmap
(
texture
));
}
}
_bg
:
egret
.
Bitmap
;
_progress
:
egret
.
Bitmap
;
loadImage
()
{
var
bg
:
egret
.
Shape
=
new
egret
.
Shape
();
bg
.
graphics
.
beginFill
(
0x000000
,
0
);
bg
.
graphics
.
drawRect
(
0
,
0
,
750
,
1624
);
bg
.
graphics
.
endFill
();
bg
.
touchEnabled
=
true
;
this
.
addChild
(
bg
);
this
.
getBitmap
(
Loading2
.
bg
,
(
bitmap
:
egret
.
Bitmap
)
=>
{
const
t
=
Date
.
now
()
-
window
[
'__startTime__'
];
console
.
log
(
`首屏loading显示时间:
${
t
}
ms`
);
this
.
_bg
=
bitmap
;
this
.
_bg
.
x
=
295
;
this
.
_bg
.
y
=
288
;
this
.
addChild
(
this
.
_bg
);
})
this
.
getBitmap
(
Loading2
.
progress
,
(
bitmap
:
egret
.
Bitmap
)
=>
{
this
.
_progress
=
bitmap
;
this
.
_progress
.
x
=
375
;
this
.
_progress
.
y
=
380
;
this
.
_progress
.
anchorOffsetX
=
this
.
_progress
.
anchorOffsetY
=
28
;
this
.
addChild
(
this
.
_progress
);
})
}
static
get
instace
():
Loading2
{
return
Loading2
.
_instance
||
(
Loading2
.
_instance
=
new
Loading2
());
}
show
()
{
Loading2
.
_parent
.
addChild
(
this
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
hide
()
{
if
(
this
.
parent
)
Loading2
.
_parent
.
removeChild
(
this
);
this
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
static
init
(
parent
:
egret
.
Sprite
)
{
Loading2
.
_parent
=
parent
;
}
onEnterFrame
()
{
if
(
this
.
_progress
)
this
.
_progress
.
rotation
+=
5
;
}
}
egret/src/something/uis/PropGuide.ts
View file @
b1e98e06
...
@@ -12,7 +12,6 @@ export class PropGuide extends egret.DisplayObjectContainer {
...
@@ -12,7 +12,6 @@ export class PropGuide extends egret.DisplayObjectContainer {
hammerBtn
:
egret
.
Bitmap
;
hammerBtn
:
egret
.
Bitmap
;
stepBtn
:
egret
.
Bitmap
;
stepBtn
:
egret
.
Bitmap
;
msgTxt
:
egret
.
TextField
;
msgTxt
:
egret
.
TextField
;
stepCircle
:
egret
.
Shape
;
constructor
()
{
constructor
()
{
super
()
super
()
this
.
bg
=
new
egret
.
Shape
();
this
.
bg
=
new
egret
.
Shape
();
...
@@ -40,12 +39,6 @@ export class PropGuide extends egret.DisplayObjectContainer {
...
@@ -40,12 +39,6 @@ export class PropGuide extends egret.DisplayObjectContainer {
text
.
width
=
500
;
text
.
width
=
500
;
this
.
addChild
(
text
);
this
.
addChild
(
text
);
this
.
msgTxt
=
text
;
this
.
msgTxt
=
text
;
//步数的圆
this
.
stepCircle
=
new
egret
.
Shape
();
this
.
stepCircle
.
graphics
.
beginFill
(
0xff0000
,
0.5
);
this
.
stepCircle
.
graphics
.
drawCircle
(
123
,
98
,
72
);
this
.
stepCircle
.
graphics
.
endFill
();
this
.
addChild
(
this
.
stepCircle
);
this
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
this
)
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
this
)
},
this
)
},
this
)
...
...
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