private void Awake() { sm = FindObjectOfType <SavingManager>(); sm.AddToArray(null, null, null, this); currentState = EnemyState.idle; health = maxHealth.value; knock = GetComponent <Knockback>(); spriteRenderer = GetComponent <SpriteRenderer>(); SetMaxHealth(); }
private void Awake() { _sm = FindObjectOfType <SavingManager>(); _sm.AddToArray(null, this, null); }
private void Awake() { _sm = FindObjectOfType <SavingManager>(); triggerArea = GetComponent <Collider2D>(); _sm.AddToArray(this, null, null); }