Beispiel #1
0
    void OnTriggerStay(Collider col)
    {
        Hole hole = col.GetComponent <Hole>();

        if (hole != null)
        {
            hole.Infectious();
        }
    }
Beispiel #2
0
    /// <summary>
    /// 感染させる
    /// </summary>
    void HoleInfection()
    {
        if (hole != null)
        {
            hole.Infectious();

            //畑が感染したらパンプ菌も消える
            if (hole.Infection && hole.gameObject.tag == "Hole")
            {
                Destroy(transform.parent.gameObject);
            }
        }
    }