Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package net.pixvi.myr.battle
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.MovieClip;
|
||||
import net.pixvi.myr.battle.view.BattleMon;
|
||||
import net.pixvi.myr.element.battle.BattleMonVo;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
import net.pixvi.pfw.ui.containers.PiImgContainer;
|
||||
import net.pixvi.pfw.ui.controls.PiBar;
|
||||
import net.pixvi.pfw.ui.controls.PiBitTextField;
|
||||
import net.pixvi.pfw.utils.Paster;
|
||||
|
||||
public class BattleGroundMonInfoUI extends UIComponent
|
||||
{
|
||||
|
||||
public var text_name:PiBitTextField;
|
||||
|
||||
public var bar_hp:PiBar;
|
||||
|
||||
public var text_hp:PiBitTextField;
|
||||
|
||||
public var container_avatar:PiImgContainer;
|
||||
|
||||
public var text_level:PiBitTextField;
|
||||
|
||||
public var mc_board:MovieClip;
|
||||
|
||||
public function BattleGroundMonInfoUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
container_avatar.setSize(75,75);
|
||||
if(mc_board != null)
|
||||
{
|
||||
mc_board.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public function onMon(mon:BattleMon) : void
|
||||
{
|
||||
if(mon.team == 1)
|
||||
{
|
||||
mc_board.gotoAndStop(mon.vo.quality);
|
||||
}
|
||||
text_level.htmlText = Paster.font("LV:",null,20) + Paster.font(mon.monVo.level.toString(),null,28);
|
||||
text_name.text = mon.monVo.name;
|
||||
bar_hp.setValue(mon.monVo.hp,mon.monVo.hpMax,0,false);
|
||||
text_hp.text = mon.monVo.hp + "/" + mon.monVo.hpMax;
|
||||
container_avatar.loadNetBitImg(mon.vo.getImg("avatar"),true,true,0);
|
||||
}
|
||||
|
||||
public function update(mon:BattleMon) : void
|
||||
{
|
||||
bar_hp.setValue(mon.monVo.hp,mon.monVo.hpMax,0,true);
|
||||
text_hp.text = mon.monVo.hp + "/" + mon.monVo.hpMax;
|
||||
}
|
||||
|
||||
public function updateByVo(monVo:BattleMonVo) : void
|
||||
{
|
||||
bar_hp.setValue(monVo.hp,monVo.hpMax,0,true);
|
||||
text_hp.text = monVo.hp + "/" + monVo.hpMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user