示例#1
0
    void CheckSurvivor()
    {
        survivorNum = 0;

        for (int i = 0; i < m_allPlayers.GetLength(0); ++i)
        {
            HealthPoint_NET hp_net = m_allPlayers [i].GetComponent <HealthPoint_NET> ();
            if (hp_net.isDead == false)
            {
                ++survivorNum;
            }
        }

        if (survivorNum == 1)
        {
            m_gameEnd = true;
        }
    }
示例#2
0
 void Start()
 {
     //hp = GetComponentInParent<HealthPoint> ();
     hp_Net = GetComponentInParent <HealthPoint_NET> ();
 }