Пример #1
0
 private void CloseCraftingTable()
 {
     mCraftingWindow?.Close();
     mCraftingWindow = null;
     Globals.InCraft = false;
     PacketSender.SendCloseCrafting();
 }
Пример #2
0
 private void Awake()
 {
     player       = FindObjectOfType <Player>();
     followCamera = FindObjectOfType <CameraController>();
     craftWindow  = player.craftWindow;
     plrInter     = player.plrInter;
 }
Пример #3
0
    public void Init(CraftingWindow _window, ItemData _data)
    {
        Data   = _data;
        Window = _window;

        ItemImage.sprite = Data.Sprite;

        ItemButton.onClick.AddListener(delegate { OnClicked(); });
    }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        craftingWindow        = GameObject.FindGameObjectWithTag("CraftingWindow").GetComponent <CraftingWindow>();
        itemDatabase          = GameObject.FindGameObjectWithTag("ItemDatabase").GetComponent <ItemDatabase>();
        inventory             = GameObject.FindGameObjectWithTag("Inventory").GetComponent <Inventory>();
        requirementScrollList = GameObject.FindGameObjectWithTag("RequirementScrollList").GetComponent <RequirementScrollList>();

        RefreshDisplay();
    }
Пример #5
0
        public void OpenCraftingTable()
        {
            if (mCraftingWindow != null)
            {
                mCraftingWindow.Close();
            }

            mCraftingWindow          = new CraftingWindow(GameCanvas);
            mShouldOpenCraftingTable = false;
            Globals.InCraft          = true;
        }
Пример #6
0
 private void Awake()
 {
     craftWindow = FindObjectOfType <CraftingWindow>();
 }
Пример #7
0
 private void Awake()
 {
     plr        = FindObjectOfType <Player>();
     craftWinow = FindObjectOfType <CraftingWindow>();
 }
Пример #8
0
 // Use this for initialization
 void Start()
 {
     craftingWindow = GameObject.FindGameObjectWithTag("CraftingWindow").GetComponent <CraftingWindow>();
     reqScrollList  = GameObject.FindGameObjectWithTag("RequirementScrollList").GetComponent <RequirementScrollList>();
     buttonComponent.onClick.AddListener(HandleClick);
 }
Пример #9
0
 private void CloseCraftingTable()
 {
     mCraftingWindow?.Close();
     mCraftingWindow = null;
     Globals.InCraft = false;
 }