Exemplo n.º 1
0
    private void SpawnHealthBar(List <Character> characters)
    {
        for (int i = 0; i < characters.Count; i++)
        {
            Debug.Log(characters[i].name);
            HealthBar hp = Instantiate(healthBarPrefab, characters[i].transform.position + Vector3Int.up, Quaternion.identity);
            hp.AssignCharacter(characters[i]);

            hp.transform.SetParent(canvas, false);
        }
    }