Ejemplo n.º 1
0
 public static void queryBabyOK(COM_BabyInst Inst)
 {
     if (QueryBabyEventOk != null)
     {
         QueryBabyEventOk(Inst);
     }
 }
Ejemplo n.º 2
0
 public void SetBaby(COM_BabyInst baby)
 {
     for (int i = 0; i < baby.gear_.Length; i++)
     {
         gear_[i] = baby.gear_[i];
     }
     isForBattle_    = baby.isBattle_;
     isShow_         = baby.isShow_;
     isLock          = baby.isLock_;
     lastSellTime_   = baby.lastSellTime_;
     intensifyLevel_ = baby.intensifyLevel_;
     SetEntity(baby);
 }
Ejemplo n.º 3
0
 public void DepositBabyOK(COM_BabyInst inst)
 {
     for (int i = 0; i < GamePlayer.Instance.babies_list_.Count; i++)
     {
         if (GamePlayer.Instance.babies_list_[i].InstId == inst.instId_)
         {
             GamePlayer.Instance.babies_list_.RemoveAt(i);
         }
     }
     GamePlayer.Instance.Storagebaby [inst.slot_] = inst;
     if (MainbabyListUI.RefreshBabyListOk != null)
     {
         MainbabyListUI.RefreshBabyListOk((int)inst.instId_);
     }
     UpdateUI();
 }
Ejemplo n.º 4
0
    public void SortBabyStorage(uint[] babyid)
    {
        List <COM_BabyInst> temps = new List <COM_BabyInst> ();
        COM_BabyInst        item  = null;

        for (int i = 0; i < babyid.Length; i++)
        {
            item       = GamePlayer.Instance.GetBabyInStoreById((int)babyid[i]);
            item.slot_ = (ushort)i;
            temps.Add(item);
        }
        if (OnSortBabyStorageOk != null)
        {
            OnSortBabyStorageOk(temps);
        }
    }
Ejemplo n.º 5
0
    void RefreshBabyUIOk(COM_BabyInst binst)
    {
        Baby ba = new Baby();

        ba.SetBaby(binst);
        for (int i = 0; i < itemsList.Count; i++)
        {
            MainBabyListCell mbcell = itemsList[i].GetComponent <MainBabyListCell>();
            if (mbcell.BabyMainData.InstId == binst.instId_)
            {
                mbcell.BabyMainData = ba;

                return;
            }
        }
    }
Ejemplo n.º 6
0
    public COM_BabyInst GetInst()
    {
        COM_BabyInst inst = new COM_BabyInst();

        inst.type_           = type_;
        inst.instId_         = (uint)InstId;
        inst.instName_       = InstName;
        inst.properties_     = properties_;
        inst.states_         = buffList_.ToArray();
        inst.skill_          = skillInsts_.ToArray();
        inst.gear_           = gear_;
        inst.isShow_         = isShow_;
        inst.isLock_         = isLock;
        inst.intensifyLevel_ = intensifyLevel_;
        inst.lastSellTime_   = (int)lastSellTime_;
        return(inst);
    }
Ejemplo n.º 7
0
    void OnCellDoubleToBagClick(GameObject obj)
    {
        bDouble = true;
        StopCoroutine("DelayOneClick");
        COM_BabyInst _baby = obj.GetComponentInParent <StorageBabyCell> ().BabyInst;

        if (BankSystem.instance.IsBabyListFull())
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("EN_BabyFull"));
            return;
        }
        if (_baby == null)
        {
            return;
        }
        StorageBabyCell scell = obj.GetComponentInParent <StorageBabyCell> ();

        babyId = (int)scell.BabyInst.instId_;
        scell.icon.gameObject.SetActive(false);
        scell.raceIcon.gameObject.SetActive(false);
        BabyTipsUI bt = tipsObj.GetComponent <BabyTipsUI> ();

        if (scell.gameObject.name == "agCell")
        {
            bt.isbabyList = false;
        }
        else
        {
            bt.isbabyList = true;
        }
        bt.bcell = scell;
        bt.bcell.numsp.spriteName = "";
//		bt.bcell.iconBack.spriteName = "cw_chongwutouxiang1";
//		bt.bcell.iconBack.GetComponent<UIButton>().normalSprite = "cw_chongwutouxiang1";
        UIManager.RemoveButtonAllEventHandler(obj);
        NetConnection.Instance.storageBabyToPlayer(_baby.instId_);
    }
Ejemplo n.º 8
0
    IEnumerator DelayOneClick(StorageBabyCell bCell)
    {
        yield return(new WaitForSeconds(0.2f));

        if (!bDouble)
        {
            tipsObj.SetActive(true);
            COM_BabyInst binst = null;
            for (int i = 0; i < GamePlayer.Instance.Storagebaby.Length; i++)
            {
                if (GamePlayer.Instance.Storagebaby[i] == null)
                {
                    continue;
                }
                if (GamePlayer.Instance.Storagebaby[i].instId_ == bCell.BabyInst.instId_)
                {
                    binst = GamePlayer.Instance.Storagebaby[i];
                    break;
                }
            }
            Baby baby = new Baby();
            baby.SetBaby(binst);

            BabyTipsUI bt = tipsObj.GetComponent <BabyTipsUI> ();
            if (bCell.gameObject.name == "agCell")
            {
                bt.isbabyList = false;
            }
            else
            {
                bt.isbabyList = true;
            }
            bt.bcell = bCell;
            bt.baby  = baby;
        }
    }
Ejemplo n.º 9
0
 void OnQueryBaby(COM_BabyInst Inst)
 {
     ChatBabytips.ShowMe(Inst);
 }
Ejemplo n.º 10
0
 public static void SwithShowMe(COM_BabyInst babyinst)
 {
     Inst = babyinst;
     UIBase.SwitchShowPanelByName(UIASSETS_ID.UIASSETS_ChatBabyUI);
 }
Ejemplo n.º 11
0
 public static void ShowMe(COM_BabyInst babyinst)
 {
     Inst = babyinst;
     UIBase.AsyncLoad(UIASSETS_ID.UIASSETS_ChatBabyUI);
 }