/// <summary> /// Flips the sprite. This method is a hack, please make the mFlip varible of UISprite public to avoid using this method. /// </summary> /// <param name="direction">Direction.</param> public void FlipSprite(UISprite.Flip direction) { FieldInfo field = typeof(UISprite).GetField("mFlip", BindingFlags.NonPublic | BindingFlags.Instance); if (field != null) { field.SetValue(this, direction); } }
/// <summary> /// 멤버 변수 값 입력 /// </summary> /// <param name="widget"></param> public override void SetValue(UIWidget widget) { base.SetValue(widget); UISprite sprite = (UISprite)widget; AtlasName = sprite.atlas == null ? "null" : sprite.atlas.name; SpriteName = sprite.spriteName; Type = sprite.type; Flip = sprite.flip; ColorTint = new CustomColor(sprite.color); }