From 4bb297eff3a4a483b7b2a7786b1b79e5ed471eb9 Mon Sep 17 00:00:00 2001 From: Stedd Date: Sun, 6 Nov 2022 15:11:13 +0100 Subject: [PATCH] Weapon tuning --- Assets/Player/Prefabs/PlayerCapsule.prefab | 4 ++++ Assets/Weapons/Prefabs/Crossbow.prefab | 3 +-- Assets/Weapons/Prefabs/Handgun.prefab | 8 ++++---- Assets/Weapons/Prefabs/MachineGun.prefab | 4 ++-- Assets/Weapons/Prefabs/Revolver.prefab | 9 ++++----- Assets/Weapons/Scripts/AmmoBelt.cs | 3 ++- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Assets/Player/Prefabs/PlayerCapsule.prefab b/Assets/Player/Prefabs/PlayerCapsule.prefab index f5b21b0..6302d91 100644 --- a/Assets/Player/Prefabs/PlayerCapsule.prefab +++ b/Assets/Player/Prefabs/PlayerCapsule.prefab @@ -66,15 +66,19 @@ MonoBehaviour: _ammoSlots: - k__BackingField: 0 k__BackingField: 10 + k__BackingField: 2 k__BackingField: 0 - k__BackingField: 1 k__BackingField: 30 + k__BackingField: 10 k__BackingField: 0 - k__BackingField: 2 k__BackingField: 200 + k__BackingField: 45 k__BackingField: 0 - k__BackingField: 3 k__BackingField: 15 + k__BackingField: 6 k__BackingField: 0 _S_currentBeltAmmoAmount: {fileID: 11400000, guid: f19d1fc1d5102a545800f4f8273640b1, type: 2} _currentWeaponAmmoType: 0 diff --git a/Assets/Weapons/Prefabs/Crossbow.prefab b/Assets/Weapons/Prefabs/Crossbow.prefab index 8fe23b6..a354bb2 100644 --- a/Assets/Weapons/Prefabs/Crossbow.prefab +++ b/Assets/Weapons/Prefabs/Crossbow.prefab @@ -80,7 +80,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _ammoType: 0 - _index: 0 _range: 100 _weaponDamage: 100 _timeBetweenShots: 2 @@ -89,6 +88,7 @@ MonoBehaviour: _muzzleFlash: {fileID: 0} _bulletImpact: {fileID: 252487699782519274, guid: 82851982cb47c134a8403ffcb052b9d2, type: 3} _ammo: {fileID: 1537282594975695390} + _index: 0 _canShoot: 0 --- !u!114 &1537282594975695390 MonoBehaviour: @@ -106,7 +106,6 @@ MonoBehaviour: _maxMagAmmoAmount: 1 _currentMagAmmoAmount: 0 _ammoBelt: {fileID: 0} - _S_currentBeltAmmoAmount: {fileID: 11400000, guid: f19d1fc1d5102a545800f4f8273640b1, type: 2} _S_currentMagAmmoAmount: {fileID: 11400000, guid: 9a77ec14c64717643bed1c6e7a3885ae, type: 2} --- !u!114 &7047714336720636310 MonoBehaviour: diff --git a/Assets/Weapons/Prefabs/Handgun.prefab b/Assets/Weapons/Prefabs/Handgun.prefab index 2e4d50d..2962d9a 100644 --- a/Assets/Weapons/Prefabs/Handgun.prefab +++ b/Assets/Weapons/Prefabs/Handgun.prefab @@ -46,10 +46,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 01ef216392c8f33409f2efcd91f4e510, type: 3} m_Name: m_EditorClassIdentifier: - _ammoType: 2 + _ammoType: 1 _range: 100 - _weaponDamage: 25 - _timeBetweenShots: 0.5 + _weaponDamage: 16.666666 + _timeBetweenShots: 0.25 _timeBetweenReloads: 1.5 _fpCamera: {fileID: 0} _muzzleFlash: {fileID: 0} @@ -70,7 +70,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _ammoType: 1 - _maxMagAmmoAmount: 4 + _maxMagAmmoAmount: 12 _currentMagAmmoAmount: 0 _ammoBelt: {fileID: 0} _S_currentMagAmmoAmount: {fileID: 11400000, guid: 9a77ec14c64717643bed1c6e7a3885ae, type: 2} diff --git a/Assets/Weapons/Prefabs/MachineGun.prefab b/Assets/Weapons/Prefabs/MachineGun.prefab index ed0175d..eca047d 100644 --- a/Assets/Weapons/Prefabs/MachineGun.prefab +++ b/Assets/Weapons/Prefabs/MachineGun.prefab @@ -48,9 +48,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 01ef216392c8f33409f2efcd91f4e510, type: 3} m_Name: m_EditorClassIdentifier: - _ammoType: 1 + _ammoType: 2 _range: 100 - _weaponDamage: 4 + _weaponDamage: 9.090909 _timeBetweenShots: 0.1 _timeBetweenReloads: 1.5 _fpCamera: {fileID: 0} diff --git a/Assets/Weapons/Prefabs/Revolver.prefab b/Assets/Weapons/Prefabs/Revolver.prefab index ac4dc65..a9ca372 100644 --- a/Assets/Weapons/Prefabs/Revolver.prefab +++ b/Assets/Weapons/Prefabs/Revolver.prefab @@ -51,15 +51,15 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _ammoType: 3 - _index: 0 _range: 100 - _weaponDamage: 50 - _timeBetweenShots: 1 + _weaponDamage: 33.333332 + _timeBetweenShots: 0.35 _timeBetweenReloads: 1.5 _fpCamera: {fileID: 0} _muzzleFlash: {fileID: 6070271853189258210} _bulletImpact: {fileID: 252487699782519274, guid: 82851982cb47c134a8403ffcb052b9d2, type: 3} _ammo: {fileID: 8817107657672854186} + _index: 0 _canShoot: 0 --- !u!114 &8817107657672854186 MonoBehaviour: @@ -74,10 +74,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _ammoType: 3 - _maxMagAmmoAmount: 7 + _maxMagAmmoAmount: 6 _currentMagAmmoAmount: 3 _ammoBelt: {fileID: 0} - _S_currentBeltAmmoAmount: {fileID: 11400000, guid: f19d1fc1d5102a545800f4f8273640b1, type: 2} _S_currentMagAmmoAmount: {fileID: 11400000, guid: 9a77ec14c64717643bed1c6e7a3885ae, type: 2} --- !u!114 &3637412066234339666 MonoBehaviour: diff --git a/Assets/Weapons/Scripts/AmmoBelt.cs b/Assets/Weapons/Scripts/AmmoBelt.cs index 25d576e..993b4d8 100644 --- a/Assets/Weapons/Scripts/AmmoBelt.cs +++ b/Assets/Weapons/Scripts/AmmoBelt.cs @@ -21,6 +21,7 @@ public class AmmoBelt : MonoBehaviour { [field: SerializeField] public AmmoType AmmoType { get; set; } [field: SerializeField] public int MaxBeltAmmoAmount { get; set; } + [field: SerializeField] public int StartingBeltAmmoAmount { get; set; } [field: SerializeField] public int CurrentBeltAmmoAmount { get; set; } } @@ -46,7 +47,7 @@ public class AmmoBelt : MonoBehaviour { foreach (AmmoSlot ammoSlot in _ammoSlots) { - ammoSlot.CurrentBeltAmmoAmount = ammoSlot.MaxBeltAmmoAmount; + ammoSlot.CurrentBeltAmmoAmount = ammoSlot.StartingBeltAmmoAmount; } }