コード例 #1
0
    public void toggleOwnCone()
    {
        GameObject obj = GameObject.FindGameObjectWithTag("owncone");

        if (obj != null)
        {
            cone c = obj.GetComponent <cone>();
            c.SwitchVis();
        }
    }
コード例 #2
0
    public void SwitchOffOwnCone()
    {
        GameObject obj = GameObject.FindGameObjectWithTag("owncone");

        if (obj != null)
        {
            cone c = obj.GetComponent <cone>();
            if (c.visible)
            {
                c.SwitchVis();
            }
        }
    }