12345678910111213141516171819 |
- extends KinematicBody2D
- var motion = Vector2.ZERO
- var type = 4
- var id = ''
- #func _ready():
- # print('bullet gen...')
- func _physics_process(delta):
- var collide = move_and_collide(motion*delta)
- if collide:
- if collide.collider.is_in_group('enemy'):
- collide.collider.damage(-1,id)
- print('col enemy')
- queue_free()
- func _on_Timer_timeout():
- queue_free()
|