Answers for "shooting gdscript"

0

shooting gdscript

- Area2D ("Bullet")
    - Sprite
    - CollisionShape2D
Posted by: Guest on December-19-2020
0

shooting gdscript

extends Area2D

var speed = 750

func _physics_process(delta):
    position += transform.x * speed * delta

func _on_Bullet_body_entered(body):
    if body.is_in_group("mobs"):
        body.queue_free()
    queue_free()
Posted by: Guest on December-19-2020

Browse Popular Code Answers by Language