// Update is called once per frame void Update() { if (m_cMonsterStatus.getHp() <= 0.0f || m_nNextTarget == m_arTargetTransform.Length) { Destroy(gameObject); } }
// Use this for initialization void Start() { float fHp = (100.0f + m_fPlusHp) * m_fDifficultyHp; m_cMonsterStatus.init(fHp, 2.0f, 0.0f); for (int i = 0; i < m_nTargetCount; i++) { m_arTargetTransform[i] = m_goTmpTargetParent.transform.GetChild(i); } m_nNextTarget = 1; Debug.Log(m_cMonsterStatus.getHp()); }