Exemplo n.º 1
0
    private void OnForgeDragStartedCB(GameObject obj)
    {
        ForgeGuiItem component = obj.GetComponent <ForgeGuiItem>();

        if (component != null)
        {
            ImageDragPanel guiPanel = base.GuiService.GetGuiPanel <ImageDragPanel>();
            guiPanel.Show(new object[]
            {
                component.ItemDefinition
            });
            AgeTransform component2 = guiPanel.GetComponent <AgeTransform>();
            component2.X = AgeManager.Instance.Cursor.x - 0.5f * component2.Width;
            component2.Y = AgeManager.Instance.Cursor.y - 0.5f * component2.Height;
            if (this.DragReceiver != null)
            {
                this.DragReceiver.SendMessage("OnForgeDragStartedCB", component.ItemDefinition, SendMessageOptions.RequireReceiver);
            }
        }
        else
        {
            obj.SendMessage("OnResetInteraction", SendMessageOptions.DontRequireReceiver);
        }
    }
Exemplo n.º 2
0
    private void RefreshForgeItem(AgeTransform tableitem, ItemDefinition itemDefinition, int index)
    {
        ForgeGuiItem component = tableitem.GetComponent <ForgeGuiItem>();

        component.RefreshContent(this.Empire, itemDefinition, base.gameObject, this.itemEnableState[index]);
    }