Пример #1
0
 public DesignPattern GetResultPattern()
 {
     if (IsReady)
     {
         if (ResultPattern != null)
         {
             if (ResultPreview != null)
             {
                 GameObject.DestroyImmediate(ResultPreview.texture);
                 GameObject.DestroyImmediate(ResultPreview);
             }
             ResultPreview = null;
             ResultPixels  = null;
         }
         ResultPattern = new DesignPattern();
         ResultPattern.FromBitmap(Result);
         ResultPattern.Name       = Pattern.Name;
         ResultPattern.PersonalID = new MyHorizons.Data.PlayerData.PersonalID()
         {
             UniqueId = 0xFFFFFFFF, TownId = Pattern.PersonalID.TownId
         };
         ResultPattern.PersonalID.SetName(Pattern.PersonalID.GetName());
         IsReady = false;
     }
     return(ResultPattern);
 }
Пример #2
0
 public EditPattern(Bitmap bitmap)
 {
     _Image   = bitmap;
     _Pattern = new DesignPattern();
     _Pattern.FromBitmap(_Image);
 }