Ejemplo n.º 1
0
 private void OnDestroy()
 {
     foreach (var bodyPartAvailable in collection.getAvailableBodyParts())
     {
         var key             = StyleCollection.bodyPartToString(bodyPartAvailable);
         var spriteMeshDatas = collection.getCustomizerData(bodyPartAvailable);
         var currentId       = spriteMeshDatas.getCurrentMeshId();
         PlayerPrefs.SetString(key, currentId);
     }
     collection.unloadAllAssets();
 }
Ejemplo n.º 2
0
    private void Awake()
    {
        collection = StyleCollection.getInstance();

        m_hoodDatas  = collection.getCustomizerData(BodyPart.Hood);
        m_headDatas  = collection.getCustomizerData(BodyPart.Head);
        m_torsoDatas = collection.getCustomizerData(BodyPart.Torso);

        m_leftShoulderData  = collection.getCustomizerData(BodyPart.LShoulder);
        m_leftElbowData     = collection.getCustomizerData(BodyPart.LElbow);
        m_leftWristData     = collection.getCustomizerData(BodyPart.LWrist);
        m_rightShoulderData = collection.getCustomizerData(BodyPart.RShoulder);
        m_rightElbowData    = collection.getCustomizerData(BodyPart.RElbow);
        m_rightWristData    = collection.getCustomizerData(BodyPart.RWrist);

        m_pelvisDatas = collection.getCustomizerData(BodyPart.Pelvis);

        m_leftLegData   = collection.getCustomizerData(BodyPart.LLeg);
        m_leftBootData  = collection.getCustomizerData(BodyPart.LBoot);
        m_rightLegData  = collection.getCustomizerData(BodyPart.RLeg);
        m_rightBootData = collection.getCustomizerData(BodyPart.RBoot);

        hoodCustomizerFieldController.addCustomizerData(m_hoodDatas);
        headCustomizerFieldController.addCustomizerData(m_headDatas);
        armCustomizerFieldController.addCustomizerData(m_leftShoulderData);
        armCustomizerFieldController.addCustomizerData(m_leftElbowData);
        armCustomizerFieldController.addCustomizerData(m_leftWristData);
        armCustomizerFieldController.addCustomizerData(m_rightShoulderData);
        armCustomizerFieldController.addCustomizerData(m_rightElbowData);
        armCustomizerFieldController.addCustomizerData(m_rightWristData);
        torsoCustomizerFieldController.addCustomizerData(m_torsoDatas);
        pelvisCustomizerFieldController.addCustomizerData(m_pelvisDatas);
        legCustomizerFieldController.addCustomizerData(m_leftLegData);
        legCustomizerFieldController.addCustomizerData(m_leftBootData);
        legCustomizerFieldController.addCustomizerData(m_rightLegData);
        legCustomizerFieldController.addCustomizerData(m_rightBootData);
    }