to new git
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user