Shell casings.

remotes/1705382094874458415/tmp_refs/heads/godot4-port
unfa 2020-09-14 23:52:16 +02:00
parent 92f9937b14
commit 50f73c7f28
8 changed files with 1264 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,20 @@
extends RigidBody
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_FreeTimer_timeout():
queue_free()

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
extends Spatial
var casing = preload("res://Assets/Weapons/Handgun/Casing.tscn")
# Declare member variables here. Examples:
# var a = 2
@ -16,5 +17,15 @@ func _ready():
# pass
func shoot():
var casing_instance = casing.instance()
casing_instance.global_transform = find_node("Ejector").global_transform
# TODO - fix casing rotation
# TODO - apply initial linear and angular velocity
get_tree().root.call_deferred("add_child", casing_instance)
$Handgun/AnimationPlayer.stop()
$Handgun/AnimationPlayer.play("Shoot")
$Handgun/AnimationPlayer.play("Shoot", -1, 2)