private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { PanelText.SetActive(true); //other.GetTargetInteract(this); if (Input.GetKeyUp(KeyCode.R)) { GetOrInteract(); } if (Input.GetKeyUp(KeyCode.F)) { Interact(); } if (Input.GetButton(_keyQ)) { if (!shootGo) { lr.gameObject.SetActive(true); Throught(); } } else { lr.gameObject.SetActive(false); } } }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { string message; if (_daysTillWipe == 0) { message = Lang(LangKeys.Today); } else if (_daysTillWipe == 1) { message = Lang(LangKeys.OneDay); } else { message = Lang(LangKeys.Days, _daysTillWipe); } text.Text = string.Format(_textFormat, message); } return(panel.ToHash()); }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { PanelText.SetActive(true); } }
public async Task <IActionResult> Edit(int id, [Bind("Id,OrderNumber,TextContent,TailX,TailY,TextClass,PanelId")] PanelText panelText) { if (id != panelText.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(panelText); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PanelTextExists(panelText.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PanelId"] = new SelectList(_context.Panels, "Id", "Id", panelText.PanelId); return(View(panelText)); }
public virtual void Throught() { PanelLoadBar.SetActive(false); PanelText.SetActive(false); if (!(BarLoad.fillAmount >= 1.0f)) { BarLoad.fillAmount = 0.0f; } if (!shootGo) { mousePosition = Input.mousePosition; mousePosition.z = actualDistance; } lr.SetPosition(0, new Vector3(this.transform.position.x, this.transform.position.y, this.transform.position.z)); lr.SetPosition(1, (Camera.main.ScreenToWorldPoint(mousePosition))); // Click y lanzar if (Input.GetMouseButtonDown(0)) { shootGo = true; } }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { object globalGather = Interface.Call("GetGlobalGather"); if (globalGather is float) { text.Text = string.Format(_gatherFormat, (float)globalGather); } else { object playerGather = Interface.Call("GetGatherForPlayer", player); if (playerGather is float) { text.Text = string.Format(_gatherFormat, (float)playerGather); } else { text.Text = string.Format(_gatherFormat, _pluginConfig.DefaultGather); } } } return(panel.ToHash()); }
private void Start() { inputPlayer = GetComponent<Inputs>(); PanelText.SetActive(false); PanelLoadBar.SetActive(false); TextToUse.text = itemBase.TextUI; }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { PanelText.SetActive(true); //other.GetTargetInteract(this); } }
private void Start() { var cf = Instantiate(itemBase.Model, new Vector3(transform.position.x, transform.position.y, transform.position.z), this.transform.rotation); cf.transform.SetParent(this.transform); PanelText.SetActive(false); PanelLoadBar.SetActive(false); TextToUse.text = itemBase.TextUI; }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_fpsText, $"{Performance.report.frameRate}"); } return(panel.ToHash()); }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_textFormat, ServerMgr.Instance.connectionQueue.Queued); } return(panel.ToHash()); }
public async Task <IActionResult> Create([Bind("Id,OrderNumber,TextContent,TailX,TailY,TextClass,PanelId")] PanelText panelText) { if (ModelState.IsValid) { _context.Add(panelText); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PanelId"] = new SelectList(_context.Panels, "Id", "Id", panelText.PanelId); return(View(panelText)); }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_textFormat, SaveRestore.SaveCreatedTime); } return(panel.ToHash()); }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_textFormat, BasePlayer.sleepingPlayerList.Count.ToString()); } return(panel.ToHash()); }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { PanelText.SetActive(true); if (Input.GetButtonDown(_keyF)) { GetOrInteract(); } } }
public Panel(Hash <string, object> data) { if (data.ContainsKey(nameof(Image))) { Image = new PanelImage((Hash <string, object>)data[nameof(Image)]); } if (data.ContainsKey(nameof(Text))) { Text = new PanelText((Hash <string, object>)data[nameof(Text)]); } }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_textFormat, Economics?.Call <double>("Balance", player.userID) ?? 0); } return(panel.ToHash()); }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_textFormat, DateTime.Now); } return(panel.ToHash()); }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { int points = _playerRewards[player.userID]; text.Text = string.Format(_textFormat, points); } return(panel.ToHash()); }
private void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Player") { PanelLoadBar.SetActive(false); PanelText.SetActive(false); if (!(BarLoad.fillAmount >= 1.0f)) { BarLoad.fillAmount = 0.0f; } } }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { Vector3 pos = _playerPositions[player.userID]; text.Text = string.Format(_coordText, pos.x, pos.y, pos.z); } return(panel.ToHash()); }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { float ping = _playerPing[player.userID]; text.Text = string.Format(_text, ping); } return(panel.ToHash()); }
public override void AssignAnswer(int buttonIndex, int _i) { base.AssignAnswer(buttonIndex, _i); PanelText panelText = PanelText.instance; // Set the correct graphic for this answer. string[] arrAnswers = answers.GetAnswersArray(); // Target the current button and assigns the text that matches it's answer. Quiz.instance.questionPanels.text.GetComponent <PanelText>().textButtons[buttonIndex].transform.GetChild(0).GetComponent <Text>().text = arrAnswers[_i]; StaticMethods.AssignButtonAction(Quiz.instance.questionPanels.text.GetComponent <PanelText>().textButtons[buttonIndex], (_i == 0) ? (UnityAction)CorrectAnswer : IncorrectAnswer); }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { text.Text = string.Format(_textFormat, BasePlayer.activePlayerList.Count(p => !_pluginConfig.ExcludeAdmins || !p.IsAdmin), ConVar.Server.maxplayers); } return(panel.ToHash()); }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { string currency = _currencies[_currencyIndex]; double amount = GetPlayerCash(player.userID, currency); text.Text = string.Format(_textFormat, currency, amount); } return(panel.ToHash()); }
private void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { PlayerContact = true; PanelText.SetActive(true); if (Input.GetButtonDown(_keyF)) { anim = this.gameObject.GetComponentInChildren <Animator>(); ID = this.GetComponent <ObjectID>(); GetOrInteract(); } } }
private void Start() { //var cf = Instantiate(itemBase.Model, new Vector3(transform.position.x, transform.position.y, transform.position.z), this.transform.rotation); //cf.transform.SetParent(this.transform); //cf.transform.localScale = (Scale); //anim = cf.GetComponentInChildren<Animator>(); inventory = GameObject.FindGameObjectWithTag("Inventario").GetComponent <Inventory>(); PanelText.SetActive(false); PanelLoadBar.SetActive(false); TextToUse.text = itemBase.TextUI; //Canvas tmp = this.GetComponentInChildren<Canvas>(); //tmp.worldCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>(); //tmp.planeDistance = 5.0f; //CanvasScaler tmpCS = this.GetComponentInChildren<CanvasScaler>(); //tmpCS.referenceResolution = new Vector2(1920.0f, 1080.0f); }
private Hash <string, object> GetPanel(BasePlayer player) { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { PlayerRadiationData data = GetPlayerData(player); float radAmount = data.RadAmount; float radProtection = data.ProtectionAmount; text.Text = string.Format(_textFormat, radProtection, radAmount); } return(panel.ToHash()); }
private void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Player") { PlayerContact = false; PanelLoadBar.SetActive(false); PanelText.SetActive(false); Stoped(); if (BarLoad.fillAmount == 1.0f) { BarLoad.fillAmount = 0.0f; } } }
private Hash <string, object> GetPanel() { Panel panel = _pluginConfig.Panel; PanelText text = panel.Text; if (text != null) { string message = string.Empty; if (_deathQueue.Count != 0) { message = _deathQueue.Dequeue(); } text.Text = string.Format(_deathText, message); } return(panel.ToHash()); }