initial commit
This commit is contained in:
commit
e446938ba7
74 changed files with 3212 additions and 0 deletions
18
bullet.gd
Normal file
18
bullet.gd
Normal file
|
@ -0,0 +1,18 @@
|
|||
extends RigidBody2D
|
||||
|
||||
var bounces = 0
|
||||
|
||||
func hit(body):
|
||||
if body.is_in_group("destructible"):
|
||||
if body.has_method("destroy"):
|
||||
body.destroy()
|
||||
else:
|
||||
body.queue_free()
|
||||
|
||||
queue_free()
|
||||
else:
|
||||
bounces += 1
|
||||
#print(bounces)
|
||||
|
||||
if bounces >= 2:
|
||||
queue_free()
|
Loading…
Add table
Add a link
Reference in a new issue