Commit b76a017a authored by wildfirecode's avatar wildfirecode

1

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