mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
Added bullet despawn timer
This commit is contained in:
parent
a49780f049
commit
c45e9fc300
@ -95,6 +95,16 @@ rotation_decrease={
|
|||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
weapon_1={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777351,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
weapon_2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777352,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ sync func destroy() -> void:
|
|||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
func _on_Destroy_timer_timeout():
|
func _on_destroy_timer_timeout():
|
||||||
if get_tree().has_network_peer():
|
if get_tree().has_network_peer():
|
||||||
if get_tree().is_network_server():
|
if get_tree().is_network_server():
|
||||||
rpc("destroy")
|
rpc("destroy")
|
||||||
|
|||||||
@ -6,18 +6,21 @@
|
|||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 22.0883, 10 )
|
extents = Vector2( 22.0883, 10 )
|
||||||
|
|
||||||
[node name="player_bullet" type="Sprite" groups=["Net"]]
|
[node name="player_bullet" type="Sprite" groups=[
|
||||||
|
"Net",
|
||||||
|
]]
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="hitbox" type="Area2D" parent="." groups=["Player_damager"]]
|
[node name="hitbox" type="Area2D" parent="." groups=[
|
||||||
|
"Player_damager",
|
||||||
|
]]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="hitbox"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="hitbox"]
|
||||||
visible = false
|
visible = false
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="destroy_timer" type="Timer" parent="."]
|
[node name="destroy_timer" type="Timer" parent="."]
|
||||||
wait_time = 5.0
|
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = true
|
autostart = true
|
||||||
|
|
||||||
|
|||||||
@ -334,7 +334,6 @@ animations = [ {
|
|||||||
"Player",
|
"Player",
|
||||||
]]
|
]]
|
||||||
script = ExtResource( 11 )
|
script = ExtResource( 11 )
|
||||||
theme = "03"
|
|
||||||
|
|
||||||
[node name="player_collider" type="CollisionShape2D" parent="."]
|
[node name="player_collider" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user