added machinegun turret

This commit is contained in:
Haze Weathers 2023-01-22 01:18:56 -05:00
parent a85b68a317
commit 5f6968a7e9
11 changed files with 567 additions and 2 deletions

View file

@ -0,0 +1,18 @@
extends Node2D
export var speed = 100.0
var direction = Vector2.DOWN
func _physics_process(delta):
position += direction * speed * delta
func _on_Hitbox_area_entered(area):
if area.is_in_group("player"):
area.get_parent().die()
func _on_Hitbox_body_entered(body):
if body is TileMap or body is StaticBody2D:
queue_free()