private void Start() { StorageMNG.OnClickOnGrayIcon += DestroyMe; // suscribe el método DestroyMe a un evento OnRemoveHero startBTN = FindObjectOfType <StartBTN>(); stack = GetComponentInChildren <Stack>(); // asignar un objeto hijo a una variable Turn.OnNewRound += heroData.SetDefaultVelocityAndInitiative; }
private void Start() { StorageMNG.OnClickOnGrayIcon += DestroyMe; //subscribes the DestroyMe method to an OnRemoveHero event startBTN = FindObjectOfType <StartBTN>(); stack = GetComponentInChildren <Stack>(); //assigning a child object to a variable Turn.OnNewRound += heroData.SetDefaultVelocityAndInitiative; }
private void proc_text_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { e.Handled = true; if (!proc_text.AcceptsReturn) { StartBTN.PerformClick(); } } }