Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
劳工
zeroing-libs
Commits
d92dfed4
Commit
d92dfed4
authored
Jul 15, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消消乐暂存
parent
66c84562
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
30 deletions
+43
-30
xiaoxiaole.json
dist/customs/xiaoxiaole.json
+2
-2
main.js
src/custom/xiaoxiaole/debug/main.js
+18
-9
main.js.map
src/custom/xiaoxiaole/debug/main.js.map
+1
-1
meta.json
src/custom/xiaoxiaole/meta.json
+1
-1
GameView.ts
src/custom/xiaoxiaole/src/game/GameView.ts
+17
-16
MapData.ts
src/custom/xiaoxiaole/src/game/MapData.ts
+1
-1
Element.ts
src/custom/xiaoxiaole/src/game/ele/Element.ts
+3
-0
No files found.
dist/customs/xiaoxiaole.json
View file @
d92dfed4
This diff is collapsed.
Click to expand it.
src/custom/xiaoxiaole/debug/main.js
View file @
d92dfed4
...
...
@@ -81,6 +81,7 @@
this
.
c1y
=
ty
;
this
.
p2x
=
tx
;
this
.
p2y
=
ty
;
engine
.
Tween
.
removeTweens
(
this
);
engine
.
Tween
.
get
(
this
).
to
({
scaleX
:
1.1
,
scaleY
:
1.1
...
...
@@ -95,6 +96,7 @@
y
:
this
.
y
+
20
},
100
)
.
call
(
function
()
{
_this
.
factor
=
0
;
engine
.
Tween
.
get
(
_this
).
to
({
factor
:
1
},
450
)
...
...
@@ -113,6 +115,7 @@
var
ty
=
tpos
[
1
];
var
dis
=
MapData
.
getDistance
([
nx
,
ny
],
tpos
);
var
time
=
Math
.
ceil
(
dis
/
MapData
.
anispeed
*
1000
);
engine
.
Tween
.
removeTweens
(
this
);
var
pro
=
new
Promise
(
function
(
res
)
{
engine
.
Tween
.
get
(
_this
,
{
loop
:
false
}).
to
({
x
:
tx
,
...
...
@@ -127,7 +130,6 @@
};
return
Element
;
}(
engine
.
Container
));
//# sourceMappingURL=Element.js.map
var
ElementType
;
(
function
(
ElementType
)
{
...
...
@@ -265,7 +267,7 @@
MapData
.
posData
=
{};
MapData
.
eleidx
=
1
;
MapData
.
elePool
=
{};
MapData
.
anispeed
=
86
0
;
MapData
.
anispeed
=
100
0
;
return
MapData
;
}());
//# sourceMappingURL=MapData.js.map
...
...
@@ -278,8 +280,8 @@
_this
.
eliminateArr
=
[];
_this
.
selectArr
=
[];
_this
.
conty
=
140
;
_this
.
homex
=
5
28
;
_this
.
homey
=
-
4
0
;
_this
.
homex
=
5
62
;
_this
.
homey
=
-
2
0
;
_this
.
ination
=
false
;
_this
.
canation
=
true
;
_this
.
once
(
engine
.
Event
.
ADDED_TO_STAGE
,
_this
.
setup
,
_this
);
...
...
@@ -294,8 +296,9 @@
this
.
homeimg
=
createSvga
(
"房子动画"
);
this
.
addChild
(
this
.
homeimg
);
this
.
homeimg
.
x
=
this
.
homex
;
this
.
homeimg
.
y
=
-
40
;
this
.
homeimg
.
y
=
this
.
homey
;
this
.
homeimg
.
stop
();
console
.
log
(
"房子动画"
,
this
.
homeimg
);
this
.
container
=
new
engine
.
Container
();
this
.
addChild
(
this
.
container
);
this
.
container
.
y
=
this
.
conty
;
...
...
@@ -321,8 +324,8 @@
MapData
.
posData
[
r
+
"_"
+
c
]
=
rcpos
;
}
}
this
.
tanix
=
this
.
homex
+
146
/
2
-
MapData
.
itemsize
/
3
;
this
.
taniy
=
this
.
homey
+
120
/
2
;
this
.
tanix
=
this
.
homex
+
30
;
this
.
taniy
=
this
.
homey
;
engine
.
globalEvent
.
addEventListener
(
GameEvent
.
SelectEle
,
this
.
selectele
,
this
);
this
.
removeEventListener
(
engine
.
Event
.
ADDED_TO_STAGE
,
this
.
setup
,
this
);
this
.
lastframeTime
=
Date
.
now
();
...
...
@@ -465,6 +468,8 @@
var
snode2x
=
snode2
.
x
;
var
snode2y
=
snode2
.
y
;
var
changetime
=
Math
.
ceil
((
MapData
.
itemsize
/
MapData
.
anispeed
)
*
2
*
1000
);
engine
.
Tween
.
removeTweens
(
snode1
);
engine
.
Tween
.
removeTweens
(
snode2
);
if
(
this
.
eliminateArr
.
length
>
0
)
{
engine
.
Tween
.
get
(
snode1
).
to
({
x
:
snode2x
,
...
...
@@ -538,11 +543,11 @@
return
[
4
,
new
Promise
(
function
(
res1
)
{
setTimeout
(
function
()
{
res1
();
},
4
00
);
},
5
00
);
})];
case
2
:
_a
.
sent
();
this
.
homeimg
.
play
();
this
.
homeimg
.
play
(
1
,
1
);
return
[
2
];
}
});
...
...
@@ -597,6 +602,7 @@
var
nepos
=
[
frcnode
.
x
,
frcnode
.
y
];
var
fdis
=
MapData
.
getDistance
(
ftpos
,
nepos
);
var
ftime
=
Math
.
ceil
((
fdis
/
MapData
.
anispeed
)
*
1000
);
engine
.
Tween
.
removeTweens
(
frcnode
);
var
ifallpromise
=
new
Promise
(
function
(
res
)
{
engine
.
Tween
.
get
(
frcnode
)
.
to
({
...
...
@@ -682,6 +688,8 @@
var
lerpnum
=
0.1
;
var
atpos1
=
[(
atx2
-
atx1
)
*
lerpnum
+
atx1
,
(
aty2
-
aty1
)
*
lerpnum
+
aty1
];
var
atpos2
=
[(
atx1
-
atx2
)
*
lerpnum
+
atx2
,
(
aty1
-
aty2
)
*
lerpnum
+
aty2
];
engine
.
Tween
.
removeTweens
(
atnode1
);
engine
.
Tween
.
removeTweens
(
atnode2
);
engine
.
Tween
.
get
(
atnode1
,
{
loop
:
true
}).
to
({
...
...
@@ -1063,6 +1071,7 @@
};
return
GameView
;
}(
engine
.
Container
));
//# sourceMappingURL=GameView.js.map
var
GameWrapper
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameWrapper
,
_super
);
...
...
src/custom/xiaoxiaole/debug/main.js.map
View file @
d92dfed4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/custom/xiaoxiaole/meta.json
View file @
d92dfed4
...
...
@@ -55,7 +55,7 @@
},
{
"name"
:
"房子动画"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
f55c640d40911934c7c5cf01f4fc1940ffb4e16c
.svga"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
10d6c3c657e4f26eee2e6f1edca36ec468d57353
.svga"
,
"uuid"
:
"homeani"
,
"ext"
:
".svga"
}
...
...
src/custom/xiaoxiaole/src/game/GameView.ts
View file @
d92dfed4
...
...
@@ -34,8 +34,8 @@ export default class GameView extends engine.Container {
homeimg
;
conty
=
140
;
homex
=
5
28
;
homey
=
-
4
0
;
homex
=
5
62
;
homey
=
-
2
0
;
tanix
;
taniy
;
...
...
@@ -60,9 +60,9 @@ export default class GameView extends engine.Container {
this
.
homeimg
=
createSvga
(
"房子动画"
);
this
.
addChild
(
this
.
homeimg
);
this
.
homeimg
.
x
=
this
.
homex
;
this
.
homeimg
.
y
=
-
40
;
this
.
homeimg
.
y
=
this
.
homey
;
this
.
homeimg
.
stop
();
//
console.log("房子动画",this.homeimg);
console
.
log
(
"房子动画"
,
this
.
homeimg
);
this
.
container
=
new
engine
.
Container
();
this
.
addChild
(
this
.
container
);
...
...
@@ -96,8 +96,8 @@ export default class GameView extends engine.Container {
MapData
.
posData
[
r
+
"_"
+
c
]
=
rcpos
;
}
}
this
.
tanix
=
this
.
homex
+
146
/
2
-
MapData
.
itemsize
/
3
;
this
.
taniy
=
this
.
homey
+
120
/
2
;
// - MapData.itemsize/2;
this
.
tanix
=
this
.
homex
+
30
;
this
.
taniy
=
this
.
homey
;
// - MapData.itemsize/2;
engine
.
globalEvent
.
addEventListener
(
GameEvent
.
SelectEle
,
this
.
selectele
,
this
);
this
.
removeEventListener
(
engine
.
Event
.
ADDED_TO_STAGE
,
this
.
setup
,
this
);
...
...
@@ -267,7 +267,10 @@ export default class GameView extends engine.Container {
let
snode2x
=
snode2
.
x
;
let
snode2y
=
snode2
.
y
;
let
changetime
=
Math
.
ceil
((
MapData
.
itemsize
/
MapData
.
anispeed
)
*
2
*
1000
)
let
changetime
=
Math
.
ceil
((
MapData
.
itemsize
/
MapData
.
anispeed
)
*
2
*
1000
);
engine
.
Tween
.
removeTweens
(
snode1
);
engine
.
Tween
.
removeTweens
(
snode2
);
if
(
this
.
eliminateArr
.
length
>
0
){
engine
.
Tween
.
get
(
snode1
).
to
({
x
:
snode2x
,
...
...
@@ -342,9 +345,9 @@ export default class GameView extends engine.Container {
await
new
Promise
(
res1
=>
{
setTimeout
(
function
(){
res1
();
},
4
00
)
},
5
00
)
})
this
.
homeimg
.
play
(
)
this
.
homeimg
.
play
(
1
,
1
);
}
//掉落
async
fall
(){
...
...
@@ -400,6 +403,8 @@ export default class GameView extends engine.Container {
let
fdis
=
MapData
.
getDistance
(
ftpos
,
nepos
);
let
ftime
=
Math
.
ceil
((
fdis
/
MapData
.
anispeed
)
*
1000
);
engine
.
Tween
.
removeTweens
(
frcnode
);
let
ifallpromise
=
new
Promise
(
res
=>
{
engine
.
Tween
.
get
(
frcnode
)
.
to
({
...
...
@@ -453,13 +458,6 @@ export default class GameView extends engine.Container {
let
anitime
=
Math
.
ceil
((
anidis
/
MapData
.
anispeed
)
*
1000
);
aniele
.
flyToHome
(
this
.
tanix
,
this
.
taniy
,
anitime
);
// engine.Tween.get(aniele)
// .to({
// x:this.tanix,
// y:this.taniy,
// scaleX:0,
// scaleY:0
// },anitime);
}
//修改元素点击
...
...
@@ -496,6 +494,9 @@ export default class GameView extends engine.Container {
let
atpos1
=
[(
atx2
-
atx1
)
*
lerpnum
+
atx1
,(
aty2
-
aty1
)
*
lerpnum
+
aty1
];
let
atpos2
=
[(
atx1
-
atx2
)
*
lerpnum
+
atx2
,(
aty1
-
aty2
)
*
lerpnum
+
aty2
];
engine
.
Tween
.
removeTweens
(
atnode1
);
engine
.
Tween
.
removeTweens
(
atnode2
);
engine
.
Tween
.
get
(
atnode1
,{
loop
:
true
}).
to
({
...
...
src/custom/xiaoxiaole/src/game/MapData.ts
View file @
d92dfed4
...
...
@@ -26,7 +26,7 @@ export default class MapData{
static
eleidx
=
1
;
static
elePool
=
{};
static
anispeed
=
86
0
;
static
anispeed
=
100
0
;
static
btigerTex
:
engine
.
Texture
;
static
gtigerTex
:
engine
.
Texture
;
...
...
src/custom/xiaoxiaole/src/game/ele/Element.ts
View file @
d92dfed4
...
...
@@ -81,6 +81,7 @@ export default class Element extends engine.Container{
this
.
p2x
=
tx
;
this
.
p2y
=
ty
;
engine
.
Tween
.
removeTweens
(
this
);
engine
.
Tween
.
get
(
this
).
to
({
scaleX
:
1.1
,
...
...
@@ -96,6 +97,7 @@ export default class Element extends engine.Container{
y
:
this
.
y
+
20
},
100
)
.
call
(()
=>
{
this
.
factor
=
0
;
engine
.
Tween
.
get
(
this
).
to
({
factor
:
1
},
450
)
...
...
@@ -117,6 +119,7 @@ export default class Element extends engine.Container{
let
dis
=
MapData
.
getDistance
([
nx
,
ny
],
tpos
);
let
time
=
Math
.
ceil
(
dis
/
MapData
.
anispeed
*
1000
);
engine
.
Tween
.
removeTweens
(
this
);
let
pro
=
new
Promise
(
res
=>
{
engine
.
Tween
.
get
(
this
,{
loop
:
false
}).
to
({
x
:
tx
,
...
...
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