Esempio n. 1
0
    public void UpdateDuration(float val)
    {
        int duration = (int)val;

        config.duration = duration;
        string str = "Duration: " + config.duration + " minutes";

        durationLabel.SetText(str);
    }
Esempio n. 2
0
 public void RevertSettings()
 {
     masterVolumeSlider.Value = Session.session.masterVolume;
     sfxVolumeSlider.Value    = Session.session.sfxVolume;
     musicVolumeSlider.Value  = Session.session.musicVolume;
     mouseXSlider.Value       = Session.session.mouseSensitivityX;
     mouseYSlider.Value       = Session.session.mouseSensitivityY;
     userNameBox.SetText(Session.session.userName);
 }
Esempio n. 3
0
    public void UpdateBots(float val)
    {
        int bots = (int)val;

        config.bots = bots;
        string str = "Bots: " + config.bots;

        botsLabel.SetText(str);
    }
Esempio n. 4
0
    public void UpdateDevice(float val)
    {
        GD.Print("Changed to " + val + ", " + deviceFloat);
        int valInt = (int)val;

        DeviceManager.Devices device = (DeviceManager.Devices)valInt;
        string str = "Device: " + DeviceManager.DeviceName(device);

        deviceLabel.SetText(str);
    }
Esempio n. 5
0
 public void Send()
 {
     if (composeBox != null && composeBox.GetText() != "")
     {
         string message = composeBox.GetText();
         ReceiveNamedMessage(message, myName);
         Rpc(nameof(ReceiveNamedMessage), message, myName);
         composeBox.SetText("");
     }
 }
Esempio n. 6
0
 public void Send()
 {
     if (composeBox != null && composeBox.GetText() != "" && nameBox != null)
     {
         string name    = GetName();
         string message = name + "(" + myId + "): " + composeBox.GetText();
         ReceiveMessage(message);
         Rpc(nameof(ReceiveMessage), message);
         composeBox.SetText("");
     }
 }
Esempio n. 7
0
    public void RevertSettings()
    {
        masterVolumeSlider.Value = Session.session.masterVolume;
        sfxVolumeSlider.Value    = Session.session.sfxVolume;
        musicVolumeSlider.Value  = Session.session.musicVolume;
        mouseXSlider.Value       = Session.session.mouseSensitivityX;
        mouseYSlider.Value       = Session.session.mouseSensitivityY;

        int deviceInt = (int)Session.session.player1Device;

        deviceFloat = (float)deviceInt;

        userNameBox.SetText(Session.session.userName);
    }
Esempio n. 8
0
    public void UpdateItemInfo()
    {
        if (itemSelected == -1)
        {
            return;
        }
        itemInfo.Show();
        useButton.Show();
        dropButton.Show();
        ItemData item = itemData[itemSelected];
        string   text = item.GetInfo() + ":\n";

        text += item.GetMoreInfo();
        itemInfo.SetText(text);
    }
Esempio n. 9
0
    public void ReceiveMessage(string message)
    {
        if (messages.Count > 50)
        {
            messages.Remove(messages.First());
        }
        messages.Add(message);
        string str = "";

        for (int i = 0; i < messages.Count; i++)
        {
            str += messages[i] + "\n";
        }
        messageBox.SetText(str);
    }
Esempio n. 10
0
    void BuildPlayers()
    {
        NetworkSession netSes = Session.session.netSes;
        string         names  = "Players(" + netSes.playerData.Count + ")";

        if (countDownActive)
        {
            names += " Starting in " + countDown;
        }

        names += "\n";

        foreach (KeyValuePair <int, PlayerData> entry in netSes.playerData)
        {
            names += entry.Value.name + "\n";
        }
        playersBox.SetText(names);
    }
Esempio n. 11
0
    public void Update()
    {
        Actor player = Session.session.player;

        if (player == null)
        {
            GD.Print("Player 1 doesn't exist.");
            return;
        }

        string healthText = "Health: " + player.GetHealth();

        healthBox.SetText(healthText);

        string itemText = player.ItemInfo();

        itemBox.SetText(itemText);

        string objectiveText = Session.session.GetObjectiveText();

        objectiveBox.SetText(objectiveText);
    }
Esempio n. 12
0
    public void UpdateWeightInfo(int weight)
    {
        string text = "Weight: " + weight;

        weightInfo.SetText(text);
    }
Esempio n. 13
0
    public void UpdateMouseY(float val)
    {
        string str = "Mouse Sensitivity Y: " + val;

        mouseYLabel.SetText(str);
    }
Esempio n. 14
0
    public void UpdateMusicVolume(float val)
    {
        string str = "Music Volume: " + val;

        musicVolumeLabel.SetText(str);
    }
Esempio n. 15
0
    public void UpdateSfxVolume(float val)
    {
        string str = "Sound Effects Volume: " + val;

        sfxVolumeLabel.SetText(str);
    }
Esempio n. 16
0
    public void UpdateMasterVolume(float val)
    {
        string str = "Master Volume: " + val;

        masterVolumeLabel.SetText(str);
    }