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
b76a017a
Commit
b76a017a
authored
Jan 14, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5a097179
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
69 deletions
+75
-69
getFriendSharePic.ts
egret/src/getFriendSharePic.ts
+2
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+1
-1
jellyMonsterAni.ts
egret/src/mainScene/jellyMonsterAni.ts
+6
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-1
HbCutTime.ts
egret/src/panels/HongbaoRain/HbCutTime.ts
+14
-14
HbGame.ts
egret/src/panels/HongbaoRain/HbGame.ts
+35
-35
HbPrize.ts
egret/src/panels/HongbaoRain/HbPrize.ts
+6
-6
RainMgr.ts
egret/src/panels/HongbaoRain/RainMgr.ts
+9
-9
RegTriangle.ts
egret/src/playScene/physics/RegTriangle.ts
+1
-1
No files found.
egret/src/getFriendSharePic.ts
View file @
b76a017a
...
...
@@ -8,7 +8,7 @@ import Loading from "../libs/new_wx/components/Loading";
class
FriendWxShare
extends
ComponentBase
{
start
()
{
const
data
=
getHomeData
();
this
[
'lvTxt'
].
text
=
data
.
levels
.
length
==
0
?
1
:
data
.
levels
.
length
;
this
[
'lvTxt'
].
text
=
data
.
levels
.
length
==
0
?
1
:
data
.
levels
.
length
;
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
const
{
data
:
user
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
this
[
'avatar'
].
source
=
user
.
avatar
;
...
...
@@ -36,6 +36,6 @@ export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer) =
img
.
src
=
base64
;
Loading
.
instace
.
hide
();
},
200
);
})
}
\ No newline at end of file
egret/src/mainScene/MainScene.ts
View file @
b76a017a
...
...
@@ -1977,7 +1977,7 @@ export default class MainScene extends Scene {
if
(
!
this
.
jellyBrokenMark
)
{
jellyMonsterAIResult
=
await
jellyMonsterAI
(
this
);
//0说明怪物没有地方可吐了
console
.
log
(
'干刚才吐了几个'
,
jellyMonsterAIResult
);
if
(
jellyMonsterAIResult
>
0
)
//吐了果冻相当于破了个果冻,那么不再蔓延
if
(
jellyMonsterAIResult
>
0
)
//吐了果冻相当于破了个果冻,那么不再蔓延
this
.
jellyBrokenMark
=
true
;
}
...
...
egret/src/mainScene/jellyMonsterAni.ts
0 → 100644
View file @
b76a017a
export
default
()
=>
{
//每次只有一个怪物吹气泡
return
new
Promise
((
r
)
=>
{
r
();
});
}
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
b76a017a
...
...
@@ -439,7 +439,7 @@ export default class MapScene extends Scene {
updateSign
()
{
const
{
signInfoVO
}
=
DataManager
.
ins
.
getData
(
'getSignInfo'
);
if
(
signInfoVO
&&
signInfoVO
.
continueDay
<
7
)
{
//表示明天还可以签到
if
(
signInfoVO
&&
signInfoVO
.
continueDay
<
7
)
{
//表示明天还可以签到
this
[
'sign_s1'
].
visible
=
signInfoVO
.
todaySigned
==
0
;
this
[
'sign_s2'
].
visible
=
!
this
[
'sign_s1'
].
visible
;
}
else
{
...
...
egret/src/panels/HongbaoRain/HbCutTime.ts
View file @
b76a017a
...
...
@@ -45,14 +45,14 @@ export default class HbCutTime extends Panel {
}
private
hbRainBaseInfo
(
updateData
?)
{
if
(
updateData
&&
updateData
.
data
)
{
if
(
updateData
&&
updateData
.
data
)
{
this
.
data
.
res
=
updateData
;
}
const
success
=
updateData
?
updateData
.
success
:
this
.
data
.
res
.
success
;
const
res
=
updateData
||
this
.
data
.
res
;
const
data
=
(
updateData
&&
updateData
.
data
)
||
this
.
data
.
res
.
data
;
if
(
!
success
)
{
if
(
!
success
)
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_soon_png'
;
this
.
tipImage
.
source
=
'hbCutTime_cutLine_disable_png'
;
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
...
...
@@ -60,7 +60,7 @@ export default class HbCutTime extends Panel {
}
this
.
cutTimer
=
this
.
cutTimer
||
new
CutTimer
(
this
.
cutTimeLabel
,
'hh时mm分ss秒'
,
async
()
=>
{
const
getData
=
await
this
.
getData
();
//重新获取数据
if
(
getData
.
success
)
{
if
(
getData
.
success
)
{
this
.
hbRainBaseInfo
(
getData
);
}
else
{
this
.
hidePanel
();
//没有数据关闭窗口
...
...
@@ -69,9 +69,9 @@ export default class HbCutTime extends Panel {
});
const
sysTime
=
res
.
timestamp
;
// 当前系统时间
let
time
;
if
(
data
.
currentSession
)
{
if
(
data
.
currentSession
)
{
time
=
data
.
currentSession
.
endTime
-
sysTime
+
3000
;
if
(
data
.
canJoin
)
{
if
(
data
.
canJoin
)
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_enable_png'
;
NetManager
.
ins
.
showLog
(
getlogItem
(
58
));
this
.
btnEffect
();
...
...
@@ -81,18 +81,18 @@ export default class HbCutTime extends Panel {
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
this
.
tipImage
.
source
=
'hbCutTime_cutLine_enable_png'
;
if
(
!
this
.
cutTimer
.
start
(
time
))
{
if
(
!
this
.
cutTimer
.
start
(
time
))
{
this
.
cutTimer
.
stop
();
this
.
cutTimer
.
start
(
time
);
}
}
else
if
(
data
.
nextSession
)
{
}
else
if
(
data
.
nextSession
)
{
egret
.
Tween
.
removeTweens
(
this
.
ok_btn
);
this
.
ok_btn
.
scaleX
=
this
.
ok_btn
.
scaleY
=
1
;
time
=
data
.
nextSession
.
startTime
-
sysTime
+
3000
;
this
.
ok_btn
.
source
=
'hbCutTime_btn_soon_png'
;
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
tipImage
.
source
=
'hbCutTime_cutLine_disable_png'
;
if
(
!
this
.
cutTimer
.
start
(
time
))
{
if
(
!
this
.
cutTimer
.
start
(
time
))
{
this
.
cutTimer
.
stop
();
this
.
cutTimer
.
start
(
time
);
}
...
...
@@ -105,8 +105,8 @@ export default class HbCutTime extends Panel {
private
btnEffect
()
{
egret
.
Tween
.
removeTweens
(
this
.
ok_btn
);
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
0.9
,
scaleY
:
1.1
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
1
,
scaleY
:
1
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
0.9
,
scaleY
:
1.1
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
1
,
scaleY
:
1
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
0.9618
,
scaleY
:
1.0618
...
...
@@ -123,7 +123,7 @@ export default class HbCutTime extends Panel {
}
destroy
()
{
if
(
this
.
cutTimer
)
{
if
(
this
.
cutTimer
)
{
this
.
cutTimer
.
stop
();
}
super
.
destroy
();
...
...
@@ -163,11 +163,11 @@ export default class HbCutTime extends Panel {
onTouchOK
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
58
));
try
{
if
(
window
[
'getRST'
])
window
[
'getRST'
]();
}
catch
(
error
)
{
if
(
window
[
'getRST'
])
window
[
'getRST'
]();
}
catch
(
error
)
{
console
.
warn
(
error
)
}
PanelCtrl
.
instance
.
show
(
'HbGame'
,
{
needScore
:
this
.
data
.
res
.
data
.
currentSession
.
limitScore
});
PanelCtrl
.
instance
.
show
(
'HbGame'
,
{
needScore
:
this
.
data
.
res
.
data
.
currentSession
.
limitScore
});
}
protected
get
closeBtns
():
eui
.
Button
[]
{
...
...
egret/src/panels/HongbaoRain/HbGame.ts
View file @
b76a017a
...
...
@@ -65,10 +65,10 @@ export default class HbGame extends Panel {
// 加分
private
addScore
(
score
:
number
)
{
this
.
score
+=
score
;
egret
.
Tween
.
get
(
this
.
scoreGroup
).
to
({
scaleX
:
1.3
,
scaleY
:
1.3
},
100
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
scoreGroup
).
to
({
scaleX
:
1.3
,
scaleY
:
1.3
},
100
).
call
(()
=>
{
this
.
scoreLabelStr
+=
score
;
this
.
scoreLabel
.
text
=
`
${
this
.
scoreLabelStr
}
`
;
egret
.
Tween
.
get
(
this
.
scoreGroup
).
to
({
scaleX
:
1
,
scaleY
:
1
},
100
);
egret
.
Tween
.
get
(
this
.
scoreGroup
).
to
({
scaleX
:
1
,
scaleY
:
1
},
100
);
});
}
...
...
@@ -82,8 +82,8 @@ export default class HbGame extends Panel {
private
hbDoJoin
()
{
let
session
=
DataManager
.
ins
.
getData
(
NetName
.
HBRAIN_BASEINFO
).
data
.
currentSession
.
sessionIndex
;
try
{
if
(
window
[
'getRST'
])
window
[
'getRST'
]();
}
catch
(
error
)
{
if
(
window
[
'getRST'
])
window
[
'getRST'
]();
}
catch
(
error
)
{
console
.
warn
(
error
)
}
NetManager
.
ins
.
hbRainDoJoin
((
success
,
res
)
=>
{
...
...
@@ -92,51 +92,51 @@ export default class HbGame extends Panel {
},
window
[
'collectRuleId'
]);
const
data
=
res
.
data
;
const
code
=
res
.
code
;
if
(
!
success
)
{
switch
(
true
)
{
if
(
!
success
)
{
switch
(
true
)
{
case
(
code
==
"600015"
):
// 网络错误 //命中风控参与规则
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
2
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
2
});
break
;
case
(
code
==
"600016"
):
// 游戏分数提交失败~如有疑问,请联系客服 // 苏宁风控 命中
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
2
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
2
});
break
;
case
(
code
==
"600054"
):
// 红包雨活动暂未开启
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600055"
):
// 红包雨场次配置异常
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600056"
):
// 当前红包雨场次不存在
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600057"
):
// 当前红包雨场次已结束
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600058"
):
// 分数未达到目标
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600059"
):
// 红包炸弹活动暂未开启
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600060"
):
// 当前场次参与次数达到上限
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600061"
):
// 红包炸弹配置异常
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
case
(
code
==
"600062"
):
// 红包炸弹已经全部领取
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
default
:
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
break
;
}
return
;
}
if
(
!
data
||
!
data
.
option
||
data
.
categoryType
==
1
)
{
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
if
(
!
data
||
!
data
.
option
||
data
.
categoryType
==
1
)
{
PanelCtrl
.
instance
.
show
(
"HbNoPrize"
,
{
type
:
1
});
}
else
{
let
_data
=
Utils
.
deepClone
(
data
);
_data
.
score
=
this
.
score
;
...
...
@@ -165,11 +165,11 @@ export default class HbGame extends Panel {
let
totalTime
:
number
=
this
.
totalTime
;
let
lastT
=
new
Date
().
getTime
();
let
dt
=
0
;
egret
.
startTick
(
function
(
timeStamp
:
number
):
boolean
{
egret
.
startTick
(
function
(
timeStamp
:
number
):
boolean
{
dt
=
(
new
Date
().
getTime
()
-
lastT
)
/
1000
;
cTime
+=
dt
;
if
(
cTime
>
totalTime
)
{
if
(
cTime
>
totalTime
)
{
cTime
=
0
;
}
angle
=
360
*
cTime
/
totalTime
;
...
...
@@ -197,13 +197,13 @@ export default class HbGame extends Panel {
private
timeCallFun
()
{
this
.
cutTimeLabel
.
text
=
`
${
--
this
.
time
}
`
;
if
(
this
.
time
<=
0
)
{
if
(
this
.
time
<=
0
)
{
this
.
gameOver
();
}
if
(
this
.
time
==
3
)
{
if
(
this
.
time
==
3
)
{
let
_y
=
this
.
cutTimerGroup
.
y
;
egret
.
Tween
.
get
(
this
.
cutTimerGroup
,
{
loop
:
true
}).
to
({
y
:
_y
+
10
},
100
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
cutTimerGroup
).
to
({
y
:
_y
},
100
);
egret
.
Tween
.
get
(
this
.
cutTimerGroup
,
{
loop
:
true
}).
to
({
y
:
_y
+
10
},
100
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
cutTimerGroup
).
to
({
y
:
_y
},
100
);
})
}
}
...
...
@@ -220,18 +220,18 @@ export default class HbGame extends Panel {
obj
.
anchorOffsetY
=
377
/
2
;
this
.
readyGroup
.
visible
=
true
;
obj
.
source
=
"hbGame_3_png"
,
obj
.
scaleX
=
obj
.
scaleY
=
_scaleMin
,
obj
.
alpha
=
1
;
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
obj
.
source
=
"hbGame_2_png"
,
obj
.
scaleX
=
obj
.
scaleY
=
_scaleMin
,
obj
.
alpha
=
1
;
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
obj
.
source
=
"hbGame_1_png"
,
obj
.
scaleX
=
obj
.
scaleY
=
_scaleMin
,
obj
.
alpha
=
1
;
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
this
.
readyGroup
.
visible
=
false
;
this
.
startGame
();
egret
.
Tween
.
get
(
this
.
timeBtn
).
to
({
y
:
8
},
100
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
timeBtn
).
to
({
y
:
0
},
100
);
egret
.
Tween
.
get
(
this
.
timeBtn
).
to
({
y
:
8
},
100
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
timeBtn
).
to
({
y
:
0
},
100
);
});
})
});
...
...
@@ -243,7 +243,7 @@ export default class HbGame extends Panel {
private
readyTipsEffect
()
{
this
.
readyGroup
.
alpha
=
0
;
egret
.
Tween
.
get
(
this
.
readyGroup
).
to
({
alpha
:
1
},
300
).
call
(()
=>
this
.
readyTimeEffect
());
egret
.
Tween
.
get
(
this
.
readyGroup
).
to
({
alpha
:
1
},
300
).
call
(()
=>
this
.
readyTimeEffect
());
}
protected
onSkinComplete
()
{
...
...
egret/src/panels/HongbaoRain/HbPrize.ts
View file @
b76a017a
...
...
@@ -11,9 +11,9 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
* 红包雨奖励
*/
export
default
class
HbPrize
extends
Panel
{
public
ok_btn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
tipLabel
:
eui
.
Label
;
public
ok_btn
:
eui
.
Button
;
public
closeBtn
:
eui
.
Button
;
public
tipLabel
:
eui
.
Label
;
constructor
(
data
)
{
super
();
...
...
@@ -31,10 +31,10 @@ export default class HbPrize extends Panel {
}
updateOption
(
option
:
any
)
{
const
{
categoryType
,
img
,
num
,
propType
,
realValue
}
=
option
;
// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
const
{
categoryType
,
img
,
num
,
propType
,
realValue
}
=
option
;
// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this
[
'propnums'
].
text
=
'x1'
;
if
(
num
)
if
(
num
)
this
[
'propnums'
].
text
=
'x'
+
num
;
switch
(
categoryType
)
{
case
2
:
...
...
@@ -81,7 +81,7 @@ export default class HbPrize extends Panel {
onTouchOK
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
59
));
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
changeMapScene
();
super
.
hidePanel
();
return
;
...
...
egret/src/panels/HongbaoRain/RainMgr.ts
View file @
b76a017a
...
...
@@ -25,7 +25,7 @@ export default class RainMgr {
this
.
timer
.
stop
();
// 停止计时器
// 隐藏全部掉落物品
for
(
let
v
of
this
.
rainGroup
.
$children
)
{
for
(
let
v
of
this
.
rainGroup
.
$children
)
{
v
.
visible
=
false
;
}
}
...
...
@@ -43,16 +43,16 @@ export default class RainMgr {
// 添加掉落物品
private
addRain
()
{
let
num
=
Utils
.
RandomInt
(
3
,
6
);
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
let
newRainObj
=
this
.
rainPool
.
get
();
if
(
!
newRainObj
)
{
if
(
!
newRainObj
)
{
newRainObj
=
new
RainObj
({
key
:
RainData
.
key
[
~~
(
Math
.
random
()
*
RainData
.
key
.
length
)],
rainGroup
:
this
.
rainGroup
,
pool
:
this
.
rainPool
,
pool
:
this
.
rainPool
,
});
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
newRainObj
.
addStage
((
this
.
rainGroup
.
width
)
/
num
*
i
+
100
,
Utils
.
RandomInt
(
6
,
9
)
/
10
);
},
Utils
.
RandomInt
(
0
,
8
)
*
100
);
}
...
...
@@ -60,16 +60,16 @@ export default class RainMgr {
private
addPool
()
{
this
.
rainPool
=
new
Pooling
();
for
(
let
v
of
RainData
.
key
)
{
for
(
let
v
of
RainData
.
key
)
{
let
num
=
1
;
if
(
v
==
'hongbao'
)
{
if
(
v
==
'hongbao'
)
{
num
=
45
;
}
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
let
newObj
=
new
RainObj
({
key
:
v
,
rainGroup
:
this
.
rainGroup
,
pool
:
this
.
rainPool
,
pool
:
this
.
rainPool
,
});
this
.
rainPool
.
push
(
newObj
);
}
...
...
egret/src/playScene/physics/RegTriangle.ts
View file @
b76a017a
...
...
@@ -16,7 +16,7 @@ export class RegTriangle extends RegPolygon {
constructor
(
length
,
view
)
{
super
(
length
,
view
);
this
.
type
=
"regTriangle"
;
this
.
type
=
"regTriangle"
;
this
.
pointLength
=
this
.
length
*
sqrt3
/
3
;
this
.
sideLength
=
this
.
length
*
sqrt3
/
6
;
}
...
...
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