Пример #1
0
    public void Interact()
    {
        string label = "";

        if (!haveKey)
        {
            if (ammoAmount > 0)
            {
                label = "Found: bullets x " + ammoAmount;
            }
            else
            {
                label = "Found: nothing";
            }
            PlayerAmmo.SetAmmo(ammoAmount);
            ammoAmount = 0;
        }
        else
        {
            label      = "Found: " + nameKey;
            ammoAmount = 0;
            haveKey    = false;
            control.SetOpenDoor();
        }
        dialog.SetDialogText(label, label);
        control.PlaySound();
    }