public virtual void PickUp() { if (Player.player.inventory.isInventoryFull()) { okMessageController.SetMessage("Inventory is full! Sell or drop items to make space!"); okMessageController.ShowMessage(); } else { Player.player.inventory.addItem(this); this.gameObject.SetActive(false); } }
//=============================================================================== // //=============================================================================== public void OnPlayerCrossedFinishLine() { if (_currentTurn == _numTurns) { Running = false; _messagePanel.ShowMessage("Finish!", 1.5f); Invoke("EndOfRace", 4f); } else { _currentTurn++; if (_currentTurn > 1) { _messagePanel.ShowMessage("Lap " + _currentTurn, 0.6f); } } }