void StoreData() { walkRate = 5f / energyToWalk * 100f; reproRate = 50f / energyToReproduce * 100f; // != null) TextUpdate.UpdateText(myGeneration, stepsTaken, walkRate, reproRate, energyToWalk, energyToReproduce); }
public Inventory Inv; //Declare Inventory Object // Use this for initialization void Start () { isPickedUp = false; // You have to actually pick up the item before you may use it InfoText = GameObject.FindObjectOfType (typeof(TextUpdate)) as TextUpdate; //The only form of initializing a class that unity 5 likes Inv = GameObject.FindObjectOfType (typeof(Inventory)) as Inventory; RandomSpawn (); //More Playability! Now The developers are as lost as everyone else! }
public FishyNote(int fishyNoteID, RemoveDelegate deleteMe, TextUpdate noteTextUpdate, RetriveText retriveNoteText) { InitializeComponent(); _fishyNoteID = fishyNoteID; _deleteMe += deleteMe; _noteTextUpdate += noteTextUpdate; _retriveNoteText += retriveNoteText; }
private void textBox1_TextChanged(object sender, EventArgs e) { if (IsButtonPressed) { ClearRedoes?.Invoke(this, EventArgs.Empty); TextUpdate?.Invoke(this, EventArgs.Empty); toolStripButton1.Enabled = true; toolStripButton2.Enabled = false; } }
public Ksdevice() { InitializeComponent(); this.Width = 198; this.Height = 275; _queuecount = 0; ViewInit(); this.AllowDrop = true; myinvoke = new ListUpdate(myinvokefun); textinvoke = new TextUpdate(textinvokefun); queueaddinvoke1 = new QueueADDInvoke(queueaddinvoke1fun); clearInvoke1 = new ClearInvoke(clearInvokefun); }
[SerializeField] AudioClip goalHornSound2; //Vegas Golden Knights // Use this for initialization void Start() { team1Goal = GetComponent <GoalWaypointLocation>().team1GoalPosts; team2Goal = GetComponent <GoalWaypointLocation>().team2GoalPosts; puck = FindObjectOfType <PuckController>(); textUpdate = FindObjectOfType <TextUpdate>(); currentTurn = Turn.team2; pathfinder = FindObjectOfType <Pathfinder>(); gameState = GameState.pickPlayer; LoadTeams(); LineUpForFaceOff(); ambientSource.clip = ambientSound; ambientSource.Play(); }
/// <inheritdoc /> public void SendTextUpdate(string newText) { Text = newText; //Possible user methods try { TextUpdate?.Invoke(newText); } catch (Exception e) { Urho.IO.Log.Write(Urho.LogLevel.Warning, $"There was an unexpected exception during the invocation of {nameof(TextUpdate)}: {e.Message}"); } parent?.SendTextUpdate(newText); }
OptionsMenuButton CreateButton(string defaultText, UnityAction action, TextUpdate textUpdate) { OptionsMenuButton b = Instantiate(buttonPrefab, menuContent); b.text.text = defaultText; b.button.onClick.AddListener(action); if (textUpdate != null) { b.button.onClick.AddListener(delegate { b.text.text = textUpdate(); Debug.Log(textUpdate()); }); } b.transform.ResetTransform(); return(b); }
public LinkOwner AddTextUpdate(string url, string htmlTags, string innerText) { if (!links.Any(pair => pair.Value.domain.OriginalString == url && pair.Value.htmlTags == htmlTags)) { ITextUpdate textUpdate = new TextUpdate(url, htmlTags, innerText); TextOwner textResults = DataManager.Instance.CreateEntry(textUpdate, id) as TextOwner; links.Add(textResults.resultsid, textResults); return(textResults); } else { throw new Exception(); } }
void Start() { dataSet = new List <Vector2>(); OLSLine = GetComponent <LineRenderer>(); if (OLSLine == null) { Debug.LogError("Could not find LineRenderer on " + this); } gradientLine = GameObject.FindGameObjectWithTag("GradientLine").GetComponent <LineRenderer>(); if (OLSLine == null) { Debug.LogError("Could not find LineRenderer on " + this); } text = FindObjectOfType <TextUpdate>(); if (text == null) { Debug.LogError("Could not find TextUpdate on " + this); } }
public void Attach(Observer obs) { OnStatusUpdate += new StatusUpdate(obs.SetText); OnTextUpdate += new TextUpdate(obs.SetLabelText); }
// Use this for initialization void Start () { //Super Fun initialization Inv = GameObject.FindObjectOfType (typeof(Inventory)) as Inventory; Playr = GameObject.Find ("FPSController"); Txt = GameObject.FindObjectOfType (typeof(TextUpdate)) as TextUpdate; }
// Use this for initialization void Start () { Txt = GameObject.FindObjectOfType(typeof (TextUpdate)) as TextUpdate; }
public bool Glass = false; //Are You in The Explorer Program? // Use this for initialization void Start () { InfoText = GameObject.FindObjectOfType (typeof(TextUpdate)) as TextUpdate; //Find Dat Class }
public void Start() { pausebutton.GetComponent<Button>().interactable = false; playbutton.GetComponent<Button>().interactable = true; fastbutton.GetComponent<Button>().interactable = true; infertileAge = Random.Range (37,45); glowing = true; glowUp = true; glowColor = Glowfade.color; glowColor.a = 0; FadeInCycle = 0; FadeIn = false; startTime = false; quickTime = false; startButton.interactable = false; maleToggle.isOn = true; playerIsMale = true; birthPanel.SetActive(true); deathfadeCount = 0; datingPanel.SetActive(false); deathPanel.SetActive(false); deathYear = 50 + Random.Range(0, 20) + Random.Range(0, 20) + Random.Range(0, 20); deathMonth = Random.Range(1, 12); startAge = 16; age = startAge; time = 0f; monthsSinceBirth = 0; alive = true; married = false; divorceCount = 0; monthCount = 2; status = "You are single"; fastforward = 0; partner = canvas.GetComponent<Partner>(); options = canvas.GetComponent<Options>(); relationship = canvas.GetComponent<Relationship>(); textupdate = canvas.GetComponent<TextUpdate>(); talk = canvas.GetComponent<Talk>(); obituary = canvas.GetComponent<Obituary>(); career = canvas.GetComponent<Career>(); colorName = partner.nameText.color; colorName.a = 0; relationshipCount = 0; marriageCount = 0; childrenCount = 0; pregnant = false; birthMonth = 0; birthYear = 0; durationMonths = 0; durationYears = 0; fastForwardCount = 0; fastTimeOn = false; partner.exName = ""; partner.exDuration = 0; maxHappiness = 50; jumpTime = 5; deathColor = Deathfade.color; birthColor = Birthfade.color; impendingDeath = false; relationship.playerpositiveemitter.GetComponent<ParticleSystem>().enableEmission = false; relationship.playernegativeemitter.GetComponent<ParticleSystem>().enableEmission = false; for ( int i = 0; i < 3; i++ ) { obituary.soNames[i] = ""; obituary.soLength[i] = 0; obituary.marriedSO[i] = false; obituary.soChildren[i] = 0; } if ( Random.Range (0,101) > 50) { nameCount = Random.Range(0,partner.maleNames.Length); playerName = partner.maleNames[nameCount]; } else { nameCount = Random.Range(0,partner.femaleNames.Length); playerName = partner.femaleNames[nameCount]; } inputNameText.text = playerName; monthInput.text = Random.Range (1,13).ToString(); yearInput.text = Random.Range (1950,1995).ToString(); impendingDeath = false; hotnessText.text = aspectText[0]; personalityText.text = aspectText[1]; wealthText.text = aspectText[2]; careerText.text = aspectText[3]; }
void Start() { relationship = canvas.GetComponent<Relationship>(); display = canvas.GetComponent<Display>(); textupdate = canvas.GetComponent<TextUpdate>(); partnerName = ""; partnerDivorces = 0; partnerChildren = 0; exDuration = 0; wealthGap = 0; exHappiness = 0; }
/// <summary> /// Raises the TextUpdate event. /// </summary> /// <param name="e">An EventArgs containing the event data.</param> protected virtual void OnTextUpdate(EventArgs e) { TextUpdate?.Invoke(this, e); }