Exemplo n.º 1
0
        public StoreButton(GameObject store_button, IShopDescriptor shop)
        {
            Shop         = shop;
            ButtonHolder = GameObject.Instantiate(store_button);
            ButtonHolder.transform.SetParent(store_button.transform.parent);

            Button  = ButtonHolder.transform.GetChild(0).GetComponent <HBSDOTweenStoreTypeToggle>();
            Overlay = ButtonHolder.transform.GetChild(1).gameObject;
            Button.OnClicked.RemoveAllListeners();
            Button.OnClicked.AddListener(OnClick);
            Icon = Button.transform.Find("tab_icon").GetComponent <Image>();
        }
Exemplo n.º 2
0
 static void Postfix(SG_Shop_Screen __instance, StarSystem ___theSystem, SimGameState ___simState, HBSDOTweenStoreTypeToggle ___FactionStoreButton, GameObject ___LowRepFactionOverlay, GameObject ___SystemStoreButtonHoldingObject, GameObject ___FactionStoreButtonHoldingObject)
 {
     try {
         if (___simState.IsFactionAlly(___theSystem.Owner, null))
         {
             ___FactionStoreButton.FillInByFaction(___simState, ___theSystem.Owner);
             ___SystemStoreButtonHoldingObject.SetActive(true);
             ___FactionStoreButtonHoldingObject.SetActive(true);
             ___FactionStoreButton.SetState(ButtonState.Enabled, false);
             ___LowRepFactionOverlay.SetActive(false);
         }
     }
     catch (Exception e) {
         PersistentMapClient.Logger.LogError(e);
     }
 }