Beispiel #1
0
 void SaveData(bool isAuto)
 {
     isSaving = true;
     Emblem tmp = new Emblem();
     tmp.Set(Layers);
     if(!isAuto)
         PlayerPrefs.SetString("SavedData", tmp.GetBinary());
     else
         PlayerPrefs.SetString("AutoSavedData", tmp.GetBinary());
     nextAutoSave = Time.time + AutoSaveInterval;
     isSaving = false;
 }
Beispiel #2
0
 void Update()
 {
     if(captureIMG)
     {
         FinalEmblem = new Emblem();
         FinalEmblem.Set(Layers);
     }
 }
Beispiel #3
0
 void ExportWindow(int windowID)
 {
     if(GUI.Button(new Rect(ExportWinRect.width - 25, 5, 20, 20), "X"))
     {
         ExportWinClosing = true;
         flatComp = null;
     }
     if(flatComp == null)
     {
         GUI.Label(new Rect(10, 25, 500, 20), "Flattening layers, please wait...");
     }
     if(ExportWinRect.y >= Screen.height/2 -(250)-1)
     {
         if(flatComp == null)
         {
             Emblem tmpE = new Emblem();
             tmpE.Set(Layers);
             flatComp = tmpE.GetFlatTex();
         }else
         {
             GUI.Label(new Rect(10, 25, 100, 20), "Your current Image");
             GUI.BeginGroup(new Rect(10, 45, EmblemSize.width, EmblemSize.height));
             foreach(Layer l in Layers)
             {
                 GUI.DrawTexture(new Rect( l.posX, l.posY, EmblemSize.width, EmblemSize.height), l.texture, ScaleMode.StretchToFill);
             }
             GUI.EndGroup();
             GUI.Label(new Rect(ExportWinRect.width - 100 - 10, 25, 100, 20), "Your Flattened Image");
             GUI.DrawTexture(new Rect(ExportWinRect.width - EmblemSize.width - 10, 45, EmblemSize.width, EmblemSize.height), flatComp, ScaleMode.StretchToFill);
         }
     }
 }