示例#1
0
 public void EncodeData(OrnamentProperties p)
 {
     wearingCode          = p.wearingCode;
     mfType               = p.mfType;
     imgName              = p.imgName;
     finalImageUrl        = p.finalImageUrl;
     finalSavePath        = p.finalSavePath;
     lockStatus           = p.lockStatus;
     serializedJsonObject = p.serializedJsonObject;
     _isInitialized       = false;
 }
示例#2
0
 public void DecodeData(out OrnamentProperties p)
 {
     p = new OrnamentProperties
     {
         wearingCode          = wearingCode,
         mfType               = mfType,
         imgName              = imgName,
         finalImageUrl        = finalImageUrl,
         finalSavePath        = finalSavePath,
         lockStatus           = lockStatus,
         serializedJsonObject = serializedJsonObject
     };
 }
示例#3
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));
    }
示例#4
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");
    }