IEnumerator Start() { health = GetComponent <Health2D>(); health.Invuln = true; yield return(new WaitForSeconds(SPAWN_INVULN_TIME)); health.Invuln = false; }
void Awake() { SingletonSetInstance(this, true); health = GetComponent <Health2D>(); health.HealthChanged.AddListener(onDamage); lastFramePosition = transform.position; facingDir = Vector2.up; CurrentLives = MaxLives; }