示例#1
0
    private void Update()
    {
        //If on inventory canvas, display user inventory
        string lcList = "";

        if (_Canvas.name == "Inventory Canvas")
        {
            string[] Inventory = PlayerManagerScript._CurrentPlayer.InventoryList.Split(',');
            foreach (string i in Inventory)
            {
                if (i != "")
                {
                    GameItemScript lcItem = PlayerManagerScript.GetItem(i);
                    lcList = lcList + lcItem.Name + " - S" + lcItem.Score + " - $" + lcItem.Price + "\n";
                }
            }
            _TxtOutput.text = lcList;
            _inputField.ActivateInputField();
        }
    }