コード例 #1
0
    private void _onBuy1(string slug, SerializablePropertys.Property property, SerializablePackages.PayBy payBy)
    {
        _controlShop.contentPane.visible = false;
        string name_item = NameOf(property, slug);
        // string last_text = InputFieldHelper.Instance.LastTextChatBottom();
        string text = string.Format("{0} costs ${1} {2}", name_item, payBy.coin, DefineAON.CoinName);

        text += "\nThank you very much for your purchase!";
        // text += string.Format("\nThe {0} was putted in your Bag!", name_item);
        InputFieldHelper.Instance.ShowChatBottom(text, true, (TypingEffectByLine ty) =>
        {
            PropertysGame.PropertyChar pChar = PropertysGame.Instance.AddItem(m_dataRaw, slug);
            RefreshDataSelect();
            if (property.IsOutfit || property.IsPet)
            {
                _onBuy2(name_item, slug, property, pChar);
            }
            else
            {
                if (mOnBuy != null)
                {
                    mOnBuy(_controlShop);
                }
            }
        });
    }
コード例 #2
0
    private void _onEquipNow(string name_item, string slug, SerializablePropertys.Property property, PropertysGame.PropertyChar pChar)
    {
        if (property.IsOutfit)
        {
            var charGame = AutoTileMap_Editor.Instance.Agent.GetComponentInChildren <CharGame>();
            PropertysGame.Instance.Equip(charGame, pChar);
        }
        else if (property.IsPet)
        {
            PropertysGame.Instance.EquipPet(pChar);
        }

        string text = string.Format("{0} is equipped!", name_item);

        InputFieldHelper.Instance.ShowChatBottom(text, true, (TypingEffectByLine ty) =>
        {
            if (mOnBuy != null)
            {
                mOnBuy(_controlShop);
            }
        });
    }
コード例 #3
0
 private void _onBuy2(string name_item, string slug, SerializablePropertys.Property property, PropertysGame.PropertyChar pChar)
 {
     InputFieldHelper.Instance.ShowChatBottom("Do you want to equip now?", false, (TypingEffectByLine ty) =>
     {
         var pm_choise = new QuickControlList();
         pm_choise.AddBt("Equip", (EventContext context) =>
         {
             pm_choise.Dispose();
             _onEquipNow(name_item, slug, property, pChar);
         });
         pm_choise.AddBt("Later", (EventContext context) =>
         {
             pm_choise.Dispose();
             _onEquipLate(name_item, slug, property);
         });
         pm_choise.SetParent(InputFieldHelper.Instance.PopUp);
     });
 }