public void InitAsPreview(Texture2D dtex, byte[] pxs, List <SaveStep> saveSteps, IPaintFill pFill, Func <int, Color> idToColor)
 {
     this.IdToColor   = idToColor;
     this.paintFill   = pFill;
     this.drawTex     = dtex;
     this.pixels      = pxs;
     this.steps       = saveSteps;
     this.IsAnimating = true;
 }
 public void Init(List <SaveStep> saveSteps, IPaintFill pFill, Func <int, Color> idToColor)
 {
     this.IdToColor          = idToColor;
     this.lineImg.texture    = pFill.LineTex;
     this.paintFill          = pFill;
     this.drawTex            = new Texture2D(this.paintFill.TexWidth, this.paintFill.TexHeight, TextureFormat.RGBA32, false);
     this.drawTex.filterMode = FilterMode.Bilinear;
     this.drawTex.wrapMode   = TextureWrapMode.Clamp;
     this.pixels             = new byte[this.paintFill.TexWidth * this.paintFill.TexHeight * 4];
     if (pFill is ChopFill)
     {
         ((ChopFill)pFill).PrepareCopy(this.pixels);
     }
     this.drawTex.LoadRawTextureData(this.pixels);
     this.drawTex.Apply(false);
     this.drawImg.texture = this.drawTex;
     this.steps           = saveSteps;
     this.IsAnimating     = true;
 }
示例#3
0
 public void SetData(List <SaveStep> saveSteps, IPaintFill pFill, Func <int, Color> idToColor)
 {
     this.coloringAnimation.Init(saveSteps, pFill, idToColor);
 }
示例#4
0
 public void Init(IPaintFill pFill, PaletteData data, NumberController numberController)
 {
     this.pd            = data;
     this.chopFill      = (ChopFill)pFill;
     this.numController = numberController;
 }