コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        OrbBase orbBase = other.gameObject.GetComponent <OrbBase>();

        if (orbBase != null)
        {
            Destroy(other.gameObject);
            shield.Miss(orbBase.Colour);
        }
    }
コード例 #2
0
    private void OnTriggerEnter(Collider other)
    {
        OrbBase orbBase = other.gameObject.GetComponent <OrbBase>();

        if (orbBase != null)
        {
            if (orbBase.Colour == Colour)
            {
                Correct(orbBase.Colour);
            }
            else
            {
                //Subtract fuction
                Miss(orbBase.Colour);
            }
            Destroy(other.gameObject);
        }
    }