How do i make an ai shoot? 2D

Hey im making a 2D game and im trying to set up a basic ai. This game is an isometric view kinda like the game “Realm of the Mad God”. I do not know how to make an enemy shoot at a player so i was wondering if anyone could tell me or get me on the right direction on figuring this out.

i tell u the simple way :
1- u create some kind of fire projectiles in your game ( it can be a small cube that has a collider );
2 - u attach a script to this bullut so it can move forward and reduse health on impact to other player;

3 - then u need to make a prefab of it ;
4 - u should learn Instantiation and every time player do fire Instantiation another of this prefab;

so wich part of these u have problem tell me so i can help u ;