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; } }
void Start() { //hp = GetComponentInParent<HealthPoint> (); hp_Net = GetComponentInParent <HealthPoint_NET> (); }