update scripts

This commit is contained in:
2022-04-25 16:23:25 +07:00
parent e1d0bbc1eb
commit 290f5515b7
13 changed files with 120 additions and 47 deletions

View File

@ -13,7 +13,7 @@ public class AmmoPickUp : MonoBehaviour, IPickable
public void PickObject(GameObject obj)
{
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.TakeAmmo(SettingsReader.Instance.GetSettings.ammunitionPickupAmount);
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.TakeAmmo(SettingsReader.Instance.GetSettings.AmmunitionPickupAmount);
gameObject.SetActive(false);
}
}

View File

@ -13,7 +13,7 @@ public class ArmourPickUp : MonoBehaviour, IPickable
public void PickObject(GameObject obj)
{
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.GiveArmour(SettingsReader.Instance.GetSettings.armourPickupAmount);
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.GiveArmour(SettingsReader.Instance.GetSettings.ArmourPickupAmount);
gameObject.SetActive(false);
}
}

View File

@ -13,7 +13,7 @@ public class HealthPickUp : MonoBehaviour, IPickable
public void PickObject(GameObject obj)
{
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.GiveHealth(SettingsReader.Instance.GetSettings.healthPickupAmount);
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.GiveHealth(SettingsReader.Instance.GetSettings.HealthPickupAmount);
gameObject.SetActive(false);
}
}

View File

@ -27,7 +27,7 @@ public class PickUpSpawner : MonoBehaviour
private void Start()
{
pickups = new List<GameObject>();
var amount = SettingsReader.Instance.GetSettings.pickupsAmount;
var amount = SettingsReader.Instance.GetSettings.PickupsAmount;
for (int i = 0; i < amount; i++)
pickups.Add(GameObject.Instantiate(healthPrefab, spawnPoints[Random.Range(0, spawnPoints.Count)].transform.position, Quaternion.identity));
for (int i = 0; i < amount; i++)