Commit d01ab80f authored by wildfirecode's avatar wildfirecode

1

parent 8ac8b381
......@@ -2,13 +2,17 @@ import ComponentBase from "../../libs/new_wx/components/ComponentBase";
import MapTopPart from "./MapTopPart";
import MapScene from "./MapScene";
import MapStarComp from "./MapStarComp";
import { createData } from "../startScene/StartScene";
export default class MapRpeatPart extends ComponentBase {
static LEVEL_NUMS = 13;
private _index;
constructor(i) {
private _topHeight;
constructor(i,topHeight) {
super();
this._index = i;
this._topHeight=topHeight;
createData()
}
start() {
......@@ -28,6 +32,7 @@ export default class MapRpeatPart extends ComponentBase {
star.loadSkin(); star.start();
MapScene.starHash[levelOrder] = star;
icon.addChild(star);
icon['visibleY'] = this._topHeight + this
}
this['animal1'].visible = this._index % 2;
......
......@@ -165,7 +165,7 @@ export default class MapScene extends Scene {
this['rect'].scaleX = 0.5
//进度条文本发光
setGlow(this['totalStarTxt'], 0x0083e8, 1);
this.topPart = data.top;
this.repeatsPart = data.list;
this.bottomPart = data.bottom;
......
......@@ -21,7 +21,7 @@ export default class MapTopPart extends ComponentBase {
this.removeChild(icon);
icon['mappart']=this;
icon.show = ()=>{this.addChild(icon)};
console.log(icon.y)
icon['visibleY'] = icon.y;
}
}
......
......@@ -120,7 +120,7 @@ export const createData = () => {
const repeatCount =getRepeatCount();
for (let i = 0; i < repeatCount; i++) {
const repeat = new MapRpeatPart(i);
const repeat = new MapRpeatPart(i,startSceneData.top.height);
repeat.loadSkin(); repeat.start();
list.push(repeat);
}
......
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