예제 #1
0
    private void SpawnEnemy()
    {
        GameObject  go   = Instantiate(m_Enemies[Random.Range(0, m_Enemies.Count)], m_SpawnPoint.transform.position, Quaternion.identity);
        GenericUnit unit = go.GetComponent <GenericUnit>();

        go.transform.parent = GameObject.Find("_Units").transform;
        unit.Initialize(Team.Team2, unit.GetUnitData());
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     m_MaxHealth = m_Unit.GetUnitData().Health;
 }