Exemple #1
0
    public void CustomFur(GameObject obj)
    {
        if (gameMode != GameMode.Normal && gameMode != GameMode.Furniture || setting.working)
        {
            return;
        }
        SoundManager.Ins.PlaySound(SoundManager.Ins._Inventory);


        if (gameMode == GameMode.Furniture)
        {
            gameMode = GameMode.Normal;
            for (int i = 0; i < obj.transform.childCount; i++)
            {
                obj.transform.GetChild(i).gameObject.SetActive(false);
            }
            for (int h = 1; h < roomParent.transform.childCount; h++)
            {
                FurnitureData furnitureData = roomParent.GetChild(h).GetComponent <FurnitureData>();
                //furIdlist.Add(SaveSystem.A_GetIDFur(furnitureData.ReturnFurniture(), furnitureData.transform.position , furnitureData.transform.rotation)) ;
                //Debug.LogError(SaveSystem.A_GetIDFur(furnitureData.ReturnFurniture(), furnitureData.transform.position, furnitureData.transform.rotation));

                furnitureData.furnitureIsUsing = true;
                furnitureData.position         = furnitureData.transform.position;
                furnitureData.rotation         = furnitureData.transform.rotation;
                furDataList.Add(furnitureData);
            }
            SaveSystem.A_SaveListFur(furDataList);

            //  Popup.Ins.PopupWaiting(true);
        }
        else
        {
            tutor4.SetActive(true);
            obj.transform.GetChild(0).gameObject.SetActive(true);
            gameMode = GameMode.Furniture;
            furDataList.Clear();
            idFurInstall.Clear();
        }
    }