コード例 #1
0
    public void ClearIndicates()
    {
        if (indicating)
        {
            foreach (Transform child in transform)
            {
                IndicatableS script = child.GetComponentInChildren(typeof(IndicatableS)) as IndicatableS;
                if (script != null)
                {
                    script.IndicateOff();
                }
            }

            indicating = false;
        }
    }
コード例 #2
0
    public void IndicateOne()
    {
        if (!indicating)
        {
            ClearIndicates();

            foreach (Transform child in transform)
            {
                IndicatableS script = child.GetComponentInChildren(typeof(IndicatableS)) as IndicatableS;
                if (script != null && script.Indicatable())
                {
                    script.IndicateOn();
                    indicating = true;
                    break;
                }
            }
        }
    }