First-pass player animations: idle, shooting

This commit is contained in:
Squinternator 2024-04-11 12:23:02 +00:00
parent ae32f6095a
commit 53363e0384
5 changed files with 122 additions and 7 deletions

View file

@ -13,8 +13,11 @@ var weapon_state : WeaponState = WeaponState.WEAPON_READY
const inheritance : float = .5 # ratio
const reload_time : float = 1. # seconds
func can_fire():
return weapon_state == WeaponState.WEAPON_READY
func fire_primary():
if weapon_state != WeaponState.WEAPON_READY:
if not can_fire():
return
var projectile = PROJECTILE.instantiate()

View file

@ -60,10 +60,10 @@ shadow_mesh = SubResource("ArrayMesh_2hpnh")
script = ExtResource("1_6sm4s")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0.1, -0.078, 0.2)
transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0.15, -0.1, 0.3)
layers = 1048575
mesh = SubResource("ArrayMesh_hudfn")
skeleton = NodePath("")
[node name="Nozzle" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.315549)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.540839)