Commit bc650908 authored by zjz1994's avatar zjz1994

新元素动画

parent 34b7e815
...@@ -322,6 +322,10 @@ export default class MainBase extends eui.UILayer { ...@@ -322,6 +322,10 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("ele43_png"); RES.getResAsync("ele43_png");
RES.getResAsync("ele44_png"); RES.getResAsync("ele44_png");
RES.getResAsync("ele45_png"); RES.getResAsync("ele45_png");
RES.getResAsync("ele42fn_png");
RES.getResAsync("ele43fn_png");
RES.getResAsync("ele44fn_png");
RES.getResAsync("ele45fn_png");
for (var i = 1; i <= 27; i++) { for (var i = 1; i <= 27; i++) {
RES.getResAsync("bonusFra" + i + "_png") RES.getResAsync("bonusFra" + i + "_png")
......
This diff is collapsed.
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<e:Image id="icon34" width="70" height="70" source="startpanel_ele34_png"/> <e:Image id="icon34" width="70" height="70" source="startpanel_ele34_png"/>
<e:Image id="icon36" width="70" height="70" source="startpanel_ele36_png"/> <e:Image id="icon36" width="70" height="70" source="startpanel_ele36_png"/>
<e:Image id="icon41" width="70" height="70" source="ele41_png"/> <e:Image id="icon41" width="70" height="70" source="ele41_png"/>
<e:Image id="icon42" source="ele42_png" scaleX="0.5" scaleY="0.5" y="-3" x="21"/> <e:Image id="icon42" scaleX="0.45" scaleY="0.45" y="-4" x="25" source="ele42fn_png"/>
<e:Image id="icon42_f" source="ele42_png" scaleX="0.5" scaleY="0.5" y="-3" x="21"/>
<e:Image id="icon43" source="ele43_png" scaleX="0.3" scaleY="0.3" x="1" y="1"/> <e:Image id="icon43" scaleX="0.3" scaleY="0.3" x="-3" y="-4" source="ele43fn_png"/>
<e:Image id="icon43_f" source="ele43_png" scaleX="0.3" scaleY="0.3" x="1" y="1"/>
<e:Image id="icon44" source="ele44_png" scaleX="0.4" scaleY="0.4" x="5" y="1"/> <e:Image id="icon44" scaleX="0.4" scaleY="0.4" x="2" y="1" source="ele44fn_png"/>
<e:Image id="icon44_f" source="ele44_png" scaleX="0.4" scaleY="0.4" x="5" y="1"/>
<e:Image id="icon45" source="ele45_png" scaleX="0.3" scaleY="0.3" y="13" x="0"/> <e:Image id="icon45" scaleX="0.3" scaleY="0.3" y="13" x="-1" source="ele45fn_png"/>
<e:Image id="icon45_f" source="ele45_png" scaleX="0.3" scaleY="0.3" y="13"/>
<e:BitmapLabel id="txt" text="0" font="nums4_fnt" verticalCenter="20.5" x="73.2" scaleX="0.85" scaleY="0.85"/> <e:BitmapLabel id="txt" text="0" font="nums4_fnt" verticalCenter="20.5" x="73.2" scaleX="0.85" scaleY="0.85"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -7237,29 +7237,29 @@ export default class MainScene extends Scene { ...@@ -7237,29 +7237,29 @@ export default class MainScene extends Scene {
var sizew:number; var sizew:number;
var sizeh:number; var sizeh:number;
if(type==ElementType.food1){ if(type==ElementType.food1){
tscale = 0.5; tscale = 0.45;
addx = 21; addx = 25;
addy = -3; addy = -4;
sizew = 93; sizew = 95;
sizeh = 159; sizeh = 177;
}else if(type==ElementType.food2){ }else if(type==ElementType.food2){
tscale = 0.3; tscale = 0.3;
addx = 1; addx = -3;
addy = 1; addy = -4;
sizew = 249; sizew = 249;
sizeh = 226; sizeh = 255;
}else if(type==ElementType.food3){ }else if(type==ElementType.food3){
tscale = 0.4; tscale = 0.4;
addx = 5; addx = 2;
addy = 1; addy = 1;
sizew = 170; sizew = 170;
sizeh = 169; sizeh = 169;
}else if(type==ElementType.food4){ }else if(type==ElementType.food4){
tscale = 0.3; tscale = 0.3;
addx = 0; addx = -1;
addy = 13; addy = 13;
sizew = 248; sizew = 248;
sizeh = 168; sizeh = 170;
} }
var foodsize = mainscene.getFoodeSize(type); var foodsize = mainscene.getFoodeSize(type);
var foodwid = foodsize[0]*tscale;//sizew*tscale; var foodwid = foodsize[0]*tscale;//sizew*tscale;
......
...@@ -12,10 +12,10 @@ export default class TargetItemRenderer extends eui.ItemRenderer { ...@@ -12,10 +12,10 @@ export default class TargetItemRenderer extends eui.ItemRenderer {
this['icon' + i].visible = false; this['icon' + i].visible = false;
} }
//食物特殊处理 //食物特殊处理
this['icon42_f'].visible = false; // this['icon42_f'].visible = false;
this['icon43_f'].visible = false; // this['icon43_f'].visible = false;
this['icon44_f'].visible = false; // this['icon44_f'].visible = false;
this['icon45_f'].visible = false; // this['icon45_f'].visible = false;
this['icon' + this.data.type].visible = true; this['icon' + this.data.type].visible = true;
......
...@@ -100,31 +100,31 @@ var a = { ...@@ -100,31 +100,31 @@ var a = {
}; };
// 取数据格式用,一般情况注释 // 取数据格式用,一般情况注释
// (function exportFile(chapters: ChapterData[]) { (function exportFile(chapters: ChapterData[]) {
// var obj = [] var obj = []
// for (var i = 1; i < chapters.length; i++) { for (var i = 1; i < chapters.length; i++) {
// var chapter: ChapterData = chapters[i] var chapter: ChapterData = chapters[i]
// var target: PassTargetData = chapter.passTarget var target: PassTargetData = chapter.passTarget
// var a: any = {}; var a: any = {};
// a["lev"] = i; a["lev"] = i;
// a["tar"] = []; a["tar"] = [];
// if (target.type == PassType.SCORE_TARGET) { if (target.type == PassType.SCORE_TARGET) {
// a["tar"].push({ "type": 1, "num": target.score }) a["tar"].push({ "type": 1, "num": target.score })
// } else { } else {
// for (var j = 0; j < target.elements.length; j++) { for (var j = 0; j < target.elements.length; j++) {
// var element = target.elements[j]; var element = target.elements[j];
// a["tar"].push({ "type": submitTran[element.type], "num": element.count }) a["tar"].push({ "type": submitTran[element.type], "num": element.count })
// } }
// } }
// if(!chapter.starScores || chapter.starScores.length <=0) if(!chapter.starScores || chapter.starScores.length <=0)
// throw new Error('starScores未配置'+i) throw new Error('starScores未配置'+i)
// a["one"] = chapter.starScores[0]; a["one"] = chapter.starScores[0];
// a["two"] = chapter.starScores[1]; a["two"] = chapter.starScores[1];
// a["three"] = chapter.starScores[2]; a["three"] = chapter.starScores[2];
// obj.push(a) obj.push(a)
// } }
// var file = new File([JSON.stringify(obj)], "cfg.json", { type: "text/plain;charset=utf-8" }); var file = new File([JSON.stringify(obj)], "cfg.json", { type: "text/plain;charset=utf-8" });
// window["saveAs"](file); window["saveAs"](file);
// })(chapters) })(chapters)
...@@ -73,45 +73,45 @@ export class ElementTarget extends egret.DisplayObjectContainer { ...@@ -73,45 +73,45 @@ export class ElementTarget extends egret.DisplayObjectContainer {
var imgx:number; var imgx:number;
var imgy:number; var imgy:number;
if(type==ElementType.food1){ if(type==ElementType.food1){
texture = RES.getRes("ele" + type + "_png"); texture = RES.getRes("ele" + type + "fn_png");
showImage = new egret.Bitmap(texture); showImage = new egret.Bitmap(texture);
imgwid = 93; imgwid = 95;
imghei = 159; imghei = 177;
imgscale = 0.5; imgscale = 0.45;
imgx = 21; imgx = 25;
imgy = -3; imgy = -4;
this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy); this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy);
}else if(type==ElementType.food2){ }else if(type==ElementType.food2){
texture = RES.getRes("ele" + type + "_png"); texture = RES.getRes("ele" + type + "fn_png");
showImage = new egret.Bitmap(texture); showImage = new egret.Bitmap(texture);
imgwid = 249; imgwid = 249;
imghei = 226; imghei = 255;
imgscale = 0.3; imgscale = 0.3;
imgx = 1; imgx = -3;
imgy = 1; imgy = -4;
this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy); this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy);
}else if(type==ElementType.food3){ }else if(type==ElementType.food3){
texture = RES.getRes("ele" + type + "_png"); texture = RES.getRes("ele" + type + "fn_png");
showImage = new egret.Bitmap(texture); showImage = new egret.Bitmap(texture);
imgwid = 170; imgwid = 170;
imghei = 169; imghei = 169;
imgscale = 0.4; imgscale = 0.4;
imgx = 5; imgx = 2;
imgy = 1; imgy = 1;
this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy); this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy);
}else if(type==ElementType.food4){ }else if(type==ElementType.food4){
texture = RES.getRes("ele" + type + "_png"); texture = RES.getRes("ele" + type + "fn_png");
showImage = new egret.Bitmap(texture); showImage = new egret.Bitmap(texture);
imgwid = 248; imgwid = 248;
imghei = 168; imghei = 170;
imgscale = 0.3; imgscale = 0.3;
imgx = 0; imgx = -1;
imgy = 13; imgy = 13;
this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy); this.setflyimg(texture,imgwid,imghei,imgscale,imgx,imgy);
}else{ }else{
......
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