Esempio n. 1
0
 public void EncodeData(FemaleWigProperties p, Color pcolor)
 {
     wearingCode          = p.wearingCode;
     mfType               = p.mfType;
     imgName              = p.imgName;
     finalImageUrl        = p.finalImageUrl;
     finalSavePath        = p.finalSavePath;
     lockStatus           = p.lockStatus;
     serializedJsonObject = p.serializedJsonObject;
     pColor               = new float[] { pcolor.r, pcolor.g, pcolor.b, pcolor.a };
     _isInitialized       = false;
 }
Esempio n. 2
0
 public void Clone(FemaleWigProperties fwp)
 {
     this.wigColor             = new float[] { fwp.wigColor[0], fwp.wigColor[1], fwp.wigColor[2], fwp.wigColor[3] };
     this.imgName              = fwp.imgName;
     this.finalImageUrl        = fwp.finalImageUrl;
     this.wearingCode          = fwp.wearingCode;
     this.mfType               = fwp.mfType;
     this.finalSavePath        = fwp.finalSavePath;
     this.lockStatus           = fwp.lockStatus;
     this.serializedJsonObject = fwp.serializedJsonObject;
     this.gameController       = fwp.gameController;
     this.mo = fwp.mo;
 }
Esempio n. 3
0
 public void DecodeData(out FemaleWigProperties p)
 {
     p = new FemaleWigProperties
     {
         wearingCode          = wearingCode,
         mfType               = mfType,
         imgName              = imgName,
         finalImageUrl        = finalImageUrl,
         finalSavePath        = finalSavePath,
         lockStatus           = lockStatus,
         serializedJsonObject = serializedJsonObject,
         wigColor             = pColor
     };
 }
Esempio n. 4
0
    public void InitializeProperties()
    {
        dressProperty = new DressProperties();
        dressProperty.InitializeDressProperty(dressData.serializedJsonObject);
        dressProperty.SetDressColor(dressData.pColor);
        femaleWigProperty = new FemaleWigProperties();
        femaleWigProperty.InitializeWigProperty(femaleWigData.serializedJsonObject);
        femaleWigProperty.SetFemaleWigColor(femaleWigData.pColor);
        ornamentProperty = new OrnamentProperties();
        ornamentProperty.InitializeOrnamentProperty(ornamentData.serializedJsonObject);
        shoeProperty = new ShoeProperties();
        shoeProperty.InitializeShoeProperty(shoeData.serializedJsonObject);
        shoeProperty.SetShoeColor(shoeData.pColor);

        backgroundProperty = new BackGroundProperty();
        backgroundData.DecodeData(out backgroundProperty);

        Debug.Log(string.Format(" InitializeProperties-- background data : {0}....{1}", backgroundData.backGroundName, backgroundData.backGroundPath));
        Debug.Log(string.Format(" InitializeProperties-- background Properties : {0}....{1}", backgroundProperty.backGroundName, backgroundProperty.backGroundPath));
    }
Esempio n. 5
0
    public void Initialize(int modelindex, float modelrotation, string model, string bodytone, string eye, GameController gameController, DressProperties dressproperty = null, FemaleWigProperties wigproperty = null, OrnamentProperties ornamentproperty = null, ShoeProperties shoeproperty = null)
    {
        Debug.Log("Initializing started");
        dressData              = new DressData();
        femaleWigData          = new FemaleWigData();
        ornamentData           = new OrnamentData();
        shoeData               = new ShoeData();
        backgroundData         = new BackGroundData();
        maleData               = new MaleData();
        modelIndex             = modelindex;
        modelRotation          = modelrotation;
        modelNameame           = model;
        bodytoneName           = bodytone;
        eyeName                = eye;
        this.dressProperty     = dressproperty;
        this.femaleWigProperty = wigproperty;
        this.ornamentProperty  = ornamentproperty;
        this.shoeProperty      = shoeproperty;
        this.bodyToneColor     = new float[] { 0.5f, gameController.femaleModelImageObject.GetComponent <Image>().color.g, 0.5f, 1f };
        gameController.currentBackgroundProperty.CopyTo(ref backgroundProperty);


        //gameController.currentBackgroundProperty.CopyTo(ref backgroundProperty);
        isShowingMale = gameController.isShowingMale;

        if (gameController.isShowingMale)
        {
            maleData.maleIsShowing = true;
            //maleWigProperty.Clone(gameController.currentMaleWigProperty);
            //maleTieProperty.Clone(gameController.currentMaleTieProperty);



            maleData.EncodeData(gameController);
        }
        else
        {
            maleData.maleIsShowing = false;
        }
        if (dressProperty != null)
        {
            Debug.Log("dress property  initialized");
            dressData.EncodeData(dressProperty, gameController.currentDressColor);

            dressName = dressProperty.imgName;
        }
        if (femaleWigProperty != null)
        {
            femaleWigData.EncodeData(femaleWigProperty, gameController.currentWigColor);

            wigName = femaleWigProperty.imgName;
        }
        if (ornamentProperty != null)
        {
            ornamentData.EncodeData(ornamentProperty);

            ornamentName = ornamentProperty.imgName;
        }
        if (shoeProperty != null)
        {
            shoeData.EncodeData(shoeProperty, gameController.currentShoeColor);

            shoeName = shoeProperty.imgName;
        }
        backgroundData.EncodeData(backgroundProperty);
        Debug.Log("Initialize completed");
    }