public void RemoveObject(string itemName, GameObject itemObject) { switch (itemName) { case "Block": Block.Remove(); break; case "Spring": Spring.Remove(); break; case "Speeder": Speeder.Remove(); break; } Destroy(itemObject); }
public void RemoveObject(string itemName, GameObject itemObject) { switch (itemName) { case "Block": Block.Remove(); break; case "Spring": Spring.Remove(); break; case "Speeder": Speeder.Remove(); break; } Destroy(itemObject); }