Shell casings.
parent
92f9937b14
commit
50f73c7f28
Binary file not shown.
Binary file not shown.
|
@ -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
|
@ -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)
|
||||
|
||||
|
||||
|
|
Reference in New Issue