Esempio n. 1
0
    void Start()
    {
        toolSpawner = FindObjectOfType <ToolSpawner>();

        SetCostLabel();
        image       = GetComponent <Image>();
        image.color = deselectedColor;
        buttons     = FindObjectsOfType <ToolButton>();
    }
Esempio n. 2
0
    public void Select(ToolSpawner toolSpawner)
    {
        if (toolSpawner.tool)
        {
            currentTool = toolSpawner.tool;
        }

        foreach (ToolSpawner ts in toolSpawners)
        {
            if (ts != toolSpawner)
            {
                ts.Deselect();
            }
        }
    }