I'm a complete noob and have been following this tutorial - https://www.youtube.com/watch?v=WEt2JHEe-do&t=4078s and I would differ from the tut and add a mechanic where the enemies get larger as time progresses to make it harder. But, sense I'm a noob, I don't know how to do that. I did try this though:
extends RigidBody2D
export var minspeed = 150.0
export var maxspeed = 250.0
var size = $AnimatedSprite.scale(2, 2)
var size_collision = $Collision.scale(2,2)
func ready():
$AnimatedSprite.playing = true
var mobtypes = $AnimatedSprite.frames.getanimationnames()
$AnimatedSprite.animation = mobtypes[randi() % mobtypes.size()]
func onVisibilityNotifier2Dscreenexited() -> void:
queue_free()
func onSizeTimertimeout() -> void:
size += 1
sizecollision += 1
and it no work :/ error message was: attempt to call function 'scale' in base 'null instance' on a null instance