Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaoleTuia
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
王剑峰
xiaoxiaoleTuia
Commits
88148681
Commit
88148681
authored
Feb 05, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
5682692d
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
310 additions
and
276 deletions
+310
-276
.gitignore
.gitignore
+0
-1
output.js
egret/bin-release/output.js
+2
-0
output_develop.js
egret/bin-release/output_develop.js
+1
-0
index.html
egret/index.html
+0
-19
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+28
-18
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+5
-24
pro.html
egret/pro.html
+1
-17
kanshipinjiabushu.png
egret/resource/assets/faild/kanshipinjiabushu.png
+0
-0
kanshipinmianfeihuoqu.png
egret/resource/assets/videoBuy/kanshipinmianfeihuoqu.png
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+62
-26
MapScene.ts
egret/src/mapScene/MapScene.ts
+68
-31
BoxPanel.ts
egret/src/panels/BoxPanel.ts
+29
-19
FailedPanel.ts
egret/src/panels/FailedPanel.ts
+11
-6
SignPrizePanel.ts
egret/src/panels/SignPrizePanel.ts
+30
-21
StartPanel.ts
egret/src/panels/StartPanel.ts
+37
-24
VideoBuyPanel.ts
egret/src/panels/VideoBuyPanel.ts
+12
-8
Tool.ts
egret/src/something/Tool.ts
+0
-49
Chapter1.ts
egret/src/something/chapters/Chapter1.ts
+1
-1
Element.ts
egret/src/something/class/Element.ts
+4
-5
AiControl.ts
egret/src/something/logic/AiControl.ts
+19
-7
No files found.
.gitignore
View file @
88148681
...
@@ -22,4 +22,3 @@
...
@@ -22,4 +22,3 @@
# doc/*.txt
# doc/*.txt
# 会忽略 doc/notes.txt 但不包括 doc/server/arch.txt
# 会忽略 doc/notes.txt 但不包括 doc/server/arch.txt
node_modules
node_modules
bin-release
\ No newline at end of file
egret/bin-release/output.js
0 → 100644
View file @
88148681
This diff is collapsed.
Click to expand it.
egret/bin-release/output_develop.js
0 → 100644
View file @
88148681
This diff is collapsed.
Click to expand it.
egret/index.html
View file @
88148681
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
top
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.6
);
background
:
rgba
(
0
,
0
,
0
,
0.6
);
}
}
.app-close
{
.app-close
{
position
:
absolute
;
position
:
absolute
;
width
:
5vw
;
width
:
5vw
;
...
@@ -52,7 +51,6 @@
...
@@ -52,7 +51,6 @@
top
:
5vw
;
top
:
5vw
;
right
:
5vw
;
right
:
5vw
;
}
}
.app-info-wrap
{
.app-info-wrap
{
padding
:
3vh
0
;
padding
:
3vh
0
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -69,7 +67,6 @@
...
@@ -69,7 +67,6 @@
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
}
}
.app-logo
{
.app-logo
{
width
:
18.7vw
;
width
:
18.7vw
;
margin-top
:
4vh
;
margin-top
:
4vh
;
...
@@ -77,7 +74,6 @@
...
@@ -77,7 +74,6 @@
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-size
:
100%
;
background-size
:
100%
;
}
}
.app-name
{
.app-name
{
font-size
:
24px
;
font-size
:
24px
;
font-weight
:
400
;
font-weight
:
400
;
...
@@ -86,7 +82,6 @@
...
@@ -86,7 +82,6 @@
text-align
:
center
;
text-align
:
center
;
margin-top
:
3vh
;
margin-top
:
3vh
;
}
}
.app-button
{
.app-button
{
width
:
75.2vw
;
width
:
75.2vw
;
height
:
6.9vh
;
height
:
6.9vh
;
...
@@ -126,20 +121,6 @@
...
@@ -126,20 +121,6 @@
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
<script>
window
[
'imgver'
]
=
'11112'
;
//签到itemId对应图片,线上注意对应修改
window
[
'duiba'
]
=
''
;
window
[
"appKeyTuia"
]
=
"2ZjLbhEBCFAzBbihEtxLEq25mXKw"
;
//推啊appkey
//推啊广告id
window
[
"slotIdsTuia"
]
=
[
"324689"
,
//首页悬浮 0
"327165"
,
//签到完成翻倍 1
"327166"
,
//开始前领取道具 2
"327166"
,
//游戏中领取道具 3
"327167"
,
//游戏失败领取步数 4
"327165"
,
//游戏成功翻倍领取 5
"327165"
,
//开宝箱翻倍领取 6
]
window
[
'signconfigs'
]
=
[
window
[
'signconfigs'
]
=
[
{
nums
:
'*20'
,
type
:
'money'
},
{
nums
:
'*20'
,
type
:
'money'
},
{
nums
:
'*20'
,
type
:
'money'
},
{
nums
:
'*20'
,
type
:
'money'
},
...
...
egret/libs/new_wx/components/PrizePanel.ts
View file @
88148681
...
@@ -6,6 +6,7 @@ import wait from "../../new_tc/wait";
...
@@ -6,6 +6,7 @@ import wait from "../../new_tc/wait";
import
{
DataManager
}
from
"../../tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../tw/manager/DataManager"
;
import
{
NetManager
}
from
"../../tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../tw/manager/NetManager"
;
import
Panel
from
"./Panel"
;
import
Panel
from
"./Panel"
;
import
{
handleVideo
}
from
"../../../src/myVideo/videoCtrl"
;
import
Loading
from
"./Loading"
;
import
Loading
from
"./Loading"
;
import
{
showToast
}
from
"../ctrls/toastCtrl"
;
import
{
showToast
}
from
"../ctrls/toastCtrl"
;
export
default
class
PrizePanel
extends
Panel
{
export
default
class
PrizePanel
extends
Panel
{
...
@@ -72,29 +73,38 @@ export default class PrizePanel extends Panel {
...
@@ -72,29 +73,38 @@ export default class PrizePanel extends Panel {
//新增看视频双倍
//新增看视频双倍
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
6
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
6
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
(
s
)
=>
{
if
(
s
)
{
//居中
this
[
'goBtn'
].
horizontalCenter
=
0
;
//隐藏
this
[
'doubleBtn'
].
visible
=
false
;
Loading
.
instace
.
show
()
NetManager
.
ins
.
getIncentiveAward
(
(
s
)
=>
{
Loading
.
instace
.
hide
()
if
(
s
)
{
showToast
(
"翻倍成功"
);
NetManager
.
ins
.
hc_home
(()
=>
{
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
"加倍失败"
);
}
},
25
)
}
else
{
showToast
(
"广告未成功观看,无法加倍领取"
);
}
},
()
=>
{
()
=>
{
//居中
this
[
'goBtn'
].
horizontalCenter
=
0
;
//隐藏
this
[
'doubleBtn'
].
visible
=
false
;
Loading
.
instace
.
show
()
NetManager
.
ins
.
getIncentiveAward
(
NetManager
.
ins
.
getIncentiveAward
(
(
s
)
=>
{
()
=>
{
},
Loading
.
instace
.
hide
()
if
(
s
)
{
showToast
(
"翻倍成功"
);
NetManager
.
ins
.
hc_home
(()
=>
{
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
"加倍失败"
);
}
},
25
25
)
)
},
},
()
=>
{
showToast
(
"广告未成功观看,无法加倍领取"
);
},
window
[
"slotid"
]
window
[
"slotIdsTuia"
][
5
]
)
)
},
this
)
},
this
)
}
}
...
...
egret/libs/tw/manager/NetManager.ts
View file @
88148681
...
@@ -94,34 +94,15 @@ export class NetManager extends ABNetManager {
...
@@ -94,34 +94,15 @@ export class NetManager extends ABNetManager {
};
};
this
.
send
(
net
);
this
.
send
(
net
);
}
}
/**
*
public
getTuiaAd
(
rewardFn
,
closeFn
)
{
* @param rewardFn 已完成活动,执行
* @param closeFn 未完成关闭
* @param comCloseFn 已完成活动,返回的提示,一般是toast或游戏内的逻辑,暂不用
*/
public
getTuiaAd
(
rewardFn
:
Function
,
closeFn
:
Function
,
slotId
:
string
)
{
this
[
'tuiaRewardMark'
]
=
false
;
let
_rewardFn
=
()
=>
{
// rewardFn();
//这里只标记吧,下面返回再执行
this
[
'tuiaRewardMark'
]
=
true
;
console
.
log
(
"观看成功"
)
}
let
_closeFn
=
()
=>
{
if
(
!
this
[
'tuiaRewardMark'
])
{
closeFn
();
}
else
{
rewardFn
();
}
}
window
[
"TAIsdk"
].
init
({
window
[
"TAIsdk"
].
init
({
appKey
:
window
[
"appKeyTuia"
]
||
'2ZjLbhEBCFAzBbihEtxLEq25mXKw'
,
//固定,到时修改
appKey
:
window
[
"appKeyTuia"
]
||
'2ZjLbhEBCFAzBbihEtxLEq25mXKw'
,
//固定,到时修改
slotId
:
slotId
,
//到时修改
slotId
:
window
[
"slotIdTuia"
]
||
'324689'
,
//到时修改
deviceId
:
getUrl
(
'deviceId'
),
deviceId
:
getUrl
(
'deviceId'
),
userId
:
window
[
"CFG"
].
uid
,
userId
:
window
[
"CFG"
].
uid
,
rewardCallback
:
_
rewardFn
,
rewardCallback
:
rewardFn
,
closeCallback
:
_
closeFn
,
closeCallback
:
closeFn
,
extParams
:
{},
extParams
:
{},
debug
:
false
,
debug
:
false
,
// newWebviewFn: newWebview,
// newWebviewFn: newWebview,
...
...
egret/pro.html
View file @
88148681
...
@@ -18,18 +18,7 @@
...
@@ -18,18 +18,7 @@
//window['tryWuhanVideo']=true;
//window['tryWuhanVideo']=true;
window
[
"slotidIcon"
]
=
"srlKMxcd2230"
;
//首页icon的广告位id
window
[
"slotidIcon"
]
=
"srlKMxcd2230"
;
//首页icon的广告位id
window
[
"slotid"
]
=
"srlboItw2231"
;
//其他位置广告位id
window
[
"slotid"
]
=
"srlboItw2231"
;
//其他位置广告位id
window
[
"appKeyTuia"
]
=
"2ZjLbhEBCFAzBbihEtxLEq25mXKw"
;
//推啊appkey
window
[
"slotIdTuia"
]
=
"324689"
;
//推啊广告id
//推啊广告id
window
[
"slotIdsTuia"
]
=
[
"324689"
,
//首页悬浮 0
"327165"
,
//签到完成翻倍 1
"327166"
,
//开始前领取道具 2
"327166"
,
//游戏中领取道具 3
"327167"
,
//游戏失败领取步数 4
"327165"
,
//游戏成功翻倍领取 5
"327165"
,
//开宝箱翻倍领取 6
]
</script>
</script>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
...
@@ -69,7 +58,6 @@
...
@@ -69,7 +58,6 @@
top
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.6
);
background
:
rgba
(
0
,
0
,
0
,
0.6
);
}
}
.app-close
{
.app-close
{
position
:
absolute
;
position
:
absolute
;
width
:
5vw
;
width
:
5vw
;
...
@@ -77,7 +65,6 @@
...
@@ -77,7 +65,6 @@
top
:
5vw
;
top
:
5vw
;
right
:
5vw
;
right
:
5vw
;
}
}
.app-info-wrap
{
.app-info-wrap
{
padding
:
3vh
0
;
padding
:
3vh
0
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -94,7 +81,6 @@
...
@@ -94,7 +81,6 @@
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
}
}
.app-logo
{
.app-logo
{
width
:
18.7vw
;
width
:
18.7vw
;
margin-top
:
4vh
;
margin-top
:
4vh
;
...
@@ -102,7 +88,6 @@
...
@@ -102,7 +88,6 @@
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-size
:
100%
;
background-size
:
100%
;
}
}
.app-name
{
.app-name
{
font-size
:
24px
;
font-size
:
24px
;
font-weight
:
400
;
font-weight
:
400
;
...
@@ -111,7 +96,6 @@
...
@@ -111,7 +96,6 @@
text-align
:
center
;
text-align
:
center
;
margin-top
:
3vh
;
margin-top
:
3vh
;
}
}
.app-button
{
.app-button
{
width
:
75.2vw
;
width
:
75.2vw
;
height
:
6.9vh
;
height
:
6.9vh
;
...
...
egret/resource/assets/faild/kanshipinjiabushu.png
View replaced file @
5682692d
View file @
88148681
43.2 KB
|
W:
|
H:
43.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/videoBuy/kanshipinmianfeihuoqu.png
View replaced file @
5682692d
View file @
88148681
29.5 KB
|
W:
|
H:
29.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/src/mainScene/MainScene.ts
View file @
88148681
...
@@ -514,7 +514,7 @@ export default class MainScene extends Scene {
...
@@ -514,7 +514,7 @@ export default class MainScene extends Scene {
//位置
//位置
var
p
=
Tool
.
getPositionByIndex
(
i
);
var
p
=
Tool
.
getPositionByIndex
(
i
);
//石门
//石门
var
dooreData
=
[
4
,
5
,
6
,
51
,
61
]
var
dooreData
=
[
5
,
6
,
51
,
61
]
if
(
dooreData
.
indexOf
(
latticesD
[
i
])
>=
0
)
{
if
(
dooreData
.
indexOf
(
latticesD
[
i
])
>=
0
)
{
let
door
:
Door
=
Pool
.
takeOut
(
RecoverName
.
DOOR
);
let
door
:
Door
=
Pool
.
takeOut
(
RecoverName
.
DOOR
);
var
closed
:
boolean
=
(
latticesD
[
i
]
+
""
).
length
==
2
?
false
:
true
var
closed
:
boolean
=
(
latticesD
[
i
]
+
""
).
length
==
2
?
false
:
true
...
@@ -603,7 +603,7 @@ export default class MainScene extends Scene {
...
@@ -603,7 +603,7 @@ export default class MainScene extends Scene {
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
//如果对应格子为空,直接跳过,
//如果对应格子为空,直接跳过,
if
(
!
this
.
lattices
[
i
])
continue
;
if
(
!
this
.
lattices
[
i
])
continue
;
let
ele
:
Element
;
var
p
=
Tool
.
getPositionByIndex
(
i
)
;
switch
(
elements
[
i
])
{
switch
(
elements
[
i
])
{
//如果为0记录空格
//如果为0记录空格
case
0
:
case
0
:
...
@@ -617,7 +617,16 @@ export default class MainScene extends Scene {
...
@@ -617,7 +617,16 @@ export default class MainScene extends Scene {
case
9
:
case
9
:
case
10
:
case
10
:
var
type
=
Tool
.
returnType
(
i
,
this
.
lattices
,
this
.
chapterData
.
baseElementTypes
);
var
type
=
Tool
.
returnType
(
i
,
this
.
lattices
,
this
.
chapterData
.
baseElementTypes
);
ele
=
Tool
.
getElement
(
type
)
let
ele
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
ele
)
{
ele
=
new
Element
(
type
)
}
else
{
ele
.
reset
(
type
)
}
ele
.
x
=
p
[
0
];
ele
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
ele
);
this
.
lattices
[
i
].
element
=
ele
;
if
(
elements
[
i
]
==
4
)
{
if
(
elements
[
i
]
==
4
)
{
ele
.
setState
(
StateType
.
LOCK
,
true
)
ele
.
setState
(
StateType
.
LOCK
,
true
)
}
}
...
@@ -638,37 +647,56 @@ export default class MainScene extends Scene {
...
@@ -638,37 +647,56 @@ export default class MainScene extends Scene {
else
if
(
elements
[
i
]
==
10
)
{
else
if
(
elements
[
i
]
==
10
)
{
ele
.
setState
(
StateType
.
HAIRBALLBLACK
,
true
)
ele
.
setState
(
StateType
.
HAIRBALLBLACK
,
true
)
}
}
break
;
break
;
//棒棒糖
//棒棒糖
case
3
:
case
3
:
this
.
lollipopCount
++
;
this
.
lollipopCount
++
;
ele
=
Tool
.
getElement
(
ElementType
.
LOLLIPOP
)
let
lol
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
lol
)
{
lol
=
new
Element
(
ElementType
.
LOLLIPOP
)
}
else
{
lol
.
reset
(
ElementType
.
LOLLIPOP
)
}
lol
.
x
=
p
[
0
];
lol
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
lol
);
this
.
lattices
[
i
].
element
=
lol
;
break
;
break
;
//石头
//石头
case
2
:
case
2
:
ele
=
Tool
.
getElement
(
ElementType
.
ROCK
)
let
rock
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
rock
)
{
rock
=
new
Element
(
ElementType
.
ROCK
)
}
else
{
rock
.
reset
(
ElementType
.
ROCK
)
}
rock
.
x
=
p
[
0
];
rock
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
rock
);
this
.
lattices
[
i
].
element
=
rock
;
break
;
break
;
//果冻
//果冻
case
5
:
case
5
:
ele
=
Tool
.
getElement
(
ElementType
.
JELLY
)
let
jelly
:
Element
=
Tool
.
getElement
(
ElementType
.
JELLY
)
jelly
.
x
=
p
[
0
];
jelly
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
jelly
);
this
.
lattices
[
i
].
element
=
jelly
;
break
;
break
;
//鸡蛋
//鸡蛋
case
6
:
case
6
:
ele
=
Tool
.
getElement
(
ElementType
.
CHICKEN_EGG
)
let
egg
:
Element
=
Tool
.
getElement
(
ElementType
.
CHICKEN_EGG
)
egg
.
x
=
p
[
0
];
egg
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
egg
);
this
.
lattices
[
i
].
element
=
egg
;
break
;
break
;
default
:
default
:
//其他标识按空元素记
//其他标识按空元素记
this
.
emptys
.
push
(
i
);
this
.
emptys
.
push
(
i
);
break
break
}
}
//有元素操作
if
(
ele
)
{
var
p
=
Tool
.
getPositionByIndex
(
i
);
ele
.
x
=
p
[
0
];
ele
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
ele
);
this
.
lattices
[
i
].
element
=
ele
;
}
//针对石门修改
//针对石门修改
if
(
this
.
lattices
[
i
].
doorClosed
)
{
if
(
this
.
lattices
[
i
].
doorClosed
)
{
if
(
this
.
lattices
[
i
].
element
)
{
if
(
this
.
lattices
[
i
].
element
)
{
...
@@ -679,12 +707,12 @@ export default class MainScene extends Scene {
...
@@ -679,12 +707,12 @@ export default class MainScene extends Scene {
Tool
.
removeEle
(
i
,
this
.
emptys
);
Tool
.
removeEle
(
i
,
this
.
emptys
);
}
}
}
}
}
//针对如果地图没有棒棒糖0,但是通关目标有,需要标记生成
//针对如果地图没有棒棒糖0,但是通关目标有,需要标记生成
if
(
this
.
passElements
&&
if
(
this
.
passElements
&&
this
.
passElements
[
ElementType
.
LOLLIPOP
]
&&
this
.
passElements
[
ElementType
.
LOLLIPOP
]
&&
!
this
.
lollipopCount
)
{
!
this
.
lollipopCount
)
{
this
.
lollipopMark
=
true
this
.
lollipopMark
=
true
}
}
}
}
}
//重置基础元素及特效类型
//重置基础元素及特效类型
...
@@ -1586,7 +1614,10 @@ export default class MainScene extends Scene {
...
@@ -1586,7 +1614,10 @@ export default class MainScene extends Scene {
this
.
lollipopMark
=
true
this
.
lollipopMark
=
true
}
}
}
}
if
(
++
count
==
countAll
)
callback
();
count
++
;
if
(
count
==
countAll
)
{
callback
()
}
})
})
}
}
...
@@ -2054,7 +2085,9 @@ export default class MainScene extends Scene {
...
@@ -2054,7 +2085,9 @@ export default class MainScene extends Scene {
this
.
magicRotateData
=
[
rotateData
];
this
.
magicRotateData
=
[
rotateData
];
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
var
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeMagicEliminate
(
lat
)
&&
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
//是基础元素
!
lat
.
doorClosed
&&
//石门非关闭状态
lat
.
element
.
effectType
!=
EffectType
.
MAGICLION
&&
//不能是魔力鸟特效
lat
.
element
.
type
==
other
.
type
//类型相等
lat
.
element
.
type
==
other
.
type
//类型相等
)
{
)
{
//一个魔力鸟时其实不用加,因为石头或果冻的不会进入判断
//一个魔力鸟时其实不用加,因为石头或果冻的不会进入判断
...
@@ -2323,7 +2356,9 @@ export default class MainScene extends Scene {
...
@@ -2323,7 +2356,9 @@ export default class MainScene extends Scene {
this
.
magicRotateData
.
push
(
rotateData
);
this
.
magicRotateData
.
push
(
rotateData
);
//对于魔力鸟的效果有不一样的,旋转,该组元素要旋转消除
//对于魔力鸟的效果有不一样的,旋转,该组元素要旋转消除
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
if
(
Tool
.
judgeMagicEliminate
(
this
.
lattices
[
i
])
&&
if
(
Tool
.
judgeBaseEle
(
this
.
lattices
[
i
])
&&
//是基础元素
!
this
.
lattices
[
i
].
doorClosed
&&
//石门非关闭状态
this
.
lattices
[
i
].
element
.
effectType
!=
EffectType
.
MAGICLION
&&
//不是魔力鸟
this
.
lattices
[
i
].
element
.
type
==
type
//类型相等
this
.
lattices
[
i
].
element
.
type
==
type
//类型相等
)
{
)
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
)
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
<
0
&&
effectIndexs
.
indexOf
(
i
)
<
0
)
{
...
@@ -2576,7 +2611,8 @@ export default class MainScene extends Scene {
...
@@ -2576,7 +2611,8 @@ export default class MainScene extends Scene {
egret
.
Tween
.
get
(
ele
)
egret
.
Tween
.
get
(
ele
)
.
to
({
x
:
p
[
0
],
y
:
p
[
1
]
},
500
)
.
to
({
x
:
p
[
0
],
y
:
p
[
1
]
},
500
)
.
call
(()
=>
{
.
call
(()
=>
{
if
(
++
count
==
countAll
)
{
count
++
;
if
(
count
==
countAll
)
{
//交换结束后,判断是否有三消
//交换结束后,判断是否有三消
if
(
this
.
threeMatch
())
{
if
(
this
.
threeMatch
())
{
this
.
eliminate
()
this
.
eliminate
()
...
@@ -2793,7 +2829,7 @@ export default class MainScene extends Scene {
...
@@ -2793,7 +2829,7 @@ export default class MainScene extends Scene {
for
(
let
i
=
0
;
i
<
indexs
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
indexs
.
length
;
i
++
)
{
let
index
=
indexs
[
i
];
let
index
=
indexs
[
i
];
let
lat
=
this
.
lattices
[
index
];
let
lat
=
this
.
lattices
[
index
];
if
(
lat
&&
lat
.
element
&&
!
lat
.
doorClosed
&&
checkFun
(
lat
)
)
{
if
(
lat
&&
lat
.
element
&&
checkFun
(
lat
)
&&
!
lat
.
doorClosed
)
{
//添加进消除队列,注意重复
//添加进消除队列,注意重复
if
(
this
.
eliminatedElements
.
indexOf
(
index
)
==
-
1
)
this
.
eliminatedElements
.
push
(
index
)
if
(
this
.
eliminatedElements
.
indexOf
(
index
)
==
-
1
)
this
.
eliminatedElements
.
push
(
index
)
}
}
...
...
egret/src/mapScene/MapScene.ts
View file @
88148681
...
@@ -26,6 +26,7 @@ import MapTopPart from "./MapTopPart";
...
@@ -26,6 +26,7 @@ import MapTopPart from "./MapTopPart";
import
RedBagAni
,
{
createRedBagIcon
}
from
"./RedBagAni"
;
import
RedBagAni
,
{
createRedBagIcon
}
from
"./RedBagAni"
;
import
{
createEffect2MovieClip
}
from
"../effect/createEffect2"
;
import
{
createEffect2MovieClip
}
from
"../effect/createEffect2"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
handleVideo
}
from
"../myVideo/videoCtrl"
;
import
{
getUrl
}
from
"../myVideo/getDefaultConfig"
;
import
{
getUrl
}
from
"../myVideo/getDefaultConfig"
;
let
doHelpFlag
=
false
;
let
doHelpFlag
=
false
;
...
@@ -56,39 +57,75 @@ export default class MapScene extends Scene {
...
@@ -56,39 +57,75 @@ export default class MapScene extends Scene {
NetManager
.
ins
.
getIconInfo
((
s
,
res
)
=>
{
NetManager
.
ins
.
getIconInfo
((
s
,
res
)
=>
{
//成功才显示,且有剩余次数remainAwardTimes
//成功才显示,且有剩余次数remainAwardTimes
if
(
s
&&
res
.
data
&&
res
.
data
.
remainAwardTimes
)
{
if
(
s
&&
res
.
data
&&
res
.
data
.
remainAwardTimes
)
{
this
[
"tuiaGroup"
].
visible
=
true
;
//领奖类型:0:武汉 1:推啊
NetManager
.
ins
.
showLog
(
getlogItem
(
13
))
//武汉
this
[
"tuiaGroup"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
res
.
data
.
type
==
0
)
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
13
))
this
[
"wuhanGroup"
].
visible
=
true
;
NetManager
.
ins
.
getTuiaAd
(
NetManager
.
ins
.
showLog
(
getlogItem
(
14
))
()
=>
{
this
[
"wuhanGroup"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
Loading
.
instace
.
show
();
NetManager
.
ins
.
clickLog
(
getlogItem
(
14
))
NetManager
.
ins
.
getIconAward
((
succ
,
ress
)
=>
{
handleVideo
(
Loading
.
instace
.
hide
();
(
s
)
=>
{
if
(
succ
)
{
if
(
s
)
{
PanelCtrl
.
instance
.
show
(
"DailyIconPrizePanel"
);
Loading
.
instace
.
show
();
//如果次数没了就隐藏icon
NetManager
.
ins
.
getIconAward
((
succ
,
ress
)
=>
{
if
(
!
ress
.
data
.
remainAwardTimes
)
{
Loading
.
instace
.
hide
();
this
[
"tuiaGroup"
].
visible
=
false
;
if
(
succ
)
{
}
PanelCtrl
.
instance
.
show
(
"DailyIconPrizePanel"
);
//如果次数没了就隐藏icon
if
(
!
ress
.
data
.
remainAwardTimes
)
{
this
[
"wuhanGroup"
].
visible
=
false
;
}
}
else
{
showToast
(
"领取失败"
);
}
})
}
else
{
}
else
{
showToast
(
"
领取失败
"
);
showToast
(
"
广告未成功观看,无法领取奖励
"
);
}
}
})
},
//关闭弹框
()
=>
{
NetManager
.
ins
.
getIconAward
(()
=>
{
})
},
// window['TAIsdk'].iframeNode.remove()
window
[
"slotidIcon"
]
// setTimeout(function () {
)
// window['TAIsdk'].iframeNode.src = ''
},
this
)
// })
}
// window['TAIsdk'].closeBtn.style.display = 'none'
//推啊
},
else
if
(
res
.
data
.
type
==
1
)
{
()
=>
{
this
[
"tuiaGroup"
].
visible
=
true
;
showToast
(
"活动未完成,无法领取奖励"
);
NetManager
.
ins
.
showLog
(
getlogItem
(
13
))
},
this
[
"tuiaGroup"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
window
[
"slotIdsTuia"
][
0
]
NetManager
.
ins
.
clickLog
(
getlogItem
(
13
))
)
this
[
'tuiaRewardMark'
]
=
false
;
},
this
)
NetManager
.
ins
.
getTuiaAd
(
()
=>
{
Loading
.
instace
.
show
();
NetManager
.
ins
.
getIconAward
((
succ
,
ress
)
=>
{
Loading
.
instace
.
hide
();
if
(
succ
)
{
PanelCtrl
.
instance
.
show
(
"DailyIconPrizePanel"
);
//如果次数没了就隐藏icon
if
(
!
ress
.
data
.
remainAwardTimes
)
{
this
[
"tuiaGroup"
].
visible
=
false
;
}
}
else
{
showToast
(
"领取失败"
);
}
})
this
[
'tuiaRewardMark'
]
=
true
;
//关闭弹框
// window['TAIsdk'].iframeNode.remove()
// setTimeout(function () {
// window['TAIsdk'].iframeNode.src = ''
// })
// window['TAIsdk'].closeBtn.style.display = 'none'
},
()
=>
{
//上面没回调过。就显示toast
if
(
!
this
[
'tuiaRewardMark'
])
showToast
(
"活动未完成,无法领取奖励"
);
}
)
},
this
)
}
}
}
})
})
...
...
egret/src/panels/BoxPanel.ts
View file @
88148681
...
@@ -4,6 +4,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
...
@@ -4,6 +4,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
getHomeData
from
"../getHomeData"
;
import
getHomeData
from
"../getHomeData"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
AdSmallComp
from
"../mapScene/AdSmallComp"
;
import
AdSmallComp
from
"../mapScene/AdSmallComp"
;
import
{
handleVideo
}
from
"../myVideo/videoCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
...
@@ -39,30 +40,39 @@ export default class BoxPanel extends Panel {
...
@@ -39,30 +40,39 @@ export default class BoxPanel extends Panel {
this
[
'close2Btn'
].
visible
=
false
;
this
[
'close2Btn'
].
visible
=
false
;
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
12
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
12
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
(
s
)
=>
{
if
(
s
)
{
this
[
'close2Btn'
].
visible
=
true
;
this
[
'doubleBtn'
].
visible
=
false
;
Loading
.
instace
.
show
()
NetManager
.
ins
.
getIncentiveAward
(
(
s
)
=>
{
Loading
.
instace
.
hide
()
if
(
s
)
{
showToast
(
"翻倍成功"
);
NetManager
.
ins
.
hc_home
(()
=>
{
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
"加倍失败"
);
this
.
hidePanel
();
}
},
22
)
}
else
{
showToast
(
"广告未成功观看,无法加倍领取"
);
}
},
()
=>
{
()
=>
{
this
[
'close2Btn'
].
visible
=
true
;
this
[
'doubleBtn'
].
visible
=
false
;
Loading
.
instace
.
show
()
NetManager
.
ins
.
getIncentiveAward
(
NetManager
.
ins
.
getIncentiveAward
(
(
s
)
=>
{
()
=>
{
},
Loading
.
instace
.
hide
()
if
(
s
)
{
showToast
(
"翻倍成功"
);
NetManager
.
ins
.
hc_home
(()
=>
{
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
"加倍失败"
);
this
.
hidePanel
();
}
},
22
22
)
)
},
},
()
=>
{
showToast
(
"广告未成功观看,无法加倍领取"
);
},
window
[
"slotid"
]
window
[
"slotIdsTuia"
][
6
]
)
)
},
this
)
},
this
)
...
...
egret/src/panels/FailedPanel.ts
View file @
88148681
...
@@ -2,6 +2,7 @@ import Panel from "../../libs/new_wx/components/Panel";
...
@@ -2,6 +2,7 @@ import Panel from "../../libs/new_wx/components/Panel";
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
addRankFriendList
}
from
"../mapScene/RankFriendList"
;
import
{
addRankFriendList
}
from
"../mapScene/RankFriendList"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
import
{
handleVideo
}
from
"../myVideo/videoCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
...
@@ -32,13 +33,17 @@ export default class FailedPanel extends Panel {
...
@@ -32,13 +33,17 @@ export default class FailedPanel extends Panel {
this
[
"videoBtn"
].
visible
=
true
;
this
[
"videoBtn"
].
visible
=
true
;
this
[
"videoBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
"videoBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
()
=>
{
(
s
)
=>
{
this
.
hidePanel
();
if
(
s
)
{
data
.
complete
();
this
.
hidePanel
();
data
.
complete
();
}
else
{
showToast
(
"广告未成功观看,请继续观看"
);
}
},
},
()
=>
{
showToast
(
"广告未成功观看,无法复活"
);
},
()
=>
{
},
window
[
"slot
IdsTuia"
][
4
]
window
[
"slot
id"
]
)
)
},
this
);
},
this
);
}
}
...
...
egret/src/panels/SignPrizePanel.ts
View file @
88148681
...
@@ -3,6 +3,7 @@ import { DataManager } from "../../libs/tw/manager/DataManager";
...
@@ -3,6 +3,7 @@ import { DataManager } from "../../libs/tw/manager/DataManager";
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
handleVideo
}
from
"../myVideo/videoCtrl"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
...
@@ -50,30 +51,38 @@ export default class SignPrizePanel extends Panel {
...
@@ -50,30 +51,38 @@ export default class SignPrizePanel extends Panel {
this
[
'close2Btn'
].
visible
=
false
;
this
[
'close2Btn'
].
visible
=
false
;
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
8
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
8
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
(
s
)
=>
{
if
(
s
)
{
Loading
.
instace
.
show
();
NetManager
.
ins
.
getIncentiveAward
(
(
s
)
=>
{
Loading
.
instace
.
hide
();
this
[
'close2Btn'
].
visible
=
true
;
this
[
'doubleBtn'
].
visible
=
false
;
if
(
s
)
{
showToast
(
"翻倍成功"
);
NetManager
.
ins
.
hc_home
(()
=>
{
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
"加倍失败"
);
this
.
hidePanel
();
}
},
21
)
}
else
{
showToast
(
"广告未成功观看,无法加倍领取"
);
}
},
()
=>
{
()
=>
{
Loading
.
instace
.
show
();
NetManager
.
ins
.
getIncentiveAward
(
NetManager
.
ins
.
getIncentiveAward
(
(
s
)
=>
{
()
=>
{
},
Loading
.
instace
.
hide
();
21
)
this
[
'close2Btn'
].
visible
=
true
;
this
[
'doubleBtn'
].
visible
=
false
;
if
(
s
)
{
showToast
(
"翻倍成功"
);
NetManager
.
ins
.
hc_home
(()
=>
{
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
"加倍失败"
);
this
.
hidePanel
();
}
},
21
)
},
},
()
=>
{
showToast
(
"广告未成功观看,无法加倍领取"
)
},
window
[
"slotid"
]
window
[
"slotIdsTuia"
][
1
]
)
)
},
this
)
},
this
)
}
}
...
...
egret/src/panels/StartPanel.ts
View file @
88148681
...
@@ -18,6 +18,7 @@ import { addRankFriendList } from "../mapScene/RankFriendList";
...
@@ -18,6 +18,7 @@ import { addRankFriendList } from "../mapScene/RankFriendList";
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
addAdComp
}
from
"./BoxPanel"
;
import
{
getChapterData
}
from
"../something/chapters/getChapter"
;
import
{
getChapterData
}
from
"../something/chapters/getChapter"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
handleVideo
}
from
"../myVideo/videoCtrl"
;
export
default
class
StartPanel
extends
Panel
{
export
default
class
StartPanel
extends
Panel
{
static
currlevel
;
static
currlevel
;
...
@@ -193,45 +194,57 @@ export default class StartPanel extends Panel {
...
@@ -193,45 +194,57 @@ export default class StartPanel extends Panel {
onTap_video1btn
()
{
onTap_video1btn
()
{
//看视频按钮点击
//看视频按钮点击
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
()
=>
{
(
s
)
=>
{
this
[
'video1btn'
].
visible
=
false
;
if
(
s
)
{
this
.
videoProp
[
1
]
=
1
;
this
[
'video1btn'
].
visible
=
false
;
this
[
'nums1Txt'
].
text
=
(
this
.
hammer
+
this
.
videoProp
[
1
])
+
""
;
this
.
videoProp
[
1
]
=
1
;
showToast
(
"增加一个锤子道具"
)
this
[
'nums1Txt'
].
text
=
(
this
.
hammer
+
this
.
videoProp
[
1
])
+
""
;
showToast
(
"增加一个锤子道具"
)
}
else
{
showToast
(
"广告未成功观看,道具领取失败"
)
}
},
},
()
=>
{
showToast
(
"广告未成功观看,道具领取失败"
)
},
()
=>
{
},
window
[
"slot
IdsTuia"
][
2
]
window
[
"slot
id"
]
)
)
}
}
//炸弹
//炸弹
onTap_video2btn
()
{
onTap_video2btn
()
{
//看视频按钮点击
//看视频按钮点击
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
()
=>
{
(
s
)
=>
{
this
[
'video2btn'
].
visible
=
false
;
if
(
s
)
{
this
.
videoProp
[
0
]
=
1
;
this
[
'video2btn'
].
visible
=
false
;
this
[
'nums2Txt'
].
text
=
(
this
.
boom
+
this
.
videoProp
[
0
])
+
""
;
this
.
videoProp
[
0
]
=
1
;
showToast
(
"增加一个炸弹道具"
)
this
[
'nums2Txt'
].
text
=
(
this
.
boom
+
this
.
videoProp
[
0
])
+
""
;
showToast
(
"增加一个炸弹道具"
)
}
else
{
showToast
(
"广告未成功观看,道具领取失败"
)
}
},
},
()
=>
{
showToast
(
"广告未成功观看,道具领取失败"
)
},
()
=>
{
},
window
[
"slot
IdsTuia"
][
2
]
window
[
"slot
id"
]
)
)
}
}
//步数
//步数
onTap_video3btn
()
{
onTap_video3btn
()
{
//看视频按钮点击
//看视频按钮点击
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
2
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
()
=>
{
(
s
)
=>
{
this
[
'video3btn'
].
visible
=
false
;
if
(
s
)
{
this
.
videoProp
[
2
]
=
1
;
this
[
'video3btn'
].
visible
=
false
;
this
[
'nums3Txt'
].
text
=
(
this
.
boom
+
this
.
videoProp
[
2
])
+
""
;
this
.
videoProp
[
2
]
=
1
;
showToast
(
"增加一个增加步数道具"
)
this
[
'nums3Txt'
].
text
=
(
this
.
boom
+
this
.
videoProp
[
2
])
+
""
;
showToast
(
"增加一个增加步数道具"
)
}
else
{
showToast
(
"广告未成功观看,道具领取失败"
)
}
},
},
()
=>
{
showToast
(
"广告未成功观看,道具领取失败"
)
},
()
=>
{
},
window
[
"slot
IdsTuia"
][
2
]
window
[
"slot
id"
]
)
)
}
}
...
...
egret/src/panels/VideoBuyPanel.ts
View file @
88148681
...
@@ -60,15 +60,19 @@ export default class VideoBuyPanel extends Panel {
...
@@ -60,15 +60,19 @@ export default class VideoBuyPanel extends Panel {
this
[
"videoBtn"
].
visible
=
true
;
this
[
"videoBtn"
].
visible
=
true
;
this
[
"videoBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
"videoBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
10
))
NetManager
.
ins
.
clickLog
(
getlogItem
(
10
))
NetManager
.
ins
.
getTuiaAd
(
handleVideo
(
()
=>
{
(
s
)
=>
{
this
.
hidePanel
();
if
(
s
)
{
//回调
this
.
hidePanel
();
data
.
complete
(
true
);
//回调
showToast
(
"领取成功"
)
data
.
complete
(
true
);
showToast
(
"领取成功"
)
}
else
{
showToast
(
"广告未成功观看,道具领取失败"
)
}
},
},
()
=>
{
showToast
(
"广告未成功观看,道具领取失败"
)
},
()
=>
{
},
window
[
"slot
IdsTuia"
][
3
]
window
[
"slot
id"
]
)
)
},
this
);
},
this
);
}
else
{
}
else
{
...
...
egret/src/something/Tool.ts
View file @
88148681
...
@@ -397,55 +397,6 @@ export class Tool {
...
@@ -397,55 +397,6 @@ export class Tool {
return
false
;
return
false
;
}
}
/**
* 判断鸡蛋孵小鸡可飞入的索引
* 基础元素,无任何状态,类型不为鸡,石门非关闭
* @param lat
*/
public
static
judgeSetChicken
(
lat
:
Lattice
):
boolean
{
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
!
lat
.
element
.
hasAnyState
()
&&
lat
.
element
.
type
!==
ElementType
.
CHICKEN
&&
!
lat
.
doorClosed
)
{
return
true
;
}
return
false
;
}
/**
* 判断可被单魔力鸟效果消除的元素
* 是基础元素,非石门关闭,非魔力鸟,(基础类型的判断自行添加)
* @param lat
*/
public
static
judgeMagicEliminate
(
lat
:
Lattice
):
boolean
{
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
//是基础元素
!
lat
.
doorClosed
&&
//石门非关闭状态
lat
.
element
.
effectType
!=
EffectType
.
MAGICLION
//不能是魔力鸟特效
)
{
return
true
;
}
return
false
}
/**
* 判断
* 果冻可蔓延、
* 毛球可分裂、
* 毛球可跳动
* 的方向格子索引,暂时都一致,不区分
* 是基础元素,无任何状态,石门非关闭
* @param lat
*/
public
static
judgeAiActionDirection
(
lat
:
Lattice
):
boolean
{
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
!
lat
.
element
.
hasAnyState
()
&&
!
lat
.
doorClosed
)
{
return
true
;
}
return
false
;
}
/**
/**
* 判断元素是否可被手势选中和交换
* 判断元素是否可被手势选中和交换
...
...
egret/src/something/chapters/Chapter1.ts
View file @
88148681
...
@@ -689,7 +689,7 @@ export const Chapters1: ChapterData[] = [
...
@@ -689,7 +689,7 @@ export const Chapters1: ChapterData[] = [
],
],
},
},
},
},
//12
会开局消除,baseElements有问题
//12
{
{
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
bubbleProbability
:
0
,
bubbleProbability
:
0
,
...
...
egret/src/something/class/Element.ts
View file @
88148681
...
@@ -170,7 +170,7 @@ export class Element extends eui.Component {
...
@@ -170,7 +170,7 @@ export class Element extends eui.Component {
* 替换资源时,同时修改
* 替换资源时,同时修改
* @param source
* @param source
*/
*/
private
changeSource
(
source
:
string
)
{
changeSource
(
source
:
string
)
{
// this.showImage.source = source;
// this.showImage.source = source;
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
this
.
showImage
.
texture
=
texture
this
.
showImage
.
texture
=
texture
...
@@ -274,9 +274,8 @@ export class Element extends eui.Component {
...
@@ -274,9 +274,8 @@ export class Element extends eui.Component {
}
}
}
}
/**
* 去掉原先带的所有特效
*/
private
removeEffectHas
()
{
private
removeEffectHas
()
{
//回收掉原先有的
//回收掉原先有的
switch
(
this
.
_effectType
)
{
switch
(
this
.
_effectType
)
{
...
@@ -359,7 +358,7 @@ export class Element extends eui.Component {
...
@@ -359,7 +358,7 @@ export class Element extends eui.Component {
this
.
states
[
state
]
=
stateEx
;
this
.
states
[
state
]
=
stateEx
;
//视图添加
//视图添加
this
.
addChild
(
this
.
states
[
state
]);
this
.
addChild
(
this
.
states
[
state
]);
//气泡定制逻辑
,暂时没出现给特效元素设置气泡的操作,所以先不管,只对视图做简单处理
//气泡定制逻辑
if
(
state
===
StateType
.
BUBBLE
)
this
.
showImage
.
alpha
=
0
;
if
(
state
===
StateType
.
BUBBLE
)
this
.
showImage
.
alpha
=
0
;
}
}
}
}
...
...
egret/src/something/logic/AiControl.ts
View file @
88148681
...
@@ -27,8 +27,6 @@ const chickenNum: number = 4;
...
@@ -27,8 +27,6 @@ const chickenNum: number = 4;
//节日大红包的小红包数量
//节日大红包的小红包数量
export
const
fesELeSmallNum
:
number
=
6
;
export
const
fesELeSmallNum
:
number
=
6
;
//很多motion在石门关闭时都不能触发,暂时就只有石门,以后有多出来的再独立封装
export
class
AiControl
{
export
class
AiControl
{
private
static
_ins
:
AiControl
private
static
_ins
:
AiControl
/**
/**
...
@@ -200,7 +198,7 @@ export class AiControl {
...
@@ -200,7 +198,7 @@ export class AiControl {
var
lat
=
thisObj
.
lattices
[
a
];
var
lat
=
thisObj
.
lattices
[
a
];
//是基础元素,但是不能有任何状态, 考虑修改小红包属性为可fall,
//是基础元素,但是不能有任何状态, 考虑修改小红包属性为可fall,
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
!
lat
.
element
.
hasAnyState
()
&&
!
lat
.
element
.
hasAnyState
()
&&
!
lat
.
doorClosed
//石门未关闭
!
lat
.
doorClosed
//石门未关闭
)
{
)
{
redIndexs
.
push
(
a
);
redIndexs
.
push
(
a
);
...
@@ -378,7 +376,13 @@ export class AiControl {
...
@@ -378,7 +376,13 @@ export class AiControl {
for
(
var
a
=
0
;
a
<
thisObj
.
lattices
.
length
;
a
++
)
{
for
(
var
a
=
0
;
a
<
thisObj
.
lattices
.
length
;
a
++
)
{
var
lat
=
thisObj
.
lattices
[
a
];
var
lat
=
thisObj
.
lattices
[
a
];
//是基础元素,但是不能有任何状态,去掉鸡,且石门未关闭
//是基础元素,但是不能有任何状态,去掉鸡,且石门未关闭
if
(
Tool
.
judgeSetChicken
(
lat
))
chickenIndexs
.
push
(
a
);
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
!
lat
.
element
.
hasAnyState
()
&&
lat
.
element
.
type
!==
ElementType
.
CHICKEN
&&
!
lat
.
doorClosed
)
{
chickenIndexs
.
push
(
a
);
}
}
}
//如果没有能飞的格子,直接回调
//如果没有能飞的格子,直接回调
if
(
!
chickenIndexs
.
length
)
{
if
(
!
chickenIndexs
.
length
)
{
...
@@ -495,7 +499,10 @@ export class AiControl {
...
@@ -495,7 +499,10 @@ export class AiControl {
bubbleAni
.
play
(
fromType
,
type
,
()
=>
{
bubbleAni
.
play
(
fromType
,
type
,
()
=>
{
//显示
//显示
ele
.
visible
=
true
;
ele
.
visible
=
true
;
if
(
++
count
==
countAll
)
callback
();
count
++
;
if
(
count
==
countAll
)
{
callback
();
}
})
})
}
}
}
}
...
@@ -738,7 +745,7 @@ function judgeFesEleBigExist(lattices: Lattice[]) {
...
@@ -738,7 +745,7 @@ function judgeFesEleBigExist(lattices: Lattice[]) {
}
}
/**
/**
* 判断气泡是否存在
,废弃了,气泡会再生,提前判断无意义
* 判断气泡是否存在
* @param lattices
* @param lattices
*/
*/
function
judgeBubbleExist
(
lattices
:
Lattice
[])
{
function
judgeBubbleExist
(
lattices
:
Lattice
[])
{
...
@@ -807,7 +814,12 @@ function judgeActionIndex(index: number, lattices: Lattice[]): number {
...
@@ -807,7 +814,12 @@ function judgeActionIndex(index: number, lattices: Lattice[]): number {
while
(
arr
.
length
)
{
while
(
arr
.
length
)
{
var
rand
=
Math
.
floor
(
Math
.
random
()
*
arr
.
length
);
var
rand
=
Math
.
floor
(
Math
.
random
()
*
arr
.
length
);
var
i
=
arr
.
splice
(
rand
,
1
)[
0
];
var
i
=
arr
.
splice
(
rand
,
1
)[
0
];
if
(
Tool
.
judgeAiActionDirection
(
lattices
[
i
]))
return
i
;
if
(
Tool
.
judgeBaseEle
(
lattices
[
i
])
&&
!
lattices
[
i
].
element
.
hasAnyState
()
&&
!
lattices
[
i
].
doorClosed
)
{
return
i
}
}
}
return
null
return
null
}
}
...
...
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