Files
FueraDeEscala/Assets/Game Kit Controller/Scripts/Inventory/ammoInventoryPrefabCreationSystem.cs

20 lines
532 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ammoInventoryPrefabCreationSystem : inventoryPrefabCreationSystem
{
public override void createInventoryPrefabObject ()
{
ammoPickup currentAmmoPickup = GetComponent<ammoPickup> ();
inventoryObject currentInventoryObject = GetComponentInChildren<inventoryObject> ();
string newName = currentInventoryObject.inventoryObjectInfo.Name;
newName = newName.Replace (" Ammo", "");
currentAmmoPickup.setAmmoName (newName);
}
}