예제 #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();
        }
    }
예제 #2
0
    public void ActiveteItem()
    {
        if (focusTool.ActiveTool)
        {
            if (activeTool != null && focusTool != activeTool)
            {
                activeTool.DeactivateItem();
            }

            activeTool = focusTool;
        }

        focusTool.ActivateItem();
    }