internal void Initialize(GaspodCollectorController mono)
        {
            _mono = mono;

            _blades1 = mono.gameObject.FindChild("model").FindChild("gaspod_container").FindChild("Floater_Top")
                       .FindChild("Tube_2").FindChild("TopBladesController_2");

            _blades2 = mono.gameObject.FindChild("model").FindChild("gaspod_container").FindChild("Floater_Bottom")
                       .FindChild("Tube").FindChild("TopBladesController");
        }
示例#2
0
 internal void Setup(GaspodCollectorController mono)
 {
     _mono      = mono;
     _colorPage = mono.ColorManager;
     if (FindAllComponents())
     {
         _mono.GaspodCollectorStorage.OnAmountChanged += OnStorageAmountChange;
         _amountOfPodsCount.text = $"0/{QPatch.Configuration.Config.StorageLimit}";
         UpdateBatteries(null);
     }
 }
示例#3
0
        internal void Setup(GaspodCollectorController mono)
        {
            _mono = mono;

            var equipmentRoot = new GameObject("BEquipmentRoot");

            equipmentRoot.transform.SetParent(gameObject.transform, false);
            equipmentRoot.AddComponent <ChildObjectIdentifier>();
            equipmentRoot.SetActive(false);

            _equipment = new Equipment(gameObject, equipmentRoot.transform);
            _equipment.SetLabel(GaspodCollectorBuildable.EquipmentContainerLabel());

            Type      equipmentType = typeof(Equipment);
            EventInfo onEquipInfo   = equipmentType.GetEvent("onEquip", BindingFlags.Public | BindingFlags.Instance);
            EventInfo onUnequipInfo = equipmentType.GetEvent("onUnequip", BindingFlags.Public | BindingFlags.Instance);

            Type       powerManagerType  = typeof(GasopdCollectorPowerManager);
            MethodInfo myOnEquipMethod   = powerManagerType.GetMethod("OnEquip", BindingFlags.Instance | BindingFlags.NonPublic);
            MethodInfo myOnUnequipMethod = powerManagerType.GetMethod("OnUnequip", BindingFlags.Instance | BindingFlags.NonPublic);

            var onEquipDelegate   = Delegate.CreateDelegate(typeof(Equipment.OnEquip), this, myOnEquipMethod);
            var onUnequipDelegate = Delegate.CreateDelegate(typeof(Equipment.OnUnequip), this, myOnUnequipMethod);

            onEquipInfo.AddEventHandler(_equipment, onEquipDelegate);
            onUnequipInfo.AddEventHandler(_equipment, onUnequipDelegate);

            _equipment.AddSlot(Slot1);
            _equipment.AddSlot(Slot2);


            if (_equipment == null)
            {
                QuickLogger.Error("Equipment is null on creation");
            }
        }
示例#4
0
 // Token: 0x06000088 RID: 136 RVA: 0x000039FA File Offset: 0x00001BFA
 private static void Prefix(Beacon __instance)
 {
     GaspodCollectorController.TryDetachBeacon(__instance);
 }
 internal void Initialize(GaspodCollectorController mono)
 {
     _mono = mono;
 }