Fixed some errors
This commit is contained in:
parent
87919ed890
commit
e6a47a4772
9 changed files with 32 additions and 32 deletions
|
|
@ -1,12 +1,13 @@
|
|||
extends RigidBody3D
|
||||
extends CharacterBody3D
|
||||
|
||||
|
||||
var contacts: int = 0
|
||||
|
||||
func _on_body_entered(_body: Node) -> void:
|
||||
contacts += 1
|
||||
if contacts > 2:
|
||||
var fire = preload("uid://l4t1mflutm3t").instantiate()
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
||||
velocity += get_gravity() * delta
|
||||
|
||||
if is_on_floor():
|
||||
var fire: Node3D = preload("res://weapons/molikman/molik/molikman_molotov_fire.tscn").instantiate()
|
||||
Session.dynamic_objects_parent.add_child(fire,true)
|
||||
fire.global_position = global_position
|
||||
queue_free()
|
||||
|
||||
move_and_slide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue