to new git

This commit is contained in:
2022-05-04 23:50:07 +07:00
parent 290f5515b7
commit c8af0e5284
39 changed files with 720 additions and 359 deletions

View File

@ -1,5 +1,4 @@
using System;
using UnityEngine;
using UnityEngine;
[RequireComponent(typeof(BoxCollider))]
public class AmmoPickUp : MonoBehaviour, IPickable
@ -11,6 +10,11 @@ public class AmmoPickUp : MonoBehaviour, IPickable
PickObject(other.gameObject);
}
private void OnDestroy()
{
Debug.LogWarning("Pooled object was destroyed");
}
public void PickObject(GameObject obj)
{
obj.GetComponent<ICharacter>()?.GetCharacter.Condition.TakeAmmo(SettingsReader.Instance.GetSettings.AmmunitionPickupAmount);