Ejemplo n.º 1
0
    public void Initialize()
    {
        foreach (Tool tool in allTools)
        {
            tools.Add(tool);
        }

        CalculateTop();

        foreach (Tool tool in tools)
        {
            tool.Initialize(this);
        }

        focusTool = tools[0];

        toolTop.GetComponent <MeshRenderer>().material    = MaterialHolder.ToolsetMaterial;
        toolBottom.GetComponent <MeshRenderer>().material = MaterialHolder.ToolsetMaterial;

        if (activeTool != null)
        {
            activeTool.ActivateItem();
        }

        if (BoltNetwork.IsRunning && BoltNetwork.IsClient)
        {
            ControllerSpawned.Create().Send();
        }
    }
Ejemplo n.º 2
0
    public void ActiveteItem()
    {
        if (focusTool.ActiveTool)
        {
            if (activeTool != null && focusTool != activeTool)
            {
                activeTool.DeactivateItem();
            }

            activeTool = focusTool;
        }

        focusTool.ActivateItem();
    }