Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (CoreUI.SwitchCoreUI == true)
        {
            ItemRefactorizing.ChangingCore(selectedCore);
            CoreContent.transform.GetChild(0).GetChild(0).GetComponent <TextMeshProUGUI>().text             = selectedCore.fire.ToString() + " (+" + (selectedCore.fire - selectedCore.Originalfire).ToString() + ")";
            CoreContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().text             = selectedCore.ice.ToString() + " (+" + (selectedCore.ice - selectedCore.Originalice).ToString() + ")";
            CoreContent.transform.GetChild(0).GetChild(3).GetComponent <TextMeshProUGUI>().text             = selectedCore.dark.ToString() + " (+" + (selectedCore.dark - selectedCore.Originaldark).ToString() + ")";
            CoreContent.transform.GetChild(0).GetChild(2).GetComponent <TextMeshProUGUI>().text             = selectedCore.light.ToString() + " (+" + (selectedCore.light - selectedCore.Originallight).ToString() + ")";
            CoreContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().text             = selectedCore.coreName + " (+" + selectedCore.coreLevel + ")";
            CoreContent.transform.GetChild(1).GetChild(1).GetComponent <TextMeshProUGUI>().text             = selectedCore.corePower.ToString();
            CoreContent.transform.GetChild(1).GetChild(2).GetChild(0).GetComponent <Image>().sprite         = selectedCore.itemImage;
            CoreContent.transform.GetChild(1).GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().text = selectedCore.coreRank;
            CoreContent.transform.GetChild(1).GetChild(2).GetChild(2).GetComponent <TextMeshProUGUI>().text = "+" + selectedCore.coreLevel.ToString();
            CoreContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().text             = selectedCore.coreRank;
            CoreContent.transform.GetChild(1).GetChild(4).GetComponent <TextMeshProUGUI>().text             = selectedCore.price.ToString();
            CoreContent.transform.GetChild(1).GetChild(5).GetChild(0).GetComponent <TextMeshProUGUI>().text = selectedCore.CoreDescription;

            if (selectedCore.coreRank.Equals("D"))
            {
                CoreContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = D;
                CoreContent.transform.GetChild(1).GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().color = D;
                CoreContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().color             = D;
            }
            else if (selectedCore.coreRank.Equals("C"))
            {
                CoreContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = C;
                CoreContent.transform.GetChild(1).GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().color = C;
                CoreContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().color             = C;
            }
            else if (selectedCore.coreRank.Equals("B"))
            {
                CoreContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = B;
                CoreContent.transform.GetChild(1).GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().color = B;
                CoreContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().color             = B;
            }
            else if (selectedCore.coreRank.Equals("A"))
            {
                CoreContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = A;
                CoreContent.transform.GetChild(1).GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().color = A;
                CoreContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().color             = A;
            }
            else if (selectedCore.coreRank.Equals("S"))
            {
                CoreContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = S;
                CoreContent.transform.GetChild(1).GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().color = S;
                CoreContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().color             = S;
            }

            CoreContent.transform.GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().text = Mathf.RoundToInt(selectedCore.STR).ToString() + " (+" + Mathf.RoundToInt(selectedCore.STR - selectedCore.STROri).ToString() + ")";
            CoreContent.transform.GetChild(2).GetChild(1).GetComponent <TextMeshProUGUI>().text = Mathf.RoundToInt(selectedCore.INT).ToString() + " (+" + Mathf.RoundToInt(selectedCore.INT - selectedCore.INTOri).ToString() + ")";
            CoreContent.transform.GetChild(2).GetChild(2).GetComponent <TextMeshProUGUI>().text = Mathf.RoundToInt(selectedCore.DEX).ToString() + " (+" + Mathf.RoundToInt(selectedCore.DEX - selectedCore.DEXOri).ToString() + ")";
            CoreContent.transform.GetChild(2).GetChild(3).GetComponent <TextMeshProUGUI>().text = Mathf.RoundToInt(selectedCore.LUK).ToString() + " (+" + Mathf.RoundToInt(selectedCore.LUK - selectedCore.LUKOri).ToString() + ")";

            CoreContent.transform.parent.parent.parent.GetChild(4).GetChild(0).GetComponent <TextMeshProUGUI>().text = MoneyUnitControl.FormatNumber(System.Convert.ToInt64(selectedCore.priceToUpgrade)).ToString();
        }


        if (MaterialUI.SwitchMaterialUI == true)
        {
            MaterialContent.transform.GetChild(0).GetChild(0).GetChild(0).GetComponent <Image>().sprite         = selectedMT.MaterialImage;
            MaterialContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().text             = selectedMT.MaterialName;
            MaterialContent.transform.GetChild(0).GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().text = selectedMT.MaterialRank;
            MaterialContent.transform.GetChild(0).GetChild(3).GetChild(0).GetComponent <TextMeshProUGUI>().text = selectedMT.Description;
            MaterialContent.transform.GetChild(0).GetChild(4).GetComponent <TextMeshProUGUI>().text             = selectedMT.Price.ToString();

            if (selectedMT.MaterialRank.Equals("D"))
            {
                MaterialContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().color             = D;
                MaterialContent.transform.GetChild(0).GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().color = D;
            }
            else if (selectedMT.MaterialRank.Equals("C"))
            {
                MaterialContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().color             = C;
                MaterialContent.transform.GetChild(0).GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().color = C;
            }
            else if (selectedMT.MaterialRank.Equals("B"))
            {
                MaterialContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().color             = B;
                MaterialContent.transform.GetChild(0).GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().color = B;
            }
            else if (selectedMT.MaterialRank.Equals("A"))
            {
                MaterialContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().color             = A;
                MaterialContent.transform.GetChild(0).GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().color = A;
            }
            else if (selectedMT.MaterialRank.Equals("S"))
            {
                MaterialContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().color             = S;
                MaterialContent.transform.GetChild(0).GetChild(2).GetChild(0).GetComponent <TextMeshProUGUI>().color = S;
            }
        }

        if (EquipmentUI.SwitchEQUI == true)
        {
            ItemRefactorizing.ChaningEQ(selectedEQ);
            EQContent.transform.GetChild(0).GetChild(0).GetComponent <TextMeshProUGUI>().text = selectedEQ.fire.ToString() + " (+" + (selectedEQ.fire - selectedEQ.originalfire).ToString() + ")";
            EQContent.transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().text = selectedEQ.ice.ToString() + " (+" + (selectedEQ.ice - selectedEQ.originalice).ToString() + ")";
            EQContent.transform.GetChild(0).GetChild(2).GetComponent <TextMeshProUGUI>().text = selectedEQ.light.ToString() + " (+" + (selectedEQ.light - selectedEQ.originallight).ToString() + ")";
            EQContent.transform.GetChild(0).GetChild(3).GetComponent <TextMeshProUGUI>().text = selectedEQ.dark.ToString() + " (+" + (selectedEQ.dark - selectedEQ.originaldark).ToString() + ")";

            EQContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().text             = selectedEQ.EquipmentName + " (+" + selectedEQ.EqLevel + ")";
            EQContent.transform.GetChild(1).GetChild(1).GetComponent <TextMeshProUGUI>().text             = selectedEQ.typeOfEQ;
            EQContent.transform.GetChild(1).GetChild(2).GetComponent <TextMeshProUGUI>().text             = Mathf.RoundToInt(selectedEQ.PhysicalAttack).ToString() + " (+" + Mathf.RoundToInt((selectedEQ.PhysicalAttack - selectedEQ.PhysicalAttackOrigin)).ToString() + ")";
            EQContent.transform.GetChild(1).GetChild(3).GetComponent <TextMeshProUGUI>().text             = Mathf.RoundToInt(selectedEQ.MagicalAttack).ToString() + " (+" + Mathf.RoundToInt((selectedEQ.MagicalAttack - selectedEQ.MagicalAttackOrigin)).ToString() + ")";
            EQContent.transform.GetChild(1).GetChild(4).GetChild(0).GetComponent <Image>().sprite         = selectedEQ.EquipmentImage;
            EQContent.transform.GetChild(1).GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>().text = selectedEQ.EquipmentRank;
            EQContent.transform.GetChild(1).GetChild(4).GetChild(2).GetComponent <TextMeshProUGUI>().text = "+" + selectedEQ.EqLevel.ToString();
            EQContent.transform.GetChild(1).GetChild(5).GetComponent <TextMeshProUGUI>().text             = selectedEQ.Price.ToString();
            EQContent.transform.GetChild(1).GetChild(6).GetChild(0).GetComponent <TextMeshProUGUI>().text = selectedEQ.Description;

            EQContent.transform.parent.parent.parent.GetChild(5).GetChild(0).GetComponent <TextMeshProUGUI>().text = MoneyUnitControl.FormatNumber(selectedEQ.PriceToUpgrade);


            if (selectedEQ.EquipmentRank.Equals("D"))
            {
                EQContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = D;
                EQContent.transform.GetChild(1).GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>().color = D;
            }

            else if (selectedEQ.EquipmentRank.Equals("C"))
            {
                EQContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = C;
                EQContent.transform.GetChild(1).GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>().color = C;
            }
            else if (selectedEQ.EquipmentRank.Equals("B"))
            {
                EQContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = B;
                EQContent.transform.GetChild(1).GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>().color = B;
            }
            else if (selectedEQ.EquipmentRank.Equals("A"))
            {
                EQContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = A;
                EQContent.transform.GetChild(1).GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>().color = A;
            }
            else if (selectedEQ.EquipmentRank.Equals("S"))
            {
                EQContent.transform.GetChild(1).GetChild(0).GetComponent <TextMeshProUGUI>().color             = S;
                EQContent.transform.GetChild(1).GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>().color = S;
            }



            if (selectedEQ.IsItEquipped == false)
            {
                EQContent.transform.parent.parent.parent.GetChild(2).gameObject.SetActive(true);
                EQContent.transform.parent.parent.parent.GetChild(3).gameObject.SetActive(false);
            }
            else if (selectedEQ.IsItEquipped == true)
            {
                EQContent.transform.parent.parent.parent.GetChild(2).gameObject.SetActive(false);
                EQContent.transform.parent.parent.parent.GetChild(3).gameObject.SetActive(true);
            }
        }


        if (ReinforceUI.SwitchReinUI == true)
        {
            ReinforceUIA.transform.GetChild(2).GetChild(0).GetComponent <Image>().sprite = selectedEQ.EquipmentImage;
            ReinforceUIA.transform.GetChild(3).GetComponent <TextMeshProUGUI>().text     = selectedEQ.EquipmentName + " (+" + selectedEQ.EqLevel.ToString() + ")";
            ReinforceUIA.transform.GetChild(4).GetComponent <TextMeshProUGUI>().text     = "+" + selectedEQ.EqLevel.ToString();
            ReinforceUIA.transform.GetChild(5).GetComponent <TextMeshProUGUI>().text     = "+" + (selectedEQ.EqLevel + 1).ToString();
            ReinforceUIA.transform.GetChild(6).GetComponent <TextMeshProUGUI>().text     = (MoneyUnitControl.ReturnProbForRein(selectedEQ.EqLevel) * 100).ToString() + " %";
            ReinforceUIA.transform.GetChild(8).GetComponent <TextMeshProUGUI>().text     = MoneyUnitControl.FormatNumber(selectedEQ.PriceToUpgrade);
        }
        if (ReinforceCoreUI.SwitchReinCoreUI == true)
        {
            ReinforceUICore.transform.GetChild(2).GetChild(0).GetComponent <Image>().sprite = selectedCore.itemImage;

            ReinforceUICore.transform.GetChild(3).GetComponent <TextMeshProUGUI>().text = selectedCore.coreName + " (+" + selectedCore.coreLevel.ToString() + ")";
            ReinforceUICore.transform.GetChild(4).GetComponent <TextMeshProUGUI>().text = "+" + selectedCore.coreLevel.ToString();
            ReinforceUICore.transform.GetChild(5).GetComponent <TextMeshProUGUI>().text = "+" + (selectedCore.coreLevel + 1).ToString();
            ReinforceUICore.transform.GetChild(6).GetComponent <TextMeshProUGUI>().text = (MoneyUnitControl.ReturnProbForRein(selectedCore.coreLevel) * 100).ToString() + " %";
            ReinforceUICore.transform.GetChild(8).GetComponent <TextMeshProUGUI>().text = MoneyUnitControl.FormatNumber(System.Convert.ToInt64(selectedCore.priceToUpgrade));
        }
    }
Beispiel #2
0
    public void CoreValueAdded()
    {
        Material MT = SC2.GetComponent <MaterialInventory>().materials[0];

        if (MT.materialID == 32)
        {
            SC1.GetComponent <CoreInventory>().cores[0].Originalfire += 2;
        }
        if (MT.materialID == 33)
        {
            SC1.GetComponent <CoreInventory>().cores[0].Originalice += 2;
        }
        if (MT.materialID == 34)
        {
            SC1.GetComponent <CoreInventory>().cores[0].Originallight += 2;
        }
        if (MT.materialID == 35)
        {
            SC1.GetComponent <CoreInventory>().cores[0].Originaldark += 2;
        }
        if (MT.materialID == 31)
        {
            SC1.GetComponent <CoreInventory>().cores[0].INTOri += 2;
            SC1.GetComponent <CoreInventory>().cores[0].STROri += 2;
        }

        if (MT.materialID == 29)
        {
            SC1.GetComponent <CoreInventory>().cores[0].INTOri += 2;
        }


        if (MT.materialID == 27)
        {
            SC1.GetComponent <CoreInventory>().cores[0].STROri += 2;
        }



        if (MT.materialID == 23)
        {
            SC1.GetComponent <CoreInventory>().cores[0].INTOri += 1;
            SC1.GetComponent <CoreInventory>().cores[0].STROri += 1;
        }

        if (MT.materialID == 38)
        {
            SC1.GetComponent <CoreInventory>().cores[0].LUKOri += 1;
            SC1.GetComponent <CoreInventory>().cores[0].DEXOri += 1;
        }
        if (MT.materialID == 39)
        {
            SC1.GetComponent <CoreInventory>().cores[0].LUKOri += 3;
            SC1.GetComponent <CoreInventory>().cores[0].DEXOri += 3;
        }



        if (MT.materialID == 24)
        {
            SC1.GetComponent <CoreInventory>().cores[0].STROri += 1;
        }

        if (MT.materialID == 25)
        {
            SC1.GetComponent <CoreInventory>().cores[0].INTOri += 1;
        }


        if (MT.materialID == 11)
        {
            SC1.GetComponent <CoreInventory>().cores[0].LUKOri += 1;
        }

        if (MT.materialID == 36)
        {
            SC1.GetComponent <CoreInventory>().cores[0].coreLevel += 1;
        }

        ItemRefactorizing.ChangingCore(SC1.GetComponent <CoreInventory>().cores[0]);
    }
    public void OnClickLoadButton()
    {
        string realPath = Application.persistentDataPath + "/save.dat";


        if (SaveSystem.Load(realPath) != null)
        {
            PD = SaveSystem.Load(realPath);

            Destroy(SlimeDBOB.transform.GetChild(0).gameObject);
            Destroy(SlimeDBOB.transform.GetChild(1).gameObject);


            for (int i = 0; i < GateWay.GetComponent <GateWayHP>().GateWayStat.Count; i++)
            {
                GateWay.GetComponent <GateWayHP>().GateWayStat[i] = PD.LevelOfGates[i].Level;
            }


            for (int i = 0; i < PD.NumberOfSlime; i++)
            {
                Instant = Instantiate(SlimeDBOB.GetComponent <SlimeDB>().InstantSlime, new Vector3(0, 0, 0), new Quaternion(), SlimeDBOB.transform);
                Instant.transform.GetChild(0).gameObject.SetActive(false);
                Instant.transform.localScale = new Vector3(0.5f, 0.5f, 1);
                Instant.gameObject.GetComponent <SlimeState>().slimeState = SlimeSet(PD.SlimeStates[i]);

                Instant.gameObject.GetComponent <SlimeState>().slimeState.Weapon    = EQSet(PD.SlimeWeapon[i]);
                Instant.gameObject.GetComponent <SlimeState>().slimeState.Aura      = EQSet(PD.SlimeAura[i]);
                Instant.gameObject.GetComponent <SlimeState>().slimeState.Accessory = EQSet(PD.SlimeAcc[i]);
                Instant.gameObject.GetComponent <SlimeState>().slimeState.UsedCore  = CoreSet(PD.SlimeCore[i]);

                Instant.gameObject.GetComponent <SlimeState>().slimeState.UsedCore.itemImage       = OriginalCoreDB.GetComponent <CoreInventory>().cores[Instant.gameObject.GetComponent <SlimeState>().slimeState.UsedCore.coreID].itemImage;
                Instant.gameObject.GetComponent <SlimeState>().slimeState.Weapon.EquipmentImage    = OriginalEQDB.GetComponent <EquipmentInventory>().eqs[Instant.gameObject.GetComponent <SlimeState>().slimeState.Weapon.EquipmentID].EquipmentImage;
                Instant.gameObject.GetComponent <SlimeState>().slimeState.Accessory.EquipmentImage = OriginalEQDB.GetComponent <EquipmentInventory>().eqs[Instant.gameObject.GetComponent <SlimeState>().slimeState.Accessory.EquipmentID].EquipmentImage;
                Instant.gameObject.GetComponent <SlimeState>().slimeState.Aura.EquipmentImage      = OriginalEQDB.GetComponent <EquipmentInventory>().eqs[Instant.gameObject.GetComponent <SlimeState>().slimeState.Aura.EquipmentID].EquipmentImage;

                Instant.gameObject.transform.position = new Vector3(PD.PositionsOfSlime[i].x, PD.PositionsOfSlime[i].y, PD.PositionsOfSlime[i].z);
                Instant.gameObject.GetComponent <SlimeState>().slimeState.SlimeSprite = SlimeDBOB.GetComponent <SlimeDB>().InstantSlime.GetComponent <SlimeState>().slimeState.SlimeSprite;

                Instant.gameObject.GetComponent <SlimeState>().AuraIndex    = PD.SLimeOtherStates[i].AuraIndex;
                Instant.gameObject.GetComponent <SlimeState>().AuraEquipped = PD.SLimeOtherStates[i].AuraEquipped;
                Instant.gameObject.GetComponent <SlimeWork>().WorkIndex     = PD.SLimeOtherStates[i].WorkIndex;

                if (Instant.gameObject.GetComponent <SlimeState>().slimeState.SlimePlaceIndex != -1)
                {
                    CasUICOPY.GetComponent <SlimeInventoryCopy>().SlimeList1[Instant.gameObject.GetComponent <SlimeState>().slimeState.SlimePlaceIndex] = Instant;
                    CasUI.GetComponent <SlimeInventory>().SlimeList[Instant.gameObject.GetComponent <SlimeState>().slimeState.SlimePlaceIndex]          = Instant;
                }
            }



            PlayerInfor.Money   = PD.Money;
            PlayerInfor.Diamond = PD.Dia;
            PlayerInfor.Stage   = PD.StageLevel;


            for (int i = 0; i < MaterialInv.GetComponent <MaterialInventory>().materials.Count; i++)
            {
                MaterialInv.GetComponent <MaterialInventory>().materials[i].materialID = PD.Material[i].MaterialID;
                MaterialInv.GetComponent <MaterialInventory>().materials[i].Amount     = PD.Material[i].Amount;
            }

            for (int i = 0; i < EquipmentInv.GetComponent <EquipmentInventory>().eqs.Count; i++)
            {
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EquipmentID          = PD.Equipment[i].EquipmentID;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].AttackPoint          = PD.Equipment[i].AttackPoint;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].CriticalPoint        = PD.Equipment[i].CriticalPoint;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].dark                 = PD.Equipment[i].dark;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].Description          = PD.Equipment[i].Description;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EqLevel              = PD.Equipment[i].EqLevel;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EQPositionIndex      = PD.Equipment[i].EQPositionIndex;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EquipmentName        = PD.Equipment[i].EquipmentName;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EquipmentRank        = PD.Equipment[i].EquipmentRank;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].fire                 = PD.Equipment[i].fire;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].ice                  = PD.Equipment[i].ice;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].IsItDescOnly         = PD.Equipment[i].IsItDescOnly;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].IsItEquipped         = PD.Equipment[i].IsItEquipped;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].IsThisDesc           = PD.Equipment[i].IsThisDesc;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].light                = PD.Equipment[i].light;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].MagicalAttack        = PD.Equipment[i].MagicalAttack;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].MagicalAttackOrigin  = PD.Equipment[i].MagicalAttackOrigin;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].MovementSpeed        = PD.Equipment[i].MovementSpeed;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].originaldark         = PD.Equipment[i].originaldark;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].originalfire         = PD.Equipment[i].originalfire;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].originalice          = PD.Equipment[i].originalice;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].originallight        = PD.Equipment[i].originallight;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].PhysicalAttack       = PD.Equipment[i].PhysicalAttack;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].PhysicalAttackOrigin = PD.Equipment[i].PhysicalAttackOrigin;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].Price                = PD.Equipment[i].Price;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].PriceToUpgrade       = PD.Equipment[i].PriceToUpgrade;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].typeOfAttack         = PD.Equipment[i].typeOfAttack;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].typeOfEQ             = PD.Equipment[i].typeOfEQ;
                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].WorkingPoint         = PD.Equipment[i].WorkingPoint;


                EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EquipmentImage = OriginalEQDB.GetComponent <EquipmentInventory>().eqs[EquipmentInv.GetComponent <EquipmentInventory>().eqs[i].EquipmentID].EquipmentImage;
            }

            for (int i = 0; i < CoreInv.GetComponent <CoreInventory>().cores.Count; i++)
            {
                CoreInv.GetComponent <CoreInventory>().cores[i].CoreDescription   = PD.Core[i].CoreDescription;
                CoreInv.GetComponent <CoreInventory>().cores[i].coreID            = PD.Core[i].coreID;
                CoreInv.GetComponent <CoreInventory>().cores[i].coreLevel         = PD.Core[i].coreLevel;
                CoreInv.GetComponent <CoreInventory>().cores[i].coreName          = PD.Core[i].coreName;
                CoreInv.GetComponent <CoreInventory>().cores[i].corePower         = PD.Core[i].corePower;
                CoreInv.GetComponent <CoreInventory>().cores[i].coreRank          = PD.Core[i].coreRank;
                CoreInv.GetComponent <CoreInventory>().cores[i].dark              = PD.Core[i].dark;
                CoreInv.GetComponent <CoreInventory>().cores[i].DEX               = PD.Core[i].DEX;
                CoreInv.GetComponent <CoreInventory>().cores[i].DEXOri            = PD.Core[i].DEXOri;
                CoreInv.GetComponent <CoreInventory>().cores[i].fire              = PD.Core[i].fire;
                CoreInv.GetComponent <CoreInventory>().cores[i].ice               = PD.Core[i].ice;
                CoreInv.GetComponent <CoreInventory>().cores[i].INT               = PD.Core[i].INT;
                CoreInv.GetComponent <CoreInventory>().cores[i].INTOri            = PD.Core[i].INTOri;
                CoreInv.GetComponent <CoreInventory>().cores[i].IsItDescOnly      = PD.Core[i].IsItDescOnly;
                CoreInv.GetComponent <CoreInventory>().cores[i].IsItEquipped      = PD.Core[i].IsItEquipped;
                CoreInv.GetComponent <CoreInventory>().cores[i].IsThisDesc        = PD.Core[i].IsThisDesc;
                CoreInv.GetComponent <CoreInventory>().cores[i].light             = PD.Core[i].light;
                CoreInv.GetComponent <CoreInventory>().cores[i].LUK               = PD.Core[i].LUK;
                CoreInv.GetComponent <CoreInventory>().cores[i].LUKOri            = PD.Core[i].LUKOri;
                CoreInv.GetComponent <CoreInventory>().cores[i].OriginalcorePower = PD.Core[i].OriginalcorePower;
                CoreInv.GetComponent <CoreInventory>().cores[i].Originaldark      = PD.Core[i].Originaldark;
                CoreInv.GetComponent <CoreInventory>().cores[i].Originalfire      = PD.Core[i].Originalfire;
                CoreInv.GetComponent <CoreInventory>().cores[i].Originalice       = PD.Core[i].Originalice;
                CoreInv.GetComponent <CoreInventory>().cores[i].Originallight     = PD.Core[i].Originallight;
                CoreInv.GetComponent <CoreInventory>().cores[i].price             = PD.Core[i].price;
                CoreInv.GetComponent <CoreInventory>().cores[i].priceToUpgrade    = PD.Core[i].priceToUpgrade;
                CoreInv.GetComponent <CoreInventory>().cores[i].STR               = PD.Core[i].STR;
                CoreInv.GetComponent <CoreInventory>().cores[i].STROri            = PD.Core[i].STROri;

                CoreInv.GetComponent <CoreInventory>().cores[i].itemImage = OriginalCoreDB.GetComponent <CoreInventory>().cores[CoreInv.GetComponent <CoreInventory>().cores[i].coreID].itemImage;
            }


            for (int i = 0; i < Skills.GetComponent <SkillDatabase>().SkillDB.Count; i++)
            {
                Skills.GetComponent <SkillDatabase>().SkillDB[i].SkillLevel = PD.LevelOfSkills[i].Level;
            }
        }

        if (SaveSystem.Load(realPath) == null)
        {
            PlayerInfor.Money   = 0;
            PlayerInfor.Diamond = 0;
            PlayerInfor.Stage   = 1;


            SlimeDBOB.transform.GetChild(0).GetComponent <SlimeState>().slimeState.UsedCore = OriginalCoreDB.GetComponent <CoreInventory>().DeepCopyCore(OriginalCoreDB.GetComponent <CoreInventory>().cores[1]);
            SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.UsedCore = OriginalCoreDB.GetComponent <CoreInventory>().DeepCopyCore(OriginalCoreDB.GetComponent <CoreInventory>().cores[1]);
            SlimeDBOB.transform.GetChild(0).GetComponent <SlimeState>().slimeState.Weapon   = OriginalEQDB.GetComponent <EquipmentInventory>().DeepCopyEQ(OriginalEQDB.GetComponent <EquipmentInventory>().eqs[1]);
            SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.Weapon   = OriginalEQDB.GetComponent <EquipmentInventory>().DeepCopyEQ(OriginalEQDB.GetComponent <EquipmentInventory>().eqs[50]);
            SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.Aura     = OriginalEQDB.GetComponent <EquipmentInventory>().DeepCopyEQ(OriginalEQDB.GetComponent <EquipmentInventory>().eqs[106]);

            SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.Weapon.EqLevel = 7;
            ItemRefactorizing.ChangingCore(SlimeDBOB.transform.GetChild(0).GetComponent <SlimeState>().slimeState.UsedCore);
            ItemRefactorizing.ChangingCore(SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.UsedCore);
            ItemRefactorizing.ChaningEQ(SlimeDBOB.transform.GetChild(0).GetComponent <SlimeState>().slimeState.Weapon);
            ItemRefactorizing.ChaningEQ(SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.Weapon);
            ItemRefactorizing.ChaningEQ(SlimeDBOB.transform.GetChild(1).GetComponent <SlimeState>().slimeState.Aura);


            for (int i = 0; i < GateWay.GetComponent <GateWayHP>().GateWayStat.Count; i++)
            {
                GateWay.GetComponent <GateWayHP>().GateWayStat[i] = 1;
            }

            for (int i = 0; i < Skills.GetComponent <SkillDatabase>().SkillDB.Count; i++)
            {
                Skills.GetComponent <SkillDatabase>().SkillDB[i].SkillLevel = 0;
            }
            Skills.GetComponent <SkillDatabase>().SkillDB[0].SkillLevel = 1;
        }
    }