Ejemplo n.º 1
0
 public SkinData(SkinSelector SS)
 {
     unlockedSkins  = SS.unlockedSkins[1];
     unlockedSkins2 = SS.unlockedSkins[2];
     unlockedSkins3 = SS.unlockedSkins[3];
     unlockedSkins4 = SS.unlockedSkins[4];
 }
Ejemplo n.º 2
0
    public static void SaveSkins(SkinSelector SS)
    {
        BinaryFormatter bF   = new BinaryFormatter();
        string          path = Application.persistentDataPath + "/skins.wave";
        FileStream      fS   = new FileStream(path, FileMode.Create);
        SkinData        sD   = new SkinData(SS);

        bF.Serialize(fS, sD);
    }
Ejemplo n.º 3
0
    private void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
Ejemplo n.º 4
0
 void Initialize()
 {
     for (int i = 0; i < _ballSkinController.skins.Count; i++)
     {
         Skin         skin         = _ballSkinController.skins[i];
         Sprite       s            = skin._previewImage;
         GameObject   skinSelector = GameObject.Instantiate(_skinSelector, _container.transform);
         SkinSelector ss           = skinSelector.GetComponent <SkinSelector>();
         _skinSelectors.Add(ss);
         bool selected = false;
         if (i == _ballSkinController.selected.id)
         {
             selected = true;
         }
         ss.Initialize(s.name, selected, s, i, OnSkinSelect);
     }
 }
 private new void Start()
 {
     base.Start();
     skinSelector = GetComponent <SkinSelector>();
 }
Ejemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     instance    = this;
     currentSkin = 0;
 }