Beispiel #1
0
    private void Awake()
    {
        _enemies  = ScriptableObject.CreateInstance <EnemySet>();
        _renderer = GetComponent <SpriteRenderer>();
        _collider = GetComponent <BoxCollider2D>();

        foreach (Enemy enemy in GetComponentsInChildren <Enemy>(true))
        {
            _enemies.Add(enemy);
        }

        if (GetComponentInParent <LianaSeamless>())
        {
            return;
        }

        GameManager.Instance.RegisterForRespawn(gameObject);
    }
Beispiel #2
0
 private void Awake()
 {
     enemies = Resources.Load <EnemySet>("ScriptableObjects/SpriteSets/EnemySet");
     enemies.Add(this);
 }