/************************************************************************************/
        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;
        }
Exemplo n.º 2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != null)
     {
         Destroy(this.gameObject);
     }
     canvasGroup = GetComponent <CanvasGroup>();
 }
Exemplo n.º 3
0
 private void Start()
 {
     instance = this;
     prefab   = Resources.Load <LootItemObject>("Prefabs/LootItemObject");
 }
Exemplo n.º 4
0
 private void Awake()
 {
     lootWindow = GetComponentInParent <LootWindow>();
 }
Exemplo n.º 5
0
    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;
    }