Exemplo n.º 1
0
        public override void Awake()
        {
            base.Awake();
            var t = mDMono.transform;

            if (cellCtrls == null)
            {
                cellCtrls = new UIInventoryBagCellController[t.childCount];

                for (var i = 0; i < t.childCount; i++)
                {
                    cellCtrls[i] = t.GetChild(i).GetMonoILRComponentByClassPath <UIInventoryBagCellController>("Hotfix_LT.UI.UIInventoryBagCellController");
                }
            }

            m_FadeAlpha  = 0.8f;
            m_Alpha      = 1f;
            m_GridScroll = t.parent.GetMonoILRComponentByClassPath <UIInventoryGridScroll>("Hotfix_LT.UI.UIInventoryGridScroll");
            m_Widget     = t.GetComponent <UIWidget>();
        }
Exemplo n.º 2
0
        public override void Awake()
        {
            base.Awake();

            if (mDMono.StringParamList != null && mDMono.StringParamList.Count > 0)
            {
                m_InventoryBagPath = mDMono.StringParamList[0];
            }

            var t = mDMono.transform;

            m_gridScroll = t.GetMonoILRComponentByClassPath <UIInventoryGridScroll>("Hotfix_LT.UI.UIInventoryGridScroll");

            FilterSetting      = new FilterSettingsValue();
            FilterSetting.Size = new Vector2(4, 5);
            FilterSetting.InspectableFilter       = new InspectablePredicate();
            FilterSetting.InspectableFilter.Query = new List <InspectablePredicate.Part>()
            {
                new InspectablePredicate.Part()
                {
                    PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                    PropertyName        = "location",
                    ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.NOT_EQUAL_TO,
                    Value = "equipment"
                },
                new InspectablePredicate.Part()
                {
                    PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                    PropertyName        = "location",
                    ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.NOT_EQUAL_TO,
                    Value = "socket"
                }
            };

            m_TargetSlotsMapEntrys = new List <InspectableSelectionMapEntry>()
            {
                new InspectableSelectionMapEntry()
                {
                    Predicate = new InspectablePredicate()
                    {
                        Query = new List <InspectablePredicate.Part>()
                        {
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "system",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "Equipment"
                            },
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "equipment_type",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "1"
                            }
                        }
                    }
                },
                new InspectableSelectionMapEntry()
                {
                    Predicate = new InspectablePredicate()
                    {
                        Query = new List <InspectablePredicate.Part>()
                        {
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "system",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "Equipment"
                            },
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "equipment_type",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "2"
                            }
                        }
                    }
                },
                new InspectableSelectionMapEntry()
                {
                    Predicate = new InspectablePredicate()
                    {
                        Query = new List <InspectablePredicate.Part>()
                        {
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "system",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "Equipment"
                            },
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "equipment_type",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "3"
                            }
                        }
                    }
                },
                new InspectableSelectionMapEntry()
                {
                    Predicate = new InspectablePredicate()
                    {
                        Query = new List <InspectablePredicate.Part>()
                        {
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "system",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "Equipment"
                            },
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "equipment_type",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "4"
                            }
                        }
                    }
                },
                new InspectableSelectionMapEntry()
                {
                    Predicate = new InspectablePredicate()
                    {
                        Query = new List <InspectablePredicate.Part>()
                        {
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "system",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "Equipment"
                            },
                            new InspectablePredicate.Part()
                            {
                                PreviousPartLogicOperator = InspectablePredicate.LogicalOperatorValue.AND,
                                PropertyName        = "equipment_type",
                                ComparaisonOperator = InspectablePredicate.ComparaisonOperatorValue.EQUAL_TO,
                                Value = "5"
                            }
                        }
                    }
                }
            };
        }