Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Sprite;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
import net.pixvi.psg.ui.controller.PiLightButton;
|
||||
|
||||
public class FillMenuUI extends UIComponent
|
||||
{
|
||||
|
||||
public var btn_short:PiLightButton;
|
||||
|
||||
public var btn_long:PiLightButton;
|
||||
|
||||
public var btn_moreStar:PiLightButton;
|
||||
|
||||
public var btn_select:PiLightButton;
|
||||
|
||||
public var mc_font:Sprite;
|
||||
|
||||
public function FillMenuUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
mc_font.mouseChildren = mc_font.mouseEnabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.geom.Rectangle;
|
||||
import net.pixvi.common.effect.effects.FlashEffect;
|
||||
import net.pixvi.common.utils.Engine2D;
|
||||
import net.pixvi.common.utils.Gesturer;
|
||||
import net.pixvi.common.utils.StageLocator;
|
||||
import net.pixvi.common.view.FF;
|
||||
import net.pixvi.myr.GameSetting;
|
||||
import net.pixvi.myr.center.Master;
|
||||
import net.pixvi.myr.center.StackCenter;
|
||||
import net.pixvi.myr.element.mon.MonsterVo;
|
||||
import net.pixvi.myr.element.stack.StackVo;
|
||||
import net.pixvi.myr.event.MYREvent;
|
||||
import net.pixvi.myr.panel.ground.GroundArea;
|
||||
import net.pixvi.myr.view.mon.GroundMon;
|
||||
import net.pixvi.myr.view.stack.StackView;
|
||||
import net.pixvi.pfw.display.BitMovieClip;
|
||||
import net.pixvi.pfw.display.PiSprite;
|
||||
import net.pixvi.pfw.driver.EnterFrameDriver;
|
||||
import net.pixvi.pfw.event.PiEvent;
|
||||
import net.pixvi.pfw.utils.Director;
|
||||
import net.pixvi.pfw.utils.Locator;
|
||||
import net.pixvi.pfw.utils.Rectanger;
|
||||
import net.pixvi.pfw.utils.broadcast.GlobalBroadcast;
|
||||
|
||||
public class StackGround extends PiSprite
|
||||
{
|
||||
|
||||
public var ui:StackGroundUI;
|
||||
|
||||
public var groundArea:GroundArea;
|
||||
|
||||
public var playing:Boolean = false;
|
||||
|
||||
public var dragGesture:Gesturer;
|
||||
|
||||
public var dragEngine:Engine2D;
|
||||
|
||||
public var oriArea:Rectangle;
|
||||
|
||||
public var dragRec:Rectangle;
|
||||
|
||||
public var draglock:Boolean = false;
|
||||
|
||||
private var buffStacks:Array = [];
|
||||
|
||||
public function StackGround()
|
||||
{
|
||||
super();
|
||||
dragEngine = new Engine2D(0,0,0,0,0.86);
|
||||
}
|
||||
|
||||
public function startup() : void
|
||||
{
|
||||
ui = new StackGroundUI(FF.getMC("ui.StackGroundUI1"));
|
||||
addChild(ui);
|
||||
StageLocator.setfullWithNoFix(ui);
|
||||
ui.x = ui.y = 0;
|
||||
oriArea = Rectanger.dis2Rect(ui);
|
||||
dragGesture = new Gesturer(ui.mc_bg,true);
|
||||
dragGesture.addEventListener(Gesturer.DRAG,dragHandler);
|
||||
dragGesture.start();
|
||||
groundArea = new GroundArea(Rectanger.dis2Rect(ui.mc_area));
|
||||
groundArea.stackPoints = ui.points;
|
||||
groundArea.addEventListener(MYREvent.STACK_DRAG,dragHandler);
|
||||
groundArea.addEventListener(MYREvent.STACK_DRAG_OVER,dragOverHandler);
|
||||
ui.addChild(groundArea);
|
||||
Locator.setInStageRectangleByDisplay(this);
|
||||
buildStack();
|
||||
GlobalBroadcast.addEventListener(MYREvent.MONSTER_ADD_STACK,addStackMonHandler);
|
||||
GlobalBroadcast.addEventListener(MYREvent.STACK_ADD,stackAddHandler);
|
||||
}
|
||||
|
||||
public function dragHandler(e:Event = null) : void
|
||||
{
|
||||
if(draglock)
|
||||
{
|
||||
return;
|
||||
}
|
||||
dragRec = Locator.getInStageRectangleWithFix(oriArea.width,oriArea.height,this.x,this.y);
|
||||
GameSetting.fixDragRecWithMainUI(dragRec);
|
||||
this.startMoveDrag(false,dragRec);
|
||||
dragGesture.addEventListener(Gesturer.TAP_OVER,dragOverHandler);
|
||||
}
|
||||
|
||||
public function dragOverHandler(e:Event = null) : void
|
||||
{
|
||||
var o:Object = null;
|
||||
dragGesture.removeEventListener(Gesturer.TAP_OVER,dragOverHandler);
|
||||
if(e.type == MYREvent.STACK_DRAG_OVER)
|
||||
{
|
||||
o = (e as PiEvent).data;
|
||||
dragEngine.speedX = o.speedX;
|
||||
dragEngine.speedY = o.speedY;
|
||||
}
|
||||
else
|
||||
{
|
||||
dragEngine.speedX = dragGesture.speedX;
|
||||
dragEngine.speedY = dragGesture.speedY;
|
||||
}
|
||||
this.stopMoveDrag();
|
||||
EnterFrameDriver.getInstance().regist(afterDragHandler);
|
||||
}
|
||||
|
||||
public function afterDragHandler(e:Event = null) : void
|
||||
{
|
||||
if(dragEngine.hasSpeed && dragRec != null)
|
||||
{
|
||||
dragEngine.step(this);
|
||||
dragEngine.autoSetSpeedByViewInRect(this,dragRec);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnterFrameDriver.getInstance().remove(afterDragHandler);
|
||||
}
|
||||
}
|
||||
|
||||
public function addStackMonHandler(e:PiEvent = null) : void
|
||||
{
|
||||
groundArea.addStackMonsterByVo(e.data as MonsterVo);
|
||||
}
|
||||
|
||||
public function stackAddHandler(e:MYREvent) : void
|
||||
{
|
||||
var i:int = (e.data as StackVo).position;
|
||||
var mv:BitMovieClip = FF.getBMC("ui.StarShow",60);
|
||||
mv.x = groundArea.stacks[i].x;
|
||||
mv.y = groundArea.stacks[i].y - 60;
|
||||
mv.rotation = Math.random() * 360;
|
||||
Director.playOnce(mv);
|
||||
mv.mouseChildren = mv.mouseEnabled = false;
|
||||
ui.addChild(mv);
|
||||
new FlashEffect(900,16777215).startEffect(groundArea.stacks[i]);
|
||||
groundArea.stacks[i].init(e.data,groundArea);
|
||||
}
|
||||
|
||||
private function buildStack() : void
|
||||
{
|
||||
var i:int = 0;
|
||||
var j:int = 0;
|
||||
var cm:MonsterVo = null;
|
||||
var stackmons:Array = StackCenter.getIns().getStackMonsters();
|
||||
var len:int = ui.pointsMax;
|
||||
var stacks:Array = new Array(len);
|
||||
for each(var s:StackVo in Master.stacks)
|
||||
{
|
||||
stacks[s.position] = s;
|
||||
}
|
||||
for(i = 0; i < len; )
|
||||
{
|
||||
if(stacks[i] != null)
|
||||
{
|
||||
groundArea.addStackByVo(stacks[i],i);
|
||||
}
|
||||
else
|
||||
{
|
||||
groundArea.addStackByVo(null,i);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for each(var m:MonsterVo in stackmons)
|
||||
{
|
||||
groundArea.addStackMonsterByVo(m);
|
||||
}
|
||||
for(j = 0; j < Master.history.numChicken; )
|
||||
{
|
||||
cm = new MonsterVo();
|
||||
cm.init(997001);
|
||||
cm.setLocalMode(2);
|
||||
cm.id = 0;
|
||||
groundArea.addStackMonsterByVo(cm,true);
|
||||
j++;
|
||||
}
|
||||
buffStacks = stacks;
|
||||
}
|
||||
|
||||
public function pause() : void
|
||||
{
|
||||
EnterFrameDriver.getInstance().remove(afterDragHandler);
|
||||
playing = false;
|
||||
groundArea.pause();
|
||||
}
|
||||
|
||||
public function resume() : void
|
||||
{
|
||||
playing = true;
|
||||
groundArea.resume();
|
||||
}
|
||||
|
||||
public function update() : void
|
||||
{
|
||||
for each(var mon:GroundMon in groundArea.monsters)
|
||||
{
|
||||
if(mon.vo.process != 2)
|
||||
{
|
||||
groundArea.removeMonster(mon);
|
||||
}
|
||||
}
|
||||
for each(var s:StackView in groundArea.stacks)
|
||||
{
|
||||
s.update();
|
||||
}
|
||||
}
|
||||
|
||||
override public function dispose() : void
|
||||
{
|
||||
groundArea.dispose();
|
||||
EnterFrameDriver.getInstance().remove(afterDragHandler);
|
||||
GlobalBroadcast.removeEventListener(MYREvent.MONSTER_ADD_STACK,addStackMonHandler);
|
||||
GlobalBroadcast.removeEventListener(MYREvent.STACK_ADD,stackAddHandler);
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import com.greensock.TimelineMax;
|
||||
import com.greensock.TweenMax;
|
||||
import com.greensock.easing.Back;
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
import net.pixvi.common.center.SoundCenter;
|
||||
import net.pixvi.common.driver.ActivityDriver;
|
||||
import net.pixvi.common.driver.StageDriver;
|
||||
import net.pixvi.common.system.language.lang;
|
||||
import net.pixvi.common.utils.Alert;
|
||||
import net.pixvi.common.utils.Gesturer;
|
||||
import net.pixvi.common.view.FF;
|
||||
import net.pixvi.myr.CP;
|
||||
import net.pixvi.myr.GameSetting;
|
||||
import net.pixvi.myr.center.GuideCenter;
|
||||
import net.pixvi.myr.center.Master;
|
||||
import net.pixvi.myr.center.MonsterCenter;
|
||||
import net.pixvi.myr.center.PosCenter;
|
||||
import net.pixvi.myr.center.StackCenter;
|
||||
import net.pixvi.myr.center.Table;
|
||||
import net.pixvi.myr.center.TaskCenter;
|
||||
import net.pixvi.myr.element.guide.GMain;
|
||||
import net.pixvi.myr.element.guide.GSub;
|
||||
import net.pixvi.myr.element.snd.GameSound;
|
||||
import net.pixvi.myr.panel.egg.EggSelectPanel;
|
||||
import net.pixvi.myr.panel.gacha.GachaPanel;
|
||||
import net.pixvi.myr.panel.mainmenu.MainMenu;
|
||||
import net.pixvi.myr.panel.roomselect.RoomSelectPanel;
|
||||
import net.pixvi.myr.panel.storeground.StoreGroundPanel;
|
||||
import net.pixvi.myr.panel.story.StoryPanel;
|
||||
import net.pixvi.pfw.display.PiSprite;
|
||||
import net.pixvi.pfw.event.MobiEvent;
|
||||
import net.pixvi.pfw.utils.core.Singleton;
|
||||
import net.pixvi.psg.driver.GuideDriver;
|
||||
import net.pixvi.psg.ui.PSGPopPanel;
|
||||
|
||||
public class StackGroundPanel extends PSGPopPanel
|
||||
{
|
||||
|
||||
public var ui:StackGroundPanelUI = new StackGroundPanelUI();
|
||||
|
||||
public var ground:StackGround;
|
||||
|
||||
public var showOutMode:String = "";
|
||||
|
||||
public function StackGroundPanel(showTime:Number = -1, hideTime:Number = -1)
|
||||
{
|
||||
super(showTime,hideTime);
|
||||
ground = new StackGround();
|
||||
ground.startup();
|
||||
var container:Sprite = new Sprite();
|
||||
container.addChild(ground);
|
||||
addChild(container);
|
||||
addChild(ui);
|
||||
ui.ui_bottom.btn_fill.onClick(clickHandler);
|
||||
ui.ui_bottom.btn_get.onClick(clickHandler);
|
||||
ui.ui_bottom.btn_sell.onClick(clickHandler);
|
||||
ui.ui_bottom.btn_storeGround.onClick(clickHandler);
|
||||
ui.ui_bottom.ui_fillMenu.btn_long.onClick(fillHandler);
|
||||
ui.ui_bottom.ui_fillMenu.btn_moreStar.onClick(fillHandler);
|
||||
ui.ui_bottom.ui_fillMenu.btn_short.onClick(fillHandler);
|
||||
ui.ui_bottom.ui_fillMenu.btn_select.onClick(selectFillHandler);
|
||||
ui.ui_top.btn_gacha.onClick(clickHandler);
|
||||
ground.dragGesture.addEventListener(Gesturer.DRAG,dragAndHideFillMenu);
|
||||
}
|
||||
|
||||
public static function getIns() : StackGroundPanel
|
||||
{
|
||||
return Singleton.getInstanceOrCreate(StackGroundPanel) as StackGroundPanel;
|
||||
}
|
||||
|
||||
public function addMoneyShow(x:Number, y:Number, num:int = -1) : void
|
||||
{
|
||||
var time:Number = NaN;
|
||||
var img:PiSprite = FF.getBS("ui.MoneyShowImg");
|
||||
img.x = x;
|
||||
img.y = y;
|
||||
if(num == -1)
|
||||
{
|
||||
time = Math.random() * 0.3;
|
||||
}
|
||||
else
|
||||
{
|
||||
time = num * 0.1;
|
||||
}
|
||||
var t:TimelineMax = new TimelineMax();
|
||||
t.to(img,1.5 + time,{"bezierThrough":[{
|
||||
"x":StageDriver.stageWidth / 2,
|
||||
"y":StageDriver.stageHeight / 2
|
||||
},{
|
||||
"x":StageDriver.stageWidth / 2 + 160,
|
||||
"y":20
|
||||
}]});
|
||||
t.to(img,0.4,{
|
||||
"scaleX":0.1,
|
||||
"scaleY":0.1,
|
||||
"ease":Back.easeIn,
|
||||
"onComplete":img.dispose
|
||||
});
|
||||
addChild(img);
|
||||
}
|
||||
|
||||
override public function dispose() : void
|
||||
{
|
||||
if(!buffMode)
|
||||
{
|
||||
ActivityDriver.getIns().remove(activity,deactivity);
|
||||
ground.dispose();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
public function clickHandler(e:Event = null) : void
|
||||
{
|
||||
var arr:Array = null;
|
||||
switch(e.target)
|
||||
{
|
||||
case ui.ui_bottom.btn_fill:
|
||||
showFillMenu(e);
|
||||
break;
|
||||
case ui.ui_bottom.btn_get:
|
||||
arr = StackCenter.getIns().getMonsterCanFromStack();
|
||||
if(arr.length > 0)
|
||||
{
|
||||
RoomSelectPanel.getIns().modePushMon(arr);
|
||||
RoomSelectPanel.getIns().popIn();
|
||||
}
|
||||
break;
|
||||
case ui.ui_bottom.btn_storeGround:
|
||||
showOutMode = "out";
|
||||
this.showOut();
|
||||
EggSelectPanel.getIns().dispose();
|
||||
EggSelectPanel.getIns().removeIns();
|
||||
StoreGroundPanel.getIns().popInWith(this);
|
||||
break;
|
||||
case ui.ui_bottom.btn_sell:
|
||||
autoSellHandler();
|
||||
break;
|
||||
case ui.ui_top.btn_gacha:
|
||||
GachaPanel.popInGacha(Table.game_setting.normalKeShop);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateTask(e:Event = null) : void
|
||||
{
|
||||
if(TaskCenter.getIns().hasTaskByPosition("farm"))
|
||||
{
|
||||
ui.ui_bottom.mc_taskTip_farm.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.ui_bottom.mc_taskTip_farm.visible = false;
|
||||
}
|
||||
ui.update();
|
||||
}
|
||||
|
||||
public function fillHandler(e:Event = null) : void
|
||||
{
|
||||
if(Master.bag.getEggArr().length == 0)
|
||||
{
|
||||
Alert.showMsg(lang("一个蛋也没有了!"));
|
||||
return;
|
||||
}
|
||||
switch(e.currentTarget)
|
||||
{
|
||||
case ui.ui_bottom.ui_fillMenu.btn_long:
|
||||
StackCenter.getIns().autoFillEggToStack(2);
|
||||
break;
|
||||
case ui.ui_bottom.ui_fillMenu.btn_short:
|
||||
StackCenter.getIns().autoFillEggToStack(1);
|
||||
break;
|
||||
case ui.ui_bottom.ui_fillMenu.btn_moreStar:
|
||||
StackCenter.getIns().autoFillEggToStack(3);
|
||||
}
|
||||
}
|
||||
|
||||
private function selectFillHandler(e:Event = null) : void
|
||||
{
|
||||
if(Master.bag.getEggArr().length == 0)
|
||||
{
|
||||
Alert.showMsg(lang("一个蛋也没有了!"));
|
||||
return;
|
||||
}
|
||||
EggSelectPanel.getIns().modeSingle();
|
||||
EggSelectPanel.getIns().popIn();
|
||||
EggSelectPanel.getIns().addEventListener("complete",selectFillComplete);
|
||||
}
|
||||
|
||||
private function selectFillComplete(e:Event = null) : void
|
||||
{
|
||||
EggSelectPanel.getIns().removeEventListener("complete",selectFillComplete);
|
||||
if(EggSelectPanel.selectedComplete)
|
||||
{
|
||||
StackCenter.getIns().autoFillEggToStack(1,null,EggSelectPanel.selectedEgg);
|
||||
}
|
||||
}
|
||||
|
||||
public function showFillMenu(e:Event = null) : void
|
||||
{
|
||||
if(ui.ui_bottom.ui_fillMenu.visible)
|
||||
{
|
||||
closeMenuHandler();
|
||||
}
|
||||
else
|
||||
{
|
||||
TweenMax.fromTo(ui.ui_bottom.ui_fillMenu,0.2,{"scaleY":0.5},{
|
||||
"scaleY":1,
|
||||
"ease":Back.easeOut
|
||||
});
|
||||
ui.ui_bottom.ui_fillMenu.visible = true;
|
||||
if(e != null)
|
||||
{
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
StageDriver.stage.addEventListener(MobiEvent.CLICK,closeMenuHandler);
|
||||
}
|
||||
}
|
||||
|
||||
private function dragAndHideFillMenu(e:Event = null) : void
|
||||
{
|
||||
closeMenuHandler();
|
||||
}
|
||||
|
||||
public function closeMenuHandler(e:Event = null) : void
|
||||
{
|
||||
StageDriver.stage.removeEventListener(MobiEvent.CLICK,closeMenuHandler);
|
||||
ui.ui_bottom.ui_fillMenu.visible = false;
|
||||
}
|
||||
|
||||
public function autoSellHandler(e:Event = null) : void
|
||||
{
|
||||
Alert.yesno(lang("自动派遣"),lang("是否派遣 {0} 的普通成年魔物?",CP.mon(lang("2星以下"))),yesSellHandler);
|
||||
}
|
||||
|
||||
public function yesSellHandler(e:Event = null) : void
|
||||
{
|
||||
MonsterCenter.getIns().autoSell();
|
||||
}
|
||||
|
||||
private function enableMouse() : void
|
||||
{
|
||||
ui.mouseChildren = ui.mouseEnabled = true;
|
||||
}
|
||||
|
||||
override public function init() : void
|
||||
{
|
||||
showOutMode = "";
|
||||
ui.mouseChildren = ui.mouseEnabled = false;
|
||||
if(openPanel is StoreGroundPanel)
|
||||
{
|
||||
TweenMax.fromTo(ground,GameSetting.PanelTransTime,{
|
||||
"scaleX":0.95,
|
||||
"scaleY":0.95,
|
||||
"alpha":0
|
||||
},{
|
||||
"scaleX":1,
|
||||
"scaleY":1,
|
||||
"alpha":1,
|
||||
"onComplete":enableMouse
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
TweenMax.fromTo(ground,GameSetting.PanelTransTime,{"alpha":0},{
|
||||
"alpha":1,
|
||||
"onComplete":enableMouse
|
||||
});
|
||||
}
|
||||
addChild(MainMenu.getIns(this));
|
||||
MainMenu.getIns().onIn();
|
||||
MainMenu.getIns().ui.stackGroundMode();
|
||||
addChild(ui);
|
||||
PosCenter.activity("stackGround");
|
||||
SoundCenter.getIns().bgmPlay(GameSound.bgm_farm);
|
||||
ground.resume();
|
||||
ActivityDriver.getIns().regist(activity,deactivity);
|
||||
MonsterCenter.getIns().resetNewGrowUp();
|
||||
guide();
|
||||
updateTask();
|
||||
ui.update();
|
||||
ui.ui_bottom.btn_event.loadByBtnData(Table.activity_info.specialBtn.stackBtn);
|
||||
ui.ui_bottom.btn_event2.loadByBtnData(Table.activity_info.specialBtn.stack2Btn);
|
||||
MonsterCenter.getIns().startSecondListener();
|
||||
}
|
||||
|
||||
override public function showOut() : void
|
||||
{
|
||||
if(showOutMode == "out")
|
||||
{
|
||||
TweenMax.fromTo(ground,GameSetting.PanelTransTime,{
|
||||
"scaleX":1,
|
||||
"scaleY":1
|
||||
},{
|
||||
"scaleX":1,
|
||||
"scaleY":0.95,
|
||||
"onComplete":showOutEnd
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
TweenMax.fromTo(ground,GameSetting.PanelTransTime,{},{"onComplete":showOutEnd});
|
||||
}
|
||||
baseShowOut();
|
||||
}
|
||||
|
||||
public function guide() : void
|
||||
{
|
||||
if(GuideCenter.getIns().checkCur(GMain.stackMon1))
|
||||
{
|
||||
GuideCenter.getIns().fin();
|
||||
StoryPanel.getIns().start("sys_guide_2a",guide);
|
||||
}
|
||||
else if(GuideCenter.getIns().checkCur(GMain.stackMon2))
|
||||
{
|
||||
ground.draglock = true;
|
||||
GuideCenter.getIns().fin("auto",false);
|
||||
GuideDriver.getIns().guideDisplay(ground.groundArea.getStackByPosition(0),"ui.guideicon_stackMon2",true,-9,-9);
|
||||
}
|
||||
else if(GuideCenter.getIns().checkCur(GMain.stackMon3))
|
||||
{
|
||||
GuideDriver.getIns().curGuideComplete();
|
||||
GuideCenter.getIns().fin();
|
||||
StoryPanel.getIns().start("sys_guide_2",guide);
|
||||
}
|
||||
else if(GuideCenter.getIns().checkCur(GMain.stackMon4))
|
||||
{
|
||||
ground.draglock = true;
|
||||
GuideCenter.getIns().fin("auto",false);
|
||||
GuideDriver.getIns().guideDisplay(ground.groundArea.getStackByPosition(0),"ui.guideicon_stackMon3",true);
|
||||
}
|
||||
else if(GuideCenter.getIns().checkCur(GMain.stackMon9))
|
||||
{
|
||||
GuideCenter.getIns().fin();
|
||||
GuideDriver.getIns().guideDisplay(ui.ui_bottom.btn_storeGround,"ui.guideicon_stackMon9",true);
|
||||
}
|
||||
else if(GuideCenter.getIns().checkCur(GMain.stackMon7))
|
||||
{
|
||||
ground.draglock = true;
|
||||
GuideDriver.getIns().guideDisplay(ground.groundArea.getStackByPosition(0),"",true,-9,-9);
|
||||
}
|
||||
else if(!GuideCenter.getIns().checkFin(GMain.stackMon9))
|
||||
{
|
||||
GuideDriver.getIns().guideDisplay(ground.groundArea.getStackByPosition(0));
|
||||
GuideDriver.getIns().guideDisplay(ground.groundArea.getStackByPosition(0));
|
||||
GuideDriver.getIns().guideDisplay(ground.groundArea.getStackByPosition(0));
|
||||
}
|
||||
else if(Master.history.passTask["1001006"] != null && !GuideCenter.getIns().checkFin(GSub.OPEN_KEGACHA))
|
||||
{
|
||||
GuideCenter.getIns().fin(GSub.OPEN_KEGACHA);
|
||||
}
|
||||
else
|
||||
{
|
||||
ground.draglock = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function activity() : void
|
||||
{
|
||||
MonsterCenter.getIns().startSecondListener();
|
||||
ground.resume();
|
||||
}
|
||||
|
||||
public function deactivity() : void
|
||||
{
|
||||
ground.pause();
|
||||
}
|
||||
|
||||
override public function reset() : void
|
||||
{
|
||||
ActivityDriver.getIns().remove(activity,deactivity);
|
||||
ground.pause();
|
||||
MainMenu.getIns().onOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import net.pixvi.myr.panel.stagesp.MYREventButton;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
import net.pixvi.pfw.ui.controls.PiLoopMC;
|
||||
import net.pixvi.psg.ui.controller.PiLightButton;
|
||||
|
||||
public class StackGroundPanelBottomUI extends UIComponent
|
||||
{
|
||||
|
||||
public var btn_fill:PiLightButton;
|
||||
|
||||
public var btn_get:PiLightButton;
|
||||
|
||||
public var btn_sell:PiLightButton;
|
||||
|
||||
public var btn_storeGround:PiLightButton;
|
||||
|
||||
public var ui_fillMenu:FillMenuUI;
|
||||
|
||||
public var mc_taskTip_farm:PiLoopMC;
|
||||
|
||||
public var btn_event:MYREventButton;
|
||||
|
||||
public var btn_event2:MYREventButton;
|
||||
|
||||
public function StackGroundPanelBottomUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
ui_fillMenu.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
import net.pixvi.psg.ui.controller.PiLightButton;
|
||||
|
||||
public class StackGroundPanelTopUI extends UIComponent
|
||||
{
|
||||
|
||||
public var btn_gacha:PiLightButton;
|
||||
|
||||
public function StackGroundPanelTopUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import net.pixvi.common.utils.StageLocator;
|
||||
import net.pixvi.common.view.FF;
|
||||
import net.pixvi.myr.center.Game;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
|
||||
public class StackGroundPanelUI extends UIComponent
|
||||
{
|
||||
|
||||
public var ui_top:StackGroundPanelTopUI;
|
||||
|
||||
public var ui_bottom:StackGroundPanelBottomUI;
|
||||
|
||||
public function StackGroundPanelUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
skin = FF.getMC("ui.StackGroundPanelUI");
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
ui_top.y = StageLocator.MainFixVo.fix[0];
|
||||
StageLocator.setSide(ui_bottom,"none","bottom");
|
||||
StageLocator.setSide(ui_top.btn_gacha,"left","none",7);
|
||||
StageLocator.setSide(ui_bottom.btn_storeGround,"right","none");
|
||||
ui_bottom.mc_taskTip_farm.x = ui_bottom.btn_storeGround.x + 66;
|
||||
update();
|
||||
}
|
||||
|
||||
public function update() : void
|
||||
{
|
||||
if(Game.getIns().setting.liuhaiMode)
|
||||
{
|
||||
ui_top.y = StageLocator.MainFixVo.fix[0] + Game.getIns().getLiuHaiAdd();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_top.y = StageLocator.MainFixVo.fix[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package net.pixvi.myr.panel.stackground
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.MovieClip;
|
||||
import flash.geom.Point;
|
||||
import net.pixvi.common.view.FF;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
|
||||
public class StackGroundUI extends UIComponent
|
||||
{
|
||||
|
||||
public var mc_area:MovieClip;
|
||||
|
||||
public var mc_bg:MovieClip;
|
||||
|
||||
public var points:Object;
|
||||
|
||||
public var pointsMax:int;
|
||||
|
||||
public function StackGroundUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
if(skin == null)
|
||||
{
|
||||
skin = FF.getMC("ui.StackGroundUI");
|
||||
}
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
var p:Point = null;
|
||||
var position:int = 0;
|
||||
points = {};
|
||||
while(skin["point_" + position] != null)
|
||||
{
|
||||
p = new Point(skin["point_" + position].x,skin["point_" + position].y);
|
||||
points[position] = p;
|
||||
pointsMax = ++position;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user