From e8dd5d4fd406e6e6b710cbe85309f6870bccc37a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 3 Nov 2019 18:31:04 -0500 Subject: Remove everything --- .../Scripts/Behaviours/LeanLocalizedImage.cs | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedImage.cs (limited to 'Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedImage.cs') diff --git a/Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedImage.cs b/Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedImage.cs deleted file mode 100644 index 664ec95..0000000 --- a/Assets/Packages/Lean/Localization/Scripts/Behaviours/LeanLocalizedImage.cs +++ /dev/null @@ -1,48 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; - -namespace Lean.Localization -{ - /// This component will update an Image component with a localized sprite, or use a fallback if none is found - [ExecuteInEditMode] - [DisallowMultipleComponent] - [RequireComponent(typeof(Image))] - [HelpURL(LeanLocalization.HelpUrlPrefix + "LeanLocalizedImage")] - [AddComponentMenu(LeanLocalization.ComponentPathPrefix + "Localized Image")] - public class LeanLocalizedImage : LeanLocalizedBehaviour - { - [Tooltip("If PhraseName couldn't be found, this sprite will be used")] - public Sprite FallbackSprite; - - // This gets called every time the translation needs updating - public override void UpdateTranslation(LeanTranslation translation) - { - // Get the Image component attached to this GameObject - var image = GetComponent(); - - // Use translation? - if (translation != null && translation.Data is Sprite) - { - image.sprite = (Sprite)translation.Data; - } - // Use fallback? - else - { - image.sprite = FallbackSprite; - } - } - - protected virtual void Awake() - { - // Should we set FallbackSprite? - if (FallbackSprite == null) - { - // Get the SpriteRenderer component attached to this GameObject - var spriteRenderer = GetComponent(); - - // Copy current sprite to fallback - FallbackSprite = spriteRenderer.sprite; - } - } - } -} \ No newline at end of file -- cgit v1.2.3