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
c8de83bc
Commit
c8de83bc
authored
Nov 08, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
e0ec061f
d9e23f9b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
6 deletions
+116
-6
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+3
-3
Tool.ts
egret/src/something/Tool.ts
+3
-3
RectsWaveAni.ts
egret/src/something/anisCall/RectsWaveAni.ts
+109
-0
No files found.
egret/libs/new_wx/MainBase.ts
View file @
c8de83bc
...
...
@@ -292,6 +292,7 @@ export default class MainBase extends eui.UILayer {
RES
.
getResAsync
(
"lineLight"
+
i
+
"_png"
)
}
var
arr
=
[
"rectLatWhite"
,
"fesRedBigLight"
,
"fesRedBombSta1"
,
"fesRedCap"
,
"fesRedDown"
,
"fesRedSmallLight"
,
"fesRedUp"
,
"xingxingbi"
,
"tinyRedLeft"
,
"tinyRedMid"
,
"tinyRedRight"
,
"festivalTargetBg"
,
...
...
egret/src/mainScene/MainScene.ts
View file @
c8de83bc
...
...
@@ -700,8 +700,8 @@ export default class MainScene extends Scene {
//初始化节日元素
initFestivalEle
():
boolean
{
//添加节日元素,条件可能会变
if
(
getRedBombTimes
()
&&
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
if
(
fesChapterData
.
indexOf
(
this
.
chapter
>>
0
)
>
-
1
&&
getRedBombTimes
()
&&
Math
.
random
()
>
0.5
&&
this
.
lattices
[
festivalIndex
]
&&
//格子必须有
(
Tool
.
judgeSetFesEle
(
this
.
lattices
[
festivalIndex
])
||
!
this
.
lattices
[
festivalIndex
].
element
)
//没有元素也行
...
...
@@ -2798,7 +2798,7 @@ export default class MainScene extends Scene {
}
//时间再调
// setTimeout(() => {
callback
();
callback
();
// }, 80)
}
/**
...
...
egret/src/something/Tool.ts
View file @
c8de83bc
...
...
@@ -269,13 +269,13 @@ export class Tool {
if
(
!
lat
||
!
lat
.
element
)
{
return
false
}
//上方元素为石头,或元素为锁定,或者是果冻,或者鸡蛋,或者大
小
节日元素
//上方元素为石头,或元素为锁定,或者是果冻,或者鸡蛋,或者大节日元素
else
if
(
lat
.
element
.
type
==
ElementType
.
ROCK
||
lat
.
element
.
hasState
(
StateType
.
LOCK
)
||
lat
.
element
.
type
==
ElementType
.
JELLY
||
lat
.
element
.
type
==
ElementType
.
CHICKEN_EGG
||
lat
.
element
.
type
==
ElementType
.
FESTIVALELE_BIG
||
lat
.
element
.
type
==
ElementType
.
FESTIVALELE_SMALL
lat
.
element
.
type
==
ElementType
.
FESTIVALELE_BIG
//
||
//
lat.element.type == ElementType.FESTIVALELE_SMALL
)
{
return
false
}
...
...
egret/src/something/anisCall/RectsWaveAni.ts
0 → 100644
View file @
c8de83bc
import
{
Lattice
}
from
"../class/Lattice"
;
import
{
Tool
}
from
"../Tool"
;
const
whiteRectPool
:
WhiteRect
[]
=
[]
/**
* 格子波纹的动画
* @param lattices
* @param container
* @param callback
*/
export
function
RectsWaveAni
(
lattices
:
Lattice
[],
container
:
egret
.
DisplayObjectContainer
,
callback
?:
Function
,
centerIndex
:
number
=
40
,
)
{
var
loops
:
WhiteRect
[][]
=
[];
var
rc
=
Tool
.
indexToRc
(
centerIndex
);
//格子间距 0到最大的格子
var
num
=
0
;
var
maxNum
=
Math
.
max
(
rc
[
0
],
rc
[
1
],
Tool
.
rowNum
-
rc
[
0
]
-
1
,
Tool
.
colNum
-
rc
[
1
]
-
1
)
//所有格子都填上
while
(
num
<
maxNum
)
{
//每一圈所有格子索引
var
indexs
:
number
[]
=
[];
var
rowMax
=
rc
[
0
]
+
num
;
var
rowMin
=
rc
[
0
]
-
num
;
var
colMax
=
rc
[
1
]
+
num
;
var
colMin
=
rc
[
1
]
-
num
;
num
++
;
var
colIndexs
=
rangeIndexs
(
colMin
>=
0
?
colMin
:
0
,
colMax
<
Tool
.
colNum
?
colMax
:
Tool
.
colNum
-
1
)
var
rowIndexs
=
rangeIndexs
(
rowMin
>=
0
?
rowMin
:
0
,
rowMax
<
Tool
.
rowNum
?
rowMax
:
Tool
.
rowNum
-
1
,
false
)
//上排,行数一致,列数在之内
if
(
rowMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
colIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowMin
,
colIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
//下排
if
(
rowMax
<
Tool
.
rowNum
)
{
for
(
var
i
=
0
;
i
<
colIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
rowMax
,
colIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
//左边
if
(
colMin
>=
0
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
colMin
,
rowIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
//右边
if
(
colMax
<
Tool
.
colNum
)
{
for
(
var
i
=
0
;
i
<
rowIndexs
.
length
;
i
++
)
{
var
index
=
Tool
.
rcToIndex
(
colMax
,
rowIndexs
[
i
]);
if
(
lattices
[
index
])
indexs
.
push
(
index
)
}
}
var
loop
=
[]
//根据索引
for
(
var
i
=
0
;
i
<
indexs
.
length
;
i
++
)
{
var
index
=
indexs
[
i
];
var
p
=
Tool
.
getPositionByIndex
(
index
);
let
rect
=
whiteRectPool
.
shift
();
if
(
!
rect
)
rect
=
new
WhiteRect
();
rect
.
alpha
=
0
;
rect
.
x
=
p
[
0
];
rect
.
y
=
p
[
1
];
container
.
addChild
(
rect
);
loop
.
push
(
rect
);
}
//总
loops
.
push
(
loop
);
}
//动画
}
class
WhiteRect
extends
egret
.
Bitmap
{
constructor
()
{
super
();
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"rectLatWhite_png"
);
this
.
texture
=
texture
;
this
.
x
=
-
texture
.
textureWidth
/
2
;
this
.
y
=
-
texture
.
textureHeight
/
2
;
}
}
function
rangeIndexs
(
min
:
number
,
max
:
number
,
include
:
boolean
=
true
)
{
var
nums
=
[];
if
(
include
)
nums
.
push
(
min
);
var
num
:
number
=
min
;
while
(
++
num
<
max
)
nums
.
push
(
num
);
if
(
include
)
nums
.
push
(
max
);
return
nums
}
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