private void _mCreateNetto()//生成熱斗 { GameObject _gNetto = GameObject.Find("Netto"); if (_gNetto != null) { _NettoScript = _gNetto.GetComponent<Netto>(); } else { _gNetto = Instantiate(Resources.Load("Prefab/Netto", typeof(GameObject))) as GameObject; if (!PlayerPrefs.HasKey("NettoStayPosX") || !PlayerPrefs.HasKey("NettoStayPosY") || !PlayerPrefs.HasKey("NettoStayScene"))//測試用,非從網路世界切換回 { _gNetto.transform.position = _v3ClonePosition; } else//從網路世界切換回 { _gNetto.transform.position = new Vector3(PlayerPrefs.GetFloat("NettoStayPosX"), PlayerPrefs.GetFloat("NettoStayPosY"), 0); PlayerPrefs.DeleteKey("NettoStayPosX"); PlayerPrefs.DeleteKey("NettoStayPosY"); PlayerPrefs.DeleteKey("NettoStayScene"); } _gNetto.name = "Netto"; _NettoScript = _gNetto.GetComponent<Netto>(); } }
public override int GetHashCode() { int hashCode = 264909473; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(NazwaProduktu); hashCode = hashCode * -1521134295 + NettoPcs.GetHashCode(); hashCode = hashCode * -1521134295 + Netto.GetHashCode(); hashCode = hashCode * -1521134295 + BruttoPcs.GetHashCode(); hashCode = hashCode * -1521134295 + Brutto.GetHashCode(); hashCode = hashCode * -1521134295 + Pcs.GetHashCode(); return(hashCode); }
void OnTriggerEnter2D(Collider2D _c2d) { if (_c2d.gameObject.name == "Netto") { DontDestroyOnLoad(_c2d.gameObject); _NettoScript = _c2d.gameObject.GetComponent<Netto>(); _NettoScript._bOnGameEvent = true; _NettoScript._enumPlayerState = MapPlayer.PlayerState.Idle; StartCoroutine(_ieTransformMap(0.5f)); } else if (_c2d.gameObject.name == "RockMan") { DontDestroyOnLoad(_c2d.gameObject); _RockmanScript = _c2d.gameObject.GetComponent<RockMan>(); _RockmanScript._bOnGameEvent = true; _RockmanScript._enumPlayerState = MapPlayer.PlayerState.Idle; StartCoroutine(_ieTransformMap(0.5f)); } }
private void Afa(object sender, EventArgs e) { try { double eladás = int.Parse(Eladási_ar_text.Text); double x; double Netto; if (afa_27.Checked) { x = (eladás / 1.27); Netto = Math.Round(x, 2); Netto_ar_text.Text = Netto.ToString(); Akcios_ar_text.Text = (eladás * 0.6).ToString(); Áfa = "C"; } else if (afa_18.Checked) { x = (eladás / 1.18); Netto = Math.Round(x, 2); Netto_ar_text.Text = Netto.ToString(); Akcios_ar_text.Text = (eladás * 0.6).ToString(); Áfa = "B"; } else { x = (eladás / 1.05); Netto = Math.Round(x, 2); Netto_ar_text.Text = Netto.ToString(); Akcios_ar_text.Text = (eladás * 0.6).ToString(); Áfa = "A"; } } catch (Exception) { MessageBox.Show("HIBA: Áfa kiválasztási hiba!"); } }