Exemplo n.º 1
0
        public SaveCharacterInfo GetSaveData()
        {
            SaveCharacterInfo save = new SaveCharacterInfo();

            save.m_rTransform_pos = m_rTransform.position;
            save.m_rTransform_rot = m_rTransform.rotation;
            save.m_nameCharacter  = m_character.GetName();
            save.m_indexSprite    = m_character.GetSprites().FindIndex(sprite => sprite == m_image.sprite);
            return(save);
        }
Exemplo n.º 2
0
 public void SetSaveData(SaveCharacterInfo save)
 {
     GetComponent <RectTransform>().position = save.m_rTransform_pos;
     GetComponent <Image>().sprite           = m_character.GetSprites()[save.m_indexSprite];
 }