/************************************************************************************/ private static void OnLootWindowAppeared_EventHandler(object sender, LSEventArgs e) { try { if (s_Controller != null) { using (new FrameLock(true)) { UpdateStaticGlobals(); LootWindow ThisWindow = s_Extension.LootWindow(); if (s_strLastLootWindowID == e.Args[0]) { Program.Log("Blocking duplicate event for this loot window ({0}).", s_strLastLootWindowID); } else { s_strLastLootWindowID = e.Args[0]; s_Controller.OnLootWindowAppeared(s_strLastLootWindowID, ThisWindow); } } } } catch (Exception ex) { /// Do nothing. But at least the bot doesn't crash! Program.OnUnhandledException(ex); } return; }
private void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(this.gameObject); } canvasGroup = GetComponent <CanvasGroup>(); }
private void Start() { instance = this; prefab = Resources.Load <LootItemObject>("Prefabs/LootItemObject"); }
private void Awake() { lootWindow = GetComponentInParent <LootWindow>(); }
void Start() { Ani = GetComponent<Animator>(); transitionImage = transitionImageObject.GetComponent<Image>(); transitionImage.color = new Color(0.0f, 0.0f, 0.0f, 1f); transitionImageObject.SetActive(true); shopWindowC = shopWindow.GetComponent<ShopWindow>(); lootWindowC = lootWindow.GetComponent<LootWindow>(); portalDialogText = portalDialog.transform.FindChild("Text").gameObject.GetComponent<Text>(); itemDragImage = itemDragContainerObject.transform.FindChild("ItemDragImage").gameObject.GetComponent<Image>(); messageImage = messageImageObject.GetComponent<Image>(); messageImage.color = new Color(1.0f, 1.0f, 1.0f, 0.0f); messageText = messageImageObject.transform.FindChild("MessageText").gameObject.GetComponent<Text>(); messageText.color = new Color(1.0f, 0.7f, 0.0f, 0.0f); loadDialogCanvasGroup = loadDialog.GetComponent<CanvasGroup>(); PlayerHealth = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>().CurrentHealth; }