private bool dying = false; // needed for revenge, or else death will run with hurt, which will animate a destroyed object #region Initialization void Awake() { myRenderer = GetComponent <SpriteRenderer>(); audioSource = GetComponent <AudioSource>(); animator = GetComponent <Animator>(); health = initialHealth; InfoHolder = FindObjectOfType <InforUI>(); }
private void Awake() { rb = this.GetComponent <Rigidbody2D>(); main = Camera.main; InfoHolder = FindObjectOfType <InforUI>(); }