Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
package net.pixvi.myr.battle
|
||||
{
|
||||
import com.greensock.TweenMax;
|
||||
import com.greensock.easing.Expo;
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Sprite;
|
||||
import net.pixvi.myr.battle.view.BattleBossPointUI;
|
||||
import net.pixvi.myr.battle.view.BattleMon;
|
||||
import net.pixvi.myrloader.center.MyrCenter;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
import net.pixvi.pfw.ui.controls.PiBitTextField;
|
||||
import net.pixvi.psg.ui.controller.PiLightButton;
|
||||
|
||||
public class BattleGroundTopUI extends UIComponent
|
||||
{
|
||||
|
||||
public var text_time:PiBitTextField;
|
||||
|
||||
public var text_wait1:PiBitTextField;
|
||||
|
||||
public var text_wait2:PiBitTextField;
|
||||
|
||||
public var text_name1:PiBitTextField;
|
||||
|
||||
public var text_name2:PiBitTextField;
|
||||
|
||||
public var ui_bossPoint:BattleBossPointUI;
|
||||
|
||||
public var ui_info1:BattleGroundMonInfoUI;
|
||||
|
||||
public var ui_info2:BattleGroundMonInfoUI;
|
||||
|
||||
public var mc_proKill:Sprite;
|
||||
|
||||
public var mc_desKill:Sprite;
|
||||
|
||||
public var btn_pause:PiLightButton;
|
||||
|
||||
public function BattleGroundTopUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
mc_desKill.visible = mc_proKill.visible = false;
|
||||
ui_info1.visible = ui_info2.visible = false;
|
||||
if(MyrCenter.channel == "XDG")
|
||||
{
|
||||
text_name1.scaleMode = true;
|
||||
text_name2.scaleMode = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function showProtectKill() : void
|
||||
{
|
||||
TweenMax.fromTo(mc_proKill,2,{
|
||||
"visible":true,
|
||||
"x":-87,
|
||||
"tint":16777215
|
||||
},{
|
||||
"x":-47,
|
||||
"tint":null,
|
||||
"visible":false,
|
||||
"ease":Expo.easeOut
|
||||
});
|
||||
TweenMax.fromTo(mc_proKill,2,{"alpha":1},{
|
||||
"delay":1,
|
||||
"alpha":0,
|
||||
"Ease":Expo.easeIn
|
||||
});
|
||||
}
|
||||
|
||||
public function showDestroyKill() : void
|
||||
{
|
||||
TweenMax.fromTo(mc_desKill,2,{
|
||||
"visible":true,
|
||||
"x":441,
|
||||
"tint":16777215
|
||||
},{
|
||||
"x":401,
|
||||
"tint":null,
|
||||
"visible":false,
|
||||
"ease":Expo.easeOut
|
||||
});
|
||||
TweenMax.fromTo(mc_desKill,1,{"alpha":1},{
|
||||
"delay":1,
|
||||
"alpha":0,
|
||||
"Ease":Expo.easeIn
|
||||
});
|
||||
}
|
||||
|
||||
public function updateByMon(mon:BattleMon) : void
|
||||
{
|
||||
if(mon.team == 1)
|
||||
{
|
||||
ui_info1.onMon(mon);
|
||||
ui_info1.visible = true;
|
||||
ui_info2.visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_info1.visible = false;
|
||||
ui_info2.onMon(mon);
|
||||
ui_info2.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function updateHpByMon(mon:BattleMon) : void
|
||||
{
|
||||
var info:BattleGroundMonInfoUI = null;
|
||||
if(mon.team == 1)
|
||||
{
|
||||
info = ui_info1;
|
||||
}
|
||||
else
|
||||
{
|
||||
info = ui_info2;
|
||||
}
|
||||
info.update(mon);
|
||||
}
|
||||
|
||||
public function lostSelect() : void
|
||||
{
|
||||
ui_info1.visible = ui_info2.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user