public void TryDoor(EnvironmentGameState destination) { if (InventoryPanel.CurrentlySelectedItem() != null) { ActionLogManager.LogActionStatic("It wasn't necessary."); return; } for (int i = 0; i < doors.Count; i++) { if (doors[i].destinationEnvironment == destination) { ServiceLocator.GetService <AudioManager>().PlayOneShot(doors[i].travelSound); doors[i].destinationEnvironment.LoadEnvironment(); } } }
public void OnPressed() { playerInventory.AddItem(item); ActionLogManager.LogActionStatic("Picked up <color=red>" + item.Name + "."); Destroy(gameObject); }