19 public void TryRefresh(
bool force)
21 if (!File.Exists(
this.file.FullName))
25 DateTime lastWriteTime = File.GetLastWriteTime(this.file.FullName);
26 bool flag = this.date.Year != 1 && this.date.Equals(lastWriteTime);
27 if (!flag || force || !this.tex)
31 this.date = lastWriteTime;
35 public void Load(
bool dateMatched)
39 UnityEngine.Object.Destroy(this.tex);
41 this.tex = IO.LoadPNG(this.file.FullName, FilterMode.Point);
42 this.w = this.tex.width;
43 this.h = this.tex.height;
44 int dstX = this.index % 100 * this.data.tileW;
45 int dstY = this.data.tex.height - this.index / 100 * this.data.tileH - this.tex.height;
46 Graphics.CopyTexture(this.tex, 0, 0, 0, 0, this.tex.width,
this.tex.height,
this.data.tex, 0, 0, dstX, dstY);
50 public void DestoryTex()
52 UnityEngine.Object.Destroy(this.tex);
77 public TextureReplace.Source source;