public void AssignQuad(OptimizedQuadPolyImage rhs) { this.quad.LT = rhs.quad.LT; this.quad.RT = rhs.quad.RT; this.quad.RB = rhs.quad.RB; this.quad.LB = rhs.quad.LB; this.SetVerticesDirty(); }
public bool ContainsFrom(OptimizedQuadPolyImage img) { if (!img) { return(false); } return(img == this.from); }
public bool ContainsTo(OptimizedQuadPolyImage img) { if (!img) { return(false); } for (int n = 0, cnt = this.to.Count; n < cnt; ++n) { var to = this.to[n]; if (!to) { continue; } if (img == to) { return(true); } } return(false); }
protected override void OnEditorSetting() { base.OnEditorSetting(); if (this.editorRebuild) { this.editorRebuild = false; this.to.Clear(); for (int n = 0, cnt = this.editorRebuildToGroups.Length; n < cnt; ++n) { var group = this.editorRebuildToGroups[n]; if (!group) { continue; } var imgs = group.FindComponentsInChildren <OptimizedQuadPolyImage>(); foreach (var img in imgs) { if (img && !this.Contains(img)) { this.to.Add(img); } } } if (!this.from) { var img = this.FindComponent <OptimizedQuadPolyImage>(); if (img && !this.Contains(img)) { this.from = img; } } } this.Apply(); }
public bool Contains(OptimizedQuadPolyImage img) { return(this.ContainsFrom(img) ? true : this.ContainsTo(img)); }