예제 #1
0
 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();
 }
예제 #2
0
 private void Awake()
 {
     _sm = FindObjectOfType <SavingManager>();
     _sm.AddToArray(null, this, null);
 }
예제 #3
0
 private void Awake()
 {
     _sm         = FindObjectOfType <SavingManager>();
     triggerArea = GetComponent <Collider2D>();
     _sm.AddToArray(this, null, null);
 }