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); }
private void Awake() { enemies = Resources.Load <EnemySet>("ScriptableObjects/SpriteSets/EnemySet"); enemies.Add(this); }