I have a game that looks like this

I want to spawn the enemy mob in the middle of the screen, and then go try to hit the player, if they miss, they go offscreen and get deleted.
E.g.

How can I do this with my current code?
Mob.gd
extends RigidBody2D
export var speed = 250
var velocity = Vector2(1, 0)
func _process(delta):
global_position += velocity.rotated(rotation) * speed * delta
func _ready():
var mob_types = $AnimatedSprite.frames.get_animation_names()
$AnimatedSprite.animation = mob_types[randi() % mob_types.size()]
func _on_VisibilityNotifier2D_screen_exited():
queue_free()
Main.gd
(The "Arena" or "Stage" Scene)
extends Node2D
export var speed = 150
var velocity = Vector2()
var screen_size # Size of the game window.
var center
var mob = preload("res://Scenes/Mob.tscn")
func _ready():
randomize()
screen_size = get_viewport_rect().size
center = screen_size * 0.5
func _process(delta):
velocity.x = int(rand_range(0, 1))
velocity.y = int(rand_range(0, 1))
velocity = velocity.normalized()
global_position += speed * velocity * delta
Global.instance_node(mob, global_position, get_parent())
Global.gd
extends Node
func instance_node(node, location, parent):
var node_instance = node.instance()
parent.add_child(node_instance)
node_instance.global_position = location
return node_instance