Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Wednesday, May 15, 2019
|
| | | // [ Date ]: Thursday, June 06, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public readonly Vector3 UIScale;
|
| | | public readonly Vector3 Scale;
|
| | | public readonly int RelatedPartID;
|
| | | public readonly int ActionType;
|
| | |
|
| | | public ModelResConfig()
|
| | | {
|
| | |
| | | Scale=tables[14].Vector3Parse();
|
| | |
|
| | | int.TryParse(tables[15],out RelatedPartID);
|
| | |
|
| | | int.TryParse(tables[16],out ActionType); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | ClientCollectUtility.Leave(this); |
| | | } |
| | | |
| | | public sealed override void InitNpcConfig(int id) |
| | | { |
| | | if (NpcConfig != null && NpcConfig.NPCID == id) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (id == 10404100) |
| | | { |
| | | if (PlayerDatas.Instance.baseData.Job == 2) |
| | | { |
| | | NpcConfig = NPCConfig.Get(10404101); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | NpcConfig = NPCConfig.Get(id); |
| | | } |
| | | } |
| | | |
| | | public override void OnClick() |
| | | { |
| | | if (GA_Hero.s_MapSwitching) |
| | |
| | | } |
| | | } |
| | | |
| | | public sealed override void RequestLifeBar() { } |
| | | |
| | | public sealed override void RequestDialogueBubble() |
| | | { |
| | | if (m_DialogAppear) |
| | |
| | | m_LastPlayTime = Time.time; |
| | | } |
| | | } |
| | | |
| | | #region Boss类型不需要实现的方法, 覆盖掉父类 |
| | | public sealed override void RequestLifeBar() { } |
| | | public sealed override void ReleaseLifeBar() { } |
| | | public sealed override void RequestName() { } |
| | | public sealed override void ReleaseName() { } |
| | | #endregion |
| | | } |
| | |
| | | _npc.ActorInfo.MaxHp = h0406.MaxHP; |
| | | _npc.ActorInfo.MaxHpEx = h0406.MaxHPEx; |
| | | _npc.ActorInfo.moveSpeed = 500f / h0406.Speed; |
| | | _npc.ActorInfo.LV = h0406.CurLV; |
| | | _npc.RefreshLifeBar(_npc.ActorInfo.RealHp); |
| | | if (OnNpcAppear != null) |
| | | { |
| | | OnNpcAppear(_npc); |
| | |
| | | [SerializeField] Text m_StoveExp;
|
| | | [SerializeField] IntensifySmoothSlider m_Slider;
|
| | | [SerializeField] ScrollRect m_Scroller;
|
| | | [SerializeField] ItemBehaviour[] m_Item;
|
| | | [SerializeField] List<ItemBehaviour> m_Item;
|
| | | [SerializeField] Text m_CloseTip;
|
| | | [SerializeField] Image m_FairyStove;
|
| | | [SerializeField] Image m_NormalStove;
|
| | |
| | |
|
| | | void Display()
|
| | | {
|
| | | CreateItems(displayItem.count);
|
| | |
|
| | | DisplayStove();
|
| | |
|
| | | m_ContainerDefeat.gameObject.SetActive(displayItem.count == 0);
|
| | |
| | | void DisplayItem()
|
| | | {
|
| | | m_Scroller.horizontalNormalizedPosition = 0f;
|
| | | for (int i = 0; i < m_Item.Length; i++)
|
| | | for (int i = 0; i < m_Item.Count; i++)
|
| | | {
|
| | | m_Item[i].gameObject.SetActive(i < displayItem.count);
|
| | | if (i < displayItem.count)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void CreateItems(int count)
|
| | | {
|
| | | if (count > m_Item.Count)
|
| | | {
|
| | | var delta = count - m_Item.Count;
|
| | | for (int i = 0; i < delta; i++)
|
| | | {
|
| | | var go = GameObject.Instantiate(m_Item[0]);
|
| | | go.transform.SetParent(m_Scroller.content);
|
| | | go.transform.localScale = Vector3.one;
|
| | | var instance = go.GetComponent<ItemBehaviour>();
|
| | | m_Item.Add(instance);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClose()
|
| | | {
|
| | | if ((DateTime.Now - openTime).TotalSeconds < 2f)
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, June 06, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class AuctionBetterConfirmWin : Window
|
| | | {
|
| | | [SerializeField] Text m_Remind;
|
| | | [SerializeField] Button m_CloseBtn; |
| | | [SerializeField] Button m_UseBtn;
|
| | | [SerializeField] Button m_Auction;
|
| | |
|
| | | public static int remindType = 0;
|
| | |
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_CloseBtn.AddListener(CloseClick);
|
| | | m_UseBtn.AddListener(OnSelfUse);
|
| | | m_Auction.AddListener(OnAuction);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void Display()
|
| | | {
|
| | | m_Remind.text = Language.Get("ItemAuctionConfirm_" + remindType);
|
| | | }
|
| | |
|
| | | private void OnAuction()
|
| | | {
|
| | | CloseImmediately();
|
| | |
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(auctionHelpModel.ItemModel.itemInfo.index);
|
| | | }
|
| | |
|
| | | private void OnSelfUse()
|
| | | {
|
| | | CloseImmediately();
|
| | |
|
| | | if (ItemLogicUtility.Instance.IsOverdue(auctionHelpModel.ItemModel.guid))
|
| | | {
|
| | | ItemOperateUtility.Instance.ProcessOverdueItem(auctionHelpModel.ItemModel.guid);
|
| | | }
|
| | | else
|
| | | {
|
| | | ItemOperateUtility.Instance.UseItem(auctionHelpModel.ItemModel.guid);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 35a75aa8fcab1c14f8d4b276f32c4dd4 |
| | | timeCreated: 1559809412 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] Button m_Overdue;
|
| | |
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | |
| | | private void OnClickAuction()
|
| | | {
|
| | | CloseImmediately();
|
| | |
|
| | | var equipGuid = equipModel.GetEquip(new Int2(auctionHelpModel.ItemModel.config.LV, auctionHelpModel.ItemModel.config.EquipPlace));
|
| | | var isMySuit = false;
|
| | | var myEquipColor = 0;
|
| | | if (!string.IsNullOrEmpty(equipGuid))
|
| | | {
|
| | | var equip = packModel.GetItemByGuid(equipGuid);
|
| | | if (equip != null)
|
| | | {
|
| | | isMySuit = equip.config.SuiteiD > 0;
|
| | | myEquipColor = equip.config.ItemColor;
|
| | | }
|
| | | }
|
| | |
|
| | | if (auctionHelpModel.ItemModel.config.JobLimit == 0
|
| | | || auctionHelpModel.ItemModel.config.JobLimit == PlayerDatas.Instance.baseData.Job)
|
| | | {
|
| | | if (!isMySuit && auctionHelpModel.ItemModel.config.SuiteiD > 0)
|
| | | {
|
| | | AuctionBetterConfirmWin.remindType = 2;
|
| | | WindowCenter.Instance.Open<AuctionBetterConfirmWin>();
|
| | | return;
|
| | | }
|
| | |
|
| | | if (auctionHelpModel.ItemModel.config.ItemColor > myEquipColor)
|
| | | {
|
| | | AuctionBetterConfirmWin.remindType = 1;
|
| | | WindowCenter.Instance.Open<AuctionBetterConfirmWin>();
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(auctionHelpModel.ItemModel.itemInfo.index);
|
| | | } |
| | | |
| | |
| | | var valueLabel = UIHelper.AppendColor(currentValue >= skillConfig.RequirePropertyValue() ? TextColType.Green : TextColType.Red
|
| | | , skillConfig.RequirePropertyValue().ToString());
|
| | | m_Condition.text = string.Format("{0} {1}{2}激活",
|
| | | Language.Get("JadeDynastyLayer", Language.Get("Num_CHS_" + level)),
|
| | | Language.Get("ExpertSkillLV", Language.Get("Num_CHS_" + level)),
|
| | | propertyConfig.Name, valueLabel);
|
| | | m_Description.text = skillConfig.Description;
|
| | |
|
| | |
| | | { |
| | | _npcID = (target as GActorNpcNoFight).NpcConfig.NPCID; |
| | | } |
| | | m_Content.text = StringUtility.Contact("O:", target.ServerInstID, "---", "N:", _npcID); |
| | | uint _sid = target.ServerInstID; |
| | | if (PersonalEnemy.m_CBinSdDict.ContainsKey(_sid)) |
| | | { |
| | | _sid = PersonalEnemy.m_CBinSdDict[_sid]; |
| | | } |
| | | m_Content.text = StringUtility.Contact("O:", _sid, "---", "N:", _npcID); |
| | | } |
| | | else |
| | | { |