Lots of work on saving, enemies and object positions are now saved

This commit is contained in:
Derek
2024-12-02 22:52:21 -06:00
parent a9aaed9c6f
commit 299257e0d9
22 changed files with 186 additions and 30 deletions

View File

@@ -96,6 +96,7 @@ func shoot(delta):
player.recoil.add_recoil(Vector3(0,recoil_amount.y,recoil_amount.z),10,10)
player.recoil.add_gun_recoil(recoil_amount.x)
#player.velocity += player.bullet_ray.global_basis * Vector3(0,0, kick_amount)
SaveLoad.shots_fired += 1
if fire_mode != 0:
cycle_count -= 1
@@ -118,6 +119,7 @@ func spawn_mag():
var instance_mag = mag.instantiate()
instance_mag.position = mag_ejector.global_position
instance_mag.transform.basis = mag_ejector.global_transform.basis
instance_mag.linear_velocity += transform.basis * Vector3(0, -20, 0) + player.velocity
get_tree().get_root().add_child(instance_mag)
func spawn_casing():