//----------Outfits---------//
    public void ShowOutfits(GComponent lastPopup, CharGame charGame, SerializablePropertys propertys)
    {
        ItemChar itemChar = charGame.DataChar;

        var pm_choise = new QuickControlList();

        for (int i = 0; i < itemChar.ItemByType.Length; i++)
        {
            ItemChar.Items items = itemChar.ItemByType[i];
            if (items.ItemList != null && items.ItemList.Length > 0)
            {
                Item.EItemType eItemType = (Item.EItemType)i;
                pm_choise.AddBt(Item.StrEItemType[i], (EventContext context) =>
                {
                    this._showOutfits2(charGame, pm_choise.contentPane, eItemType, items, propertys);
                });
            }
        }
        pm_choise.AddBt("Cancel", (EventContext context) =>
        {
            pm_choise.Dispose();
        });
        pm_choise.SetParent(InputFieldHelper.Instance.PopUp);
        lastPopup.visible = false;
        pm_choise.SetOnDispose(() =>
        {
            lastPopup.visible = true;
        });
    }
    private void _tryOnItem(CharGame charGame, Item rawItem, Item tryItem, string slug, SerializablePropertys.Property property, SerializablePackages.PayBy payBy)
    {
        _controlShop.contentPane.visible = false;
        {
            // Cam
            var   cam           = AutoTileMap_Editor.Instance.CamControler;
            float _camXAngle_to = cam.camXAngle;
            float _y_to         = cam.yCam;
            // float _y_to = 0;
            float   _distance_to = cam.minDistance;
            Vector3 _target_to   = charGame.transform.position;
            cam.MoveCamTo(_camXAngle_to, _y_to, _distance_to, _target_to, () =>
            {
                // cam.canControl = true;
                // cam.target = charGame.transform;
            });
        }
        UnTryCostume(charGame);
        TryCostume(charGame, rawItem, tryItem);
        {
            var b = AutoTileMap_Editor.Instance.Agent.GetComponent <BasicMecanimControl>();
            if (b != null)
            {
                b.TriggerTalk();
            }
        }
        var pm_choise = new QuickControlList();

        pm_choise.AddBt("Untry", (EventContext context) =>
        {
            // Debug.Log("Click Cancel");
            pm_choise.Dispose();
            UnTryCostume(charGame);
            _controlShop.contentPane.visible = true;
        });
        pm_choise.AddBt("Buy", (EventContext context) =>
        {
            // Debug.Log("Click Buy");
            pm_choise.Dispose();
            UnTryCostume(charGame);
            _onBuy(slug, property, payBy);
        });
        pm_choise.SetParent(InputFieldHelper.Instance.PopUp);
        // Hide chatBottom
        var chatBottom = InputFieldHelper.Instance.GComponent_ChatBottom;

        if (chatBottom != null && chatBottom.visible)
        {
            chatBottom.visible = false;
            pm_choise.SetOnDispose(() =>
            {
                chatBottom.visible = true;
            });
        }
    }
 public void ShowBag()
 {
     if (pm_choise_bag != null)
     {
         ShowNoti("Bag was show");
         return;
     }
     if (_popUp != null)
     {
         for (int i = 0; i < _popUp.numChildren; i++)
         {
             if (_popUp.GetChildAt(i).visible)
             {
                 ShowNoti("Can't show Bag when Talking");
                 return;
             }
         }
     }
     HideMenu();
     // Show Bag
     pm_choise_bag = new QuickControlList();
     pm_choise_bag.AddBt("Outfits", (EventContext context) =>
     {
         // Debug.Log("Click Costume");
         CharGame c = AutoTileMap_Editor.Instance.Agent.GetComponentInChildren <CharGame>();
         PropertysGame.Instance.ShowOutfits(pm_choise_bag.contentPane, c, AutoTileMap_Editor.Instance.MapsData.Propertys);
     });
     pm_choise_bag.AddBt("Pets", (EventContext context) =>
     {
         PropertysGame.Instance.ShowPets(pm_choise_bag.contentPane, AutoTileMap_Editor.Instance.MapsData.Propertys);
     });
     pm_choise_bag.AddBt("Items", (EventContext context) =>
     {
         PropertysGame.Instance.ShowItems(pm_choise_bag.contentPane);
     });
     pm_choise_bag.AddBt("Certificates", (EventContext context) =>
     {
         PropertysGame.Instance.ShowCertificates(pm_choise_bag.contentPane, AutoTileMap_Editor.Instance.MapsData.Propertys);
     });
     pm_choise_bag.AddBt("Cancel", (EventContext context) =>
     {
         pm_choise_bag.Dispose();
         pm_choise_bag = null;
     });
     pm_choise_bag.SetParent(PopUp);
     pm_choise_bag.SetOnDispose(() =>
     {
         ShowMenu();
     });
 }
 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);
     });
 }