예제 #1
0
 void Start()
 {
     if (StaticLanguage.getLanguage().Equals("portuguese"))
     {
         genero.text    = "Género";
         ethnicity.text = "Etnia";
     }
     else
     {
         genero.text    = "Gender";
         ethnicity.text = "Ethnicity";
     }
     if (!System.IO.File.Exists(Application.persistentDataPath + "/avatar"))
     {
         avatar = new AvatarSelection();
     }
     else
     {
         avatar = FileManager.ReadFromBinaryFile <AvatarSelection> (Application.persistentDataPath + "/avatar");
     }
     head.sprite  = avatar.selectCurrentHead();
     torso.sprite = avatar.selectCurrentTorso();
     legs.sprite  = avatar.selectCurrentLegs();
     if (avatar.getGender().Equals("Male"))
     {
         male.interactable = false;
     }
     else
     {
         female.interactable = false;
     }
 }
예제 #2
0
 void Start()
 {
     if (!System.IO.File.Exists(Application.persistentDataPath + "/avatar"))
     {
         avatar = new AvatarSelection();
     }
     else
     {
         avatar = FileManager.ReadFromBinaryFile <AvatarSelection> (Application.persistentDataPath + "/avatar");
     }
     head.sprite  = avatar.selectCurrentHead();
     torso.sprite = avatar.selectCurrentTorso();
     legs.sprite  = avatar.selectCurrentLegs();
 }