public override void Run() { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Hall); if (fui != null) { fui.GetComponent <HallViewComponent>().ClearChat(); } }
public override void Run() { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Mall); if (fui != null) { fui.GetComponent <MallViewComponent>().GoldChange(); } }
public override void Awake(FUIShopComponent self) { FUI fui = self.GetParent <FUI>(); fui.GetComponent <FUIWindowComponent>().Window.closeButton.onClick.Add(() => { fui.Dispose(); ETModel.Game.Scene.GetComponent <FUIPackageComponent>().RemovePackage(FUIType.Shop); }); }
public void Run(long id, int value) { ChesserComponent ChesserComponent = ETModel.Game.Scene.GetComponent <ChesserComponent>(); if (ChesserComponent.MyChesser.Id == id) //本人金币变化 { FUIComponent fUIComponent = Game.Scene.GetComponent <FUIComponent>(); FUI ui = fUIComponent.Get(FUIType.UIChessStore); FUI goldText = ui.GetComponent <FUIChessStoreComponent>().GoldText; goldText.Get("gold").GObject.asLabel.text = string.Format("%d", value); } }
public override void Run() { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Hall); if (fui == null) { return; } HallViewComponent hallView = fui.GetComponent <HallViewComponent>(); hallView.RefreshData(); }
protected override void Run(ETModel.Session session, B2C_TankDie message) { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.MainInterface); if (fui != null) { Tank tank = ETModel.Game.Scene.GetComponent <TankComponent>().Get(message.DieTandkId); if (tank == null) { Log.Error($"不存在坦克{message.DieTandkId}"); return; } if (tank.TankCamp == TankCamp.Left) { fui.GetComponent <MainItfViewComponent>().LeftWin(); } else { fui.GetComponent <MainItfViewComponent>().RightWin(); } } }
protected override void Run(ETModel.Session session, B2C_RoundEnd message) { Log.Warning($"胜利方{message.WinCamp}"); FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.MainInterface); if (fui != null) { if (message.WinCamp == 1) { fui.GetComponent <MainItfViewComponent>().LeftWin(); } else if (message.WinCamp == 2) { fui.GetComponent <MainItfViewComponent>().RightWin(); } else { Log.Error($"winCamp {message.WinCamp} 有误"); } } //ETModel.Game.Scene.GetComponent<TankComponent>().MyTank.GetComponent<LocalTankComponent>().StopMove = true; }
protected override void Run(ETModel.Session session, B2C_StartNextRound message) { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.MainInterface); if (fui != null) { fui.GetComponent <MainItfViewComponent>().AddTotalRound(); } foreach (TankFrameInfo tankInfo in message.TankFrameInfos) { Tank tank = ETModel.Game.Scene.GetComponent <TankComponent>().Get(tankInfo.TankId); tank.Position = new Vector3(tankInfo.PX * 1f / Tank.m_coefficient, tankInfo.PY * 1f / Tank.m_coefficient, tankInfo.PZ * 1f / Tank.m_coefficient); tank.Reset(); } }
protected override void Run(ETModel.Session session, G2C_ChatMessage message) { if (message.ChatType == ChatType.Hall) { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Hall); if (fui != null) { fui.GetComponent <HallViewComponent>().UpdateChatInfo(message); } } else if (message.ChatType == ChatType.Room) { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Room); if (fui != null) { fui.GetComponent <RoomViewComponent>().UpdateChatInfo(message); } } }
public override void Run(string a, PopMessageType b) { FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.PopMessage); fui.GetComponent <PopMessageViewComponent>().AddEmitTip(a, b); }