コード例 #1
0
        private void ItemsBox_SelectionChanged(object sender, Item e)
        {
            if (e == null)
            {
                return;
            }

            if (!e.CanEquip)
            {
                itemsBox.SetSelection(e, false);
            }

            GameManager.Instance.State.Inventory.ForEach(i => i.Equipped = false);
            foreach (var selected in itemsBox.Selected)
            {
                selected.Equipped = true;
            }

            UpdateItemDisplay(e);
        }
コード例 #2
0
        private void _choices_SelectionChanged(object sender, DialogueScreenChoice e)
        {
            if (e == null)
            {
                return;
            }

            var output = EmbeddedFunctionsHelper.Action(e.Action);

            if (!string.IsNullOrEmpty(output))
            {
                _output.Text = output;
            }

            _choices.SetSelection(e, false);
        }