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
bc650908
Commit
bc650908
authored
May 27, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新元素动画
parent
34b7e815
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
73 deletions
+77
-73
MainBase.ts
egret/libs/new_wx/MainBase.ts
+4
-0
default.res.json
egret/resource/default.res.json
+9
-9
TargetItemSkin.exml
egret/resource/skins/TargetItemSkin.exml
+8
-8
MainScene.ts
egret/src/mainScene/MainScene.ts
+11
-11
TargetItemRenderer.ts
egret/src/panels/TargetItemRenderer.ts
+4
-4
getChapter.ts
egret/src/something/chapters/getChapter.ts
+26
-26
ElementTarget.ts
egret/src/something/uis/ElementTarget.ts
+15
-15
No files found.
egret/libs/new_wx/MainBase.ts
View file @
bc650908
...
@@ -322,6 +322,10 @@ export default class MainBase extends eui.UILayer {
...
@@ -322,6 +322,10 @@ export default class MainBase extends eui.UILayer {
RES
.
getResAsync
(
"ele43_png"
);
RES
.
getResAsync
(
"ele43_png"
);
RES
.
getResAsync
(
"ele44_png"
);
RES
.
getResAsync
(
"ele44_png"
);
RES
.
getResAsync
(
"ele45_png"
);
RES
.
getResAsync
(
"ele45_png"
);
RES
.
getResAsync
(
"ele42fn_png"
);
RES
.
getResAsync
(
"ele43fn_png"
);
RES
.
getResAsync
(
"ele44fn_png"
);
RES
.
getResAsync
(
"ele45fn_png"
);
for
(
var
i
=
1
;
i
<=
27
;
i
++
)
{
for
(
var
i
=
1
;
i
<=
27
;
i
++
)
{
RES
.
getResAsync
(
"bonusFra"
+
i
+
"_png"
)
RES
.
getResAsync
(
"bonusFra"
+
i
+
"_png"
)
...
...
egret/resource/default.res.json
View file @
bc650908
This diff is collapsed.
Click to expand it.
egret/resource/skins/TargetItemSkin.exml
View file @
bc650908
...
@@ -20,13 +20,13 @@
...
@@ -20,13 +20,13 @@
<e:Image
id=
"icon34"
width=
"70"
height=
"70"
source=
"startpanel_ele34_png"
/>
<e:Image
id=
"icon34"
width=
"70"
height=
"70"
source=
"startpanel_ele34_png"
/>
<e:Image
id=
"icon36"
width=
"70"
height=
"70"
source=
"startpanel_ele36_png"
/>
<e:Image
id=
"icon36"
width=
"70"
height=
"70"
source=
"startpanel_ele36_png"
/>
<e:Image
id=
"icon41"
width=
"70"
height=
"70"
source=
"ele41_png"
/>
<e:Image
id=
"icon41"
width=
"70"
height=
"70"
source=
"ele41_png"
/>
<e:Image
id=
"icon42"
s
ource=
"ele42_png"
scaleX=
"0.5"
scaleY=
"0.5"
y=
"-3"
x=
"21
"
/>
<e:Image
id=
"icon42"
s
caleX=
"0.45"
scaleY=
"0.45"
y=
"-4"
x=
"25"
source=
"ele42fn_png
"
/>
<e:Image
id=
"icon42_f"
source=
"ele42_png"
scaleX=
"0.5"
scaleY=
"0.5"
y=
"-3"
x=
"21"
/>
<e:Image
id=
"icon43"
s
ource=
"ele43_png"
scaleX=
"0.3"
scaleY=
"0.3"
x=
"1"
y=
"1
"
/>
<e:Image
id=
"icon43"
s
caleX=
"0.3"
scaleY=
"0.3"
x=
"-3"
y=
"-4"
source=
"ele43fn_png
"
/>
<e:Image
id=
"icon43_f"
source=
"ele43_png"
scaleX=
"0.3"
scaleY=
"0.3"
x=
"1"
y=
"1"
/>
<e:Image
id=
"icon44"
s
ource=
"ele44_png"
scaleX=
"0.4"
scaleY=
"0.4"
x=
"5"
y=
"1
"
/>
<e:Image
id=
"icon44"
s
caleX=
"0.4"
scaleY=
"0.4"
x=
"2"
y=
"1"
source=
"ele44fn_png
"
/>
<e:Image
id=
"icon44_f"
source=
"ele44_png"
scaleX=
"0.4"
scaleY=
"0.4"
x=
"5"
y=
"1"
/>
<e:Image
id=
"icon45"
s
ource=
"ele45_png"
scaleX=
"0.3"
scaleY=
"0.3"
y=
"13"
x=
"0
"
/>
<e:Image
id=
"icon45"
s
caleX=
"0.3"
scaleY=
"0.3"
y=
"13"
x=
"-1"
source=
"ele45fn_png
"
/>
<e:Image
id=
"icon45_f"
source=
"ele45_png"
scaleX=
"0.3"
scaleY=
"0.3"
y=
"13"
/>
<e:BitmapLabel
id=
"txt"
text=
"0"
font=
"nums4_fnt"
verticalCenter=
"20.5"
x=
"73.2"
scaleX=
"0.85"
scaleY=
"0.85"
/>
<e:BitmapLabel
id=
"txt"
text=
"0"
font=
"nums4_fnt"
verticalCenter=
"20.5"
x=
"73.2"
scaleX=
"0.85"
scaleY=
"0.85"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/mainScene/MainScene.ts
View file @
bc650908
...
@@ -7237,29 +7237,29 @@ export default class MainScene extends Scene {
...
@@ -7237,29 +7237,29 @@ export default class MainScene extends Scene {
var
sizew
:
number
;
var
sizew
:
number
;
var
sizeh
:
number
;
var
sizeh
:
number
;
if
(
type
==
ElementType
.
food1
){
if
(
type
==
ElementType
.
food1
){
tscale
=
0.5
;
tscale
=
0.
4
5
;
addx
=
2
1
;
addx
=
2
5
;
addy
=
-
3
;
addy
=
-
4
;
sizew
=
9
3
;
sizew
=
9
5
;
sizeh
=
1
59
;
sizeh
=
1
77
;
}
else
if
(
type
==
ElementType
.
food2
){
}
else
if
(
type
==
ElementType
.
food2
){
tscale
=
0.3
;
tscale
=
0.3
;
addx
=
1
;
addx
=
-
3
;
addy
=
1
;
addy
=
-
4
;
sizew
=
249
;
sizew
=
249
;
sizeh
=
2
26
;
sizeh
=
2
55
;
}
else
if
(
type
==
ElementType
.
food3
){
}
else
if
(
type
==
ElementType
.
food3
){
tscale
=
0.4
;
tscale
=
0.4
;
addx
=
5
;
addx
=
2
;
addy
=
1
;
addy
=
1
;
sizew
=
170
;
sizew
=
170
;
sizeh
=
169
;
sizeh
=
169
;
}
else
if
(
type
==
ElementType
.
food4
){
}
else
if
(
type
==
ElementType
.
food4
){
tscale
=
0.3
;
tscale
=
0.3
;
addx
=
0
;
addx
=
-
1
;
addy
=
13
;
addy
=
13
;
sizew
=
248
;
sizew
=
248
;
sizeh
=
1
68
;
sizeh
=
1
70
;
}
}
var
foodsize
=
mainscene
.
getFoodeSize
(
type
);
var
foodsize
=
mainscene
.
getFoodeSize
(
type
);
var
foodwid
=
foodsize
[
0
]
*
tscale
;
//sizew*tscale;
var
foodwid
=
foodsize
[
0
]
*
tscale
;
//sizew*tscale;
...
...
egret/src/panels/TargetItemRenderer.ts
View file @
bc650908
...
@@ -12,10 +12,10 @@ export default class TargetItemRenderer extends eui.ItemRenderer {
...
@@ -12,10 +12,10 @@ export default class TargetItemRenderer extends eui.ItemRenderer {
this
[
'icon'
+
i
].
visible
=
false
;
this
[
'icon'
+
i
].
visible
=
false
;
}
}
//食物特殊处理
//食物特殊处理
this
[
'icon42_f'
].
visible
=
false
;
//
this['icon42_f'].visible = false;
this
[
'icon43_f'
].
visible
=
false
;
//
this['icon43_f'].visible = false;
this
[
'icon44_f'
].
visible
=
false
;
//
this['icon44_f'].visible = false;
this
[
'icon45_f'
].
visible
=
false
;
//
this['icon45_f'].visible = false;
this
[
'icon'
+
this
.
data
.
type
].
visible
=
true
;
this
[
'icon'
+
this
.
data
.
type
].
visible
=
true
;
...
...
egret/src/something/chapters/getChapter.ts
View file @
bc650908
...
@@ -100,31 +100,31 @@ var a = {
...
@@ -100,31 +100,31 @@ var a = {
};
};
// 取数据格式用,一般情况注释
// 取数据格式用,一般情况注释
//
(function exportFile(chapters: ChapterData[]) {
(
function
exportFile
(
chapters
:
ChapterData
[])
{
//
var obj = []
var
obj
=
[]
//
for (var i = 1; i < chapters.length; i++) {
for
(
var
i
=
1
;
i
<
chapters
.
length
;
i
++
)
{
//
var chapter: ChapterData = chapters[i]
var
chapter
:
ChapterData
=
chapters
[
i
]
//
var target: PassTargetData = chapter.passTarget
var
target
:
PassTargetData
=
chapter
.
passTarget
//
var a: any = {};
var
a
:
any
=
{};
//
a["lev"] = i;
a
[
"lev"
]
=
i
;
//
a["tar"] = [];
a
[
"tar"
]
=
[];
//
if (target.type == PassType.SCORE_TARGET) {
if
(
target
.
type
==
PassType
.
SCORE_TARGET
)
{
//
a["tar"].push({ "type": 1, "num": target.score })
a
[
"tar"
].
push
({
"type"
:
1
,
"num"
:
target
.
score
})
//
} else {
}
else
{
//
for (var j = 0; j < target.elements.length; j++) {
for
(
var
j
=
0
;
j
<
target
.
elements
.
length
;
j
++
)
{
//
var element = target.elements[j];
var
element
=
target
.
elements
[
j
];
//
a["tar"].push({ "type": submitTran[element.type], "num": element.count })
a
[
"tar"
].
push
({
"type"
:
submitTran
[
element
.
type
],
"num"
:
element
.
count
})
//
}
}
//
}
}
//
if(!chapter.starScores || chapter.starScores.length <=0)
if
(
!
chapter
.
starScores
||
chapter
.
starScores
.
length
<=
0
)
//
throw new Error('starScores未配置'+i)
throw
new
Error
(
'starScores未配置'
+
i
)
//
a["one"] = chapter.starScores[0];
a
[
"one"
]
=
chapter
.
starScores
[
0
];
//
a["two"] = chapter.starScores[1];
a
[
"two"
]
=
chapter
.
starScores
[
1
];
//
a["three"] = chapter.starScores[2];
a
[
"three"
]
=
chapter
.
starScores
[
2
];
//
obj.push(a)
obj
.
push
(
a
)
//
}
}
//
var file = new File([JSON.stringify(obj)], "cfg.json", { type: "text/plain;charset=utf-8" });
var
file
=
new
File
([
JSON
.
stringify
(
obj
)],
"cfg.json"
,
{
type
:
"text/plain;charset=utf-8"
});
//
window["saveAs"](file);
window
[
"saveAs"
](
file
);
//
})(chapters)
})(
chapters
)
egret/src/something/uis/ElementTarget.ts
View file @
bc650908
...
@@ -73,45 +73,45 @@ export class ElementTarget extends egret.DisplayObjectContainer {
...
@@ -73,45 +73,45 @@ export class ElementTarget extends egret.DisplayObjectContainer {
var
imgx
:
number
;
var
imgx
:
number
;
var
imgy
:
number
;
var
imgy
:
number
;
if
(
type
==
ElementType
.
food1
){
if
(
type
==
ElementType
.
food1
){
texture
=
RES
.
getRes
(
"ele"
+
type
+
"_png"
);
texture
=
RES
.
getRes
(
"ele"
+
type
+
"
fn
_png"
);
showImage
=
new
egret
.
Bitmap
(
texture
);
showImage
=
new
egret
.
Bitmap
(
texture
);
imgwid
=
9
3
;
imgwid
=
9
5
;
imghei
=
1
59
;
imghei
=
1
77
;
imgscale
=
0.5
;
imgscale
=
0.
4
5
;
imgx
=
2
1
;
imgx
=
2
5
;
imgy
=
-
3
;
imgy
=
-
4
;
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
}
else
if
(
type
==
ElementType
.
food2
){
}
else
if
(
type
==
ElementType
.
food2
){
texture
=
RES
.
getRes
(
"ele"
+
type
+
"_png"
);
texture
=
RES
.
getRes
(
"ele"
+
type
+
"
fn
_png"
);
showImage
=
new
egret
.
Bitmap
(
texture
);
showImage
=
new
egret
.
Bitmap
(
texture
);
imgwid
=
249
;
imgwid
=
249
;
imghei
=
2
26
;
imghei
=
2
55
;
imgscale
=
0.3
;
imgscale
=
0.3
;
imgx
=
1
;
imgx
=
-
3
;
imgy
=
1
;
imgy
=
-
4
;
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
}
else
if
(
type
==
ElementType
.
food3
){
}
else
if
(
type
==
ElementType
.
food3
){
texture
=
RES
.
getRes
(
"ele"
+
type
+
"_png"
);
texture
=
RES
.
getRes
(
"ele"
+
type
+
"
fn
_png"
);
showImage
=
new
egret
.
Bitmap
(
texture
);
showImage
=
new
egret
.
Bitmap
(
texture
);
imgwid
=
170
;
imgwid
=
170
;
imghei
=
169
;
imghei
=
169
;
imgscale
=
0.4
;
imgscale
=
0.4
;
imgx
=
5
;
imgx
=
2
;
imgy
=
1
;
imgy
=
1
;
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
}
else
if
(
type
==
ElementType
.
food4
){
}
else
if
(
type
==
ElementType
.
food4
){
texture
=
RES
.
getRes
(
"ele"
+
type
+
"_png"
);
texture
=
RES
.
getRes
(
"ele"
+
type
+
"
fn
_png"
);
showImage
=
new
egret
.
Bitmap
(
texture
);
showImage
=
new
egret
.
Bitmap
(
texture
);
imgwid
=
248
;
imgwid
=
248
;
imghei
=
1
68
;
imghei
=
1
70
;
imgscale
=
0.3
;
imgscale
=
0.3
;
imgx
=
0
;
imgx
=
-
1
;
imgy
=
13
;
imgy
=
13
;
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
this
.
setflyimg
(
texture
,
imgwid
,
imghei
,
imgscale
,
imgx
,
imgy
);
}
else
{
}
else
{
...
...
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