private void SortItem(Pickupable pickup, AutosortTarget target)
        {
            container.container.RemoveItem(pickup, true);
            target.AddItem(pickup);

            StartCoroutine(PulseIcon());
        }
        public void Initialize(AutosortTarget locker)
        {
            this.locker        = locker;
            closeButton.target = locker;
            background.sprite  = Common.Utility.ImageUtils.LoadSprite(Mod.GetAssetPath("Background.png"));
            background.color   = new Color(1, 1, 1);

            RefreshCurrentFilters();
            UpdateAvailableTypes();
        }
예제 #3
0
 public static void AddBuildables()
 {
     AutosortLocker.AddBuildable();
     AutosortTarget.AddBuildable();
 }
예제 #4
0
        private static ConfigureButton CreateConfigureButton(Transform parent, Color color, AutosortTarget target)
        {
            var config = LockerPrefabShared.CreateIcon(parent, color, 0);

            RectTransformExtensions.SetSize(config.rectTransform, 20, 20);
            config.rectTransform.anchoredPosition = new Vector2(40, -104);

            config.gameObject.AddComponent <BoxCollider2D>();
            var button = config.gameObject.AddComponent <ConfigureButton>();

            button.target = target;

            return(button);
        }