EnemyAI Pseudocode

Wasn’t sure what we were supposed to share with psuedocode but here’s my stab at it.

void Enemy::tick(float deltaTime)
{
    // Vector2 toTarget = worldPos - target->worldPos
    // toTarget = Normalize toTarget
    // to Target = toTarget * speed
    // worldPos = toTarget + worldPos
    if (target != nullptr ) screenPos = Vector2Subtract(worldPos, target->getWorldPos());
    BaseCharacter::tick(deltaTime);

}