// Start is called before the first frame update void Start() { health = maxhealth; enemyaudiosource = gameObject.GetComponent <AudioSource>(); enemyanimations = gameObject.GetComponent <Animator>(); enemyattack = gameObject.GetComponent <enemy_ai>(); playerimpulse = player.GetComponent <Movement>(); enemydamge = player.GetComponent <fighting>(); playerstat = player.GetComponent <Stats>(); playeranimation = player.GetComponent <Animator>(); flip = gameObject.GetComponent <enemy_flip>(); }
// Start is called before the first frame update void Start() { attack_time = 0f; rb = gameObject.GetComponent <Rigidbody2D>(); flip = gameObject.GetComponent <enemy_flip>(); }