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
4971035b
Commit
4971035b
authored
Dec 23, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4f99b113
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
106 deletions
+15
-106
index.html
egret/index.html
+1
-1
BaseBlock.ts
egret/src/something/block/BaseBlock.ts
+5
-1
AiControl.ts
egret/src/something/logic/AiControl.ts
+9
-4
home.json
mock/happyclear/home.json
+0
-100
No files found.
egret/index.html
View file @
4971035b
...
...
@@ -60,7 +60,7 @@
<script
src=
"libs/fileSave.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
window
.
fresp
=
0.00001
;
window
.
fresp
=
99
0.00001
;
// localStorage.clear();
window
[
'testUrl'
]
=
'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521'
;
window
[
'hbRainTime'
]
=
30
;
// 红包雨倒计时
...
...
egret/src/something/block/BaseBlock.ts
View file @
4971035b
...
...
@@ -3,6 +3,7 @@ import { Element } from "../class/Element";
import
{
StateType
}
from
"../enum/StateType"
;
export
default
class
BaseBlock
extends
egret
.
DisplayObjectContainer
{
_inited
=
false
;
constructor
(
state
)
{
super
();
this
.
_state
=
state
;
...
...
@@ -82,8 +83,9 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
}
playToFrontAni
()
{
return
new
Promise
((
r
)
=>
{
const
dur
=
300
;
const
dur
=
this
.
_inited
?
300
:
1
;
this
.
_block
.
visible
=
true
;
this
.
_block
.
scaleX
=
1
;
egret
.
Tween
.
get
(
this
.
_block
).
to
({
scaleX
:
0
},
dur
).
call
(()
=>
{
...
...
@@ -100,6 +102,7 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
}
egret
.
Tween
.
get
(
this
.
_blockBgFront
).
to
({
scaleX
:
1
},
dur
).
call
(()
=>
{
r
();
this
.
_inited
=
true
;
})
})
})
...
...
@@ -149,6 +152,7 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
this
.
_blockBgFront
.
visible
=
false
;
this
.
_blockBgFront
.
scaleX
=
1
;
}
else
{
this
.
_inited
=
true
;
this
.
_block
.
visible
=
true
;
}
this
.
_blockBgRed
.
visible
=
true
;
...
...
egret/src/something/logic/AiControl.ts
View file @
4971035b
...
...
@@ -184,9 +184,9 @@ export class AiControl {
},
100
*
a
)
}
loadSvga
(
getResPath
()
+
'resource/assets/svgas/雪花炸开效果.svga'
).
then
(
(
mv
:
any
)
=>
{
(
mv
:
any
)
=>
{
mv
.
stop
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
mv
.
gotoAndPlay
(
1
,
true
);
mv
.
x
=
p
[
0
]
-
350
;
mv
.
y
=
p
[
1
]
-
350
;
...
...
@@ -213,14 +213,19 @@ export class AiControl {
thisObj
.
jellyBrokenMark
=
false
;
//找出所有果冻索引
var
indexs
:
number
[]
=
[];
var
blocked
:
number
[]
=
[];
for
(
var
i
=
0
;
i
<
thisObj
.
lattices
.
length
;
i
++
)
{
var
lattice
=
thisObj
.
lattices
[
i
]
//没有格子或没有元素或不是果冻 跳过
if
(
!
lattice
||
!
lattice
.
element
||
lattice
.
element
.
type
!=
ElementType
.
JELLY
)
continue
if
(
lattice
&&
lattice
.
element
&&
lattice
.
block
&&
lattice
.
block
.
isLock
()
&&
lattice
.
element
.
type
==
ElementType
.
JELLY
)
{
blocked
.
push
(
i
);
}
if
(
!
lattice
||
!
lattice
.
element
||
lattice
.
element
.
type
!=
ElementType
.
JELLY
||
(
lattice
.
block
&&
lattice
.
block
.
isLock
()))
continue
indexs
.
push
(
i
);
}
console
.
log
(
'没有被锁的果冻数量'
,
indexs
.
length
,
'被锁果冻数量'
,
blocked
.
length
,)
//如果没有果冻,直接回调
if
(
!
indexs
.
length
)
{
if
(
!
indexs
.
length
&&
blocked
.
length
==
0
)
{
//标记为无果冻
this
.
hasJelly
=
false
;
callback
();
...
...
mock/happyclear/home.json
View file @
4971035b
...
...
@@ -1141,106 +1141,6 @@
"levelNum"
:
227
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
228
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
229
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
230
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
231
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
232
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
233
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
234
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
235
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
236
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
237
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
238
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
239
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
240
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
241
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
242
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
243
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
244
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
245
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
245
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
246
,
"maxScore"
:
47440
,
"stars"
:
1
}
],
"remainProp"
:
[
...
...
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