Exemplo n.º 1
0
    private void DrawWeaponList()
    {
        if (_containerViewModel == null)
        {
            return;
        }

        _weaponDrawer.Start();

        _containerViewModel.Refresh();

        var items = _containerViewModel.Items;

        for (var i = 0; i < items.Count; i++)
        {
            var item = items[i];

            string label = (i + 1).ToString();

            if (i == _player.EquippedItem.SlotNumber)
            {
                _weaponDrawer.AddItem("*" + " " + item.DisplayName, item.QuantityText);
            }
            else
            {
                _weaponDrawer.AddItem(label + " " + item.DisplayName, item.QuantityText);
            }
        }

        _weaponDrawer.Draw();
    }
Exemplo n.º 2
0
    private void DrawLookAtItem()
    {
        var component = AllServices.RaycastService.Raycast <IComponent>(_player.Transform.ToRay(), 100);

        if (component != null)
        {
            _currentObjectDrawer.Add(component);
            _currentObjectDrawer.Draw();
        }
    }