SpawnPickup() in InventoryItem.cs and not in Pickup.cs

As the title states, why is SpawnPickup() in InventoryItem.cs and not in Pickup.cs?

Because the InventoryItem is responsible for Spawning a Pickup with itself as the target. While it could also be in Pickup, it makes the most sense to keep the SpawnPickup method in once centralized location.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms