void Reset() { isPlaying = false; isCopied = false; B1.GetComponent <TrailRenderer>().time = 0.0f; B1.SetActive(false); B1.GetComponent <Ball>().Dead = false; B2.GetComponent <TrailRenderer>().time = 0.0f; B2.SetActive(false); B2.GetComponent <Ball>().Dead = false; B3.SetActive(false); B3.GetComponent <TrailRenderer>().time = 0.0f; B3.GetComponent <Ball>().Dead = false; B4.SetActive(false); B4.GetComponent <TrailRenderer>().time = 0.0f; B4.GetComponent <Ball>().Dead = false; B5.SetActive(false); B5.GetComponent <TrailRenderer>().time = 0.0f; B5.GetComponent <Ball>().Dead = false; B6.SetActive(false); B6.GetComponent <TrailRenderer>().time = 0.0f; B6.GetComponent <Ball>().Dead = false; B7.SetActive(false); B7.GetComponent <TrailRenderer>().time = 0.0f; B7.GetComponent <Ball>().Dead = false; ChangeColor(0); }
private void DisplayThirdLevel() { B2.Clear(); B3.Clear(); B3.ReadOnly = false; B5.Clear(); B7.Clear(); B8.Clear(); B10.Clear(); B11.Clear(); B11.ReadOnly = false; B13.Clear(); B14.Clear(); B14.ReadOnly = false; B15.Clear(); B16.Clear(); B4.Text = "2"; B4.ReadOnly = true; B12.Text = "1"; B12.ReadOnly = true; }
//public GameObject Starter; //bool A = true; //bool B = true; // Use this for initialization void Awake() { isPlaying = false; isCopied = false; //StartCoroutine ("Updat"); Rb1 = B1.GetComponent <Rigidbody2D> (); Rb2 = B2.GetComponent <Rigidbody2D> (); Rb3 = B3.GetComponent <Rigidbody2D> (); Rb4 = B4.GetComponent <Rigidbody2D> (); Rb5 = B5.GetComponent <Rigidbody2D> (); Rb6 = B6.GetComponent <Rigidbody2D> (); Rb7 = B7.GetComponent <Rigidbody2D> (); Tr1 = B1.transform; Tr2 = B2.transform; Tr3 = B3.transform; Tr4 = B4.transform; Tr5 = B5.transform; Tr6 = B6.transform; Tr7 = B7.transform; Pos1 = Out1.transform.position; Pos2 = Out2.transform.position; Pos3 = Out3.transform.position; Pos4 = Out4.transform.position; Pos5 = Out5.transform.position; Pos6 = Out6.transform.position; Pos7 = Out7.transform.position; S = GetComponent <SpriteRenderer> (); }
public void setRespFalse() { A1.SetActive(false); A2.SetActive(false); A3.SetActive(false); A4.SetActive(false); A5.SetActive(false); A6.SetActive(false); A7.SetActive(false); B1.SetActive(false); B2.SetActive(false); B3.SetActive(false); B4.SetActive(false); B5.SetActive(false); B6.SetActive(false); B7.SetActive(false); C1.SetActive(false); C2.SetActive(false); C3.SetActive(false); C4.SetActive(false); C5.SetActive(false); C6.SetActive(false); C7.SetActive(false); }
private void B2_TextChanged(object sender, TextChangedEventArgs e) { if (B2.Text.Length > 0) { B3.Focus(); } }
public static void TestUseCase() { var a = new A(); Assert.AreEqual(a, a, "Bridge692 A"); var b1 = new B1(); Assert.AreEqual(b1, b1, "Bridge692 B1"); var b2 = new B1(); Assert.AreEqual(b2, b2, "Bridge692 B2"); var b3 = new B3(); Assert.AreEqual(b3, b3, "Bridge692 B3"); var c1 = new C1(); Assert.AreNotStrictEqual(c1, c1, "Bridge692 C1"); var c2 = new C2(); Assert.AreNotStrictEqual(c2, c2, "Bridge692 C2"); var c3 = new C3(); Assert.AreNotStrictEqual(c3, c3, "Bridge692 C3"); C3?c3_1 = new C3(); Assert.AreNotStrictEqual(c3_1, c3_1, "Bridge692 C3_1"); }
public void NullableStruct_to_Struct() { NullableTypes.B3.BInt bint = new B3.BInt(); bint.fld1 = "b"; B3 b = new B3(); b.fld1 = bint; b.fld2 = bint; b.fld3 = bint; b.fld4 = bint; b.fld6 = bint; b.fld7 = bint; var mapper = ObjectMapperManager.DefaultInstance.GetMapper <B3, A3>(); //DynamicAssemblyManager.SaveAssembly(); A3 a = mapper.Map(b); Assert.AreEqual("b", a.fld1.Value.fld1); Assert.AreEqual("b", a.fld2.Value.fld1); Assert.AreEqual("b", a.fld3.Value.fld1); Assert.AreEqual("b", a.fld4.Value.fld1); Assert.AreEqual("b", a.fld6.Value.fld1); Assert.AreEqual("b", a.fld7.fld1); Assert.AreEqual("a", a.fld2.Value.fld3); Assert.IsFalse(a.fld5.HasValue); }
public void NullableStruct_to_Struct() { var bint = new B3.BInt { Fld1 = "b" }; var b = new B3 { Fld1 = bint, Fld2 = bint, Fld3 = bint, Fld4 = bint, Fld6 = bint, Fld7 = bint }; var mapper = Mapper.Default.GetMapper <B3, A3>(); // DynamicAssemblyManager.SaveAssembly(); var a = mapper.Map(b); a.Fld1.Value.Fld1.ShouldBe("b"); a.Fld2.Value.Fld1.ShouldBe("b"); a.Fld3.Value.Fld1.ShouldBe("b"); a.Fld4.Value.Fld1.ShouldBe("b"); a.Fld6.Value.Fld1.ShouldBe("b"); a.Fld7.Fld1.ShouldBe("b"); a.Fld2.Value.Fld3.ShouldBe("a"); a.Fld5.HasValue.ShouldBeFalse(); }
void Reset() { if (isChange) { for (int i = 0; i < 4; i++) { Change [i].color = new Color(0.0f, 0.0f, 0.0f, 0.0f); } } StopCoroutine("Rexar"); isPlaying = false; isCopied = false; B1.GetComponent <TrailRenderer>().time = 0.0f; B1.SetActive(false); B1.GetComponent <Ball>().Dead = false; B2.GetComponent <TrailRenderer>().time = 0.0f; B2.SetActive(false); B2.GetComponent <Ball>().Dead = false; B3.SetActive(false); B3.GetComponent <TrailRenderer>().time = 0.0f; B3.GetComponent <Ball>().Dead = false; B4.SetActive(false); B4.GetComponent <TrailRenderer>().time = 0.0f; B4.GetComponent <Ball>().Dead = false; ChangeColor(0); }
private void B2_Tick(object sender, EventArgs e) { PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5H^7ost ^5M^7enu\n\n^5God Mode\n^2-->^5Max Ammo\nAll Perks\nRapide Fire\nLock Controller"); if (Key_IsDown((uint)0) == "R1") { B2.Stop(); B3.Start(); } if (Key_IsDown((uint)0) == "X") { byte[] buffer = new byte[] { 0xFF, 0xFF, 0xFF }; PS3.SetMemory(0x01227631, buffer); PS3.SetMemory(0x01227649, buffer); PS3.SetMemory(0x012276cd, buffer); PS3.SetMemory(0x012276d9, buffer); PS3.SetMemory(0x012276b5, buffer); PS3.SetMemory(0x012276c1, buffer); PS3.SetMemory(0x012276d9, buffer); PS3.SetMemory(0x012276e5, buffer); // byte[] buffer1 = new byte[] { 0xFF }; PS3.SetMemory(0x0122778a, buffer1); } if (Key_IsDown((uint)0) == "R3") { B2.Stop(); HostMenuMain.Start(); } if (Key_IsDown((uint)0) == "L1") { B2.Stop(); B1.Start(); } }
private void A1_Tick(object sender, EventArgs e) { PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5M^7ain ^5M^7enu\n\n^2-->^5Host Menu\nClient 1 Menu\nReset Menu\nAccount Menu\nTeleport Menu\nVision Menu\nCredit Menu\n\n\n^3Client 0 : ^2" + textBox1.Text + "\n^3Client 1 : ^2" + textBox2.Text + "^5"); if (Key_IsDown((uint)0) == "X") { HostMenuMain.Stop(); B1.Start(); } if (Key_IsDown((uint)0) == "R1") { HostMenuMain.Stop(); Client1.Start(); } if (Key_IsDown((uint)0) == "R3 + L3") { HostMenuMain.Stop(); B1.Stop(); B2.Stop(); B3.Stop(); B4.Stop(); B5.Stop(); Client1.Stop(); C1.Stop(); C2.Stop(); C3.Stop(); C4.Stop(); ResetMenu.Stop(); D1.Stop(); D2.Stop(); D3.Stop(); D4.Stop(); D5.Stop(); AccountMenu.Stop(); E1.Stop(); E2.Stop(); E3.Stop(); E4.Stop(); E5.Stop(); TeleportMenu.Stop(); F1.Stop(); F2.Stop(); F3.Stop(); F4.Stop(); VisionMenu.Stop(); G1.Stop(); G2.Stop(); G3.Stop(); G4.Stop(); G5.Stop(); G6.Stop(); OtherMenu.Stop(); H1.Stop(); PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed"); simpleButton2.Enabled = true; toolStripStatusLabel2.Text = "Not Started !"; toolStripStatusLabel2.ForeColor = Color.Red; simpleButton3.Enabled = false; } }
public void Test_StructToClass() { A3 a = new A3(); B3 b = new B3(); b.fld1 = 87; a = Context.objMan.GetMapper<B3, A3>().Map(b, a); Assert.AreEqual(a.fld1, 87); }
public void Test_StructToClass() { B3 b = new B3(); b.fld1 = 87; var a = Mapper.Map <B3, A3>(b); Assert.AreEqual(a.fld1, 87); }
// Update is called once per frame void Update() { //StateManager sm = TrackerManager.Instance.GetStateManager(); //IEnumerable<TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours(); B1.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q1.gameObject.SetActive(true); } }); B2.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q2.gameObject.SetActive(true); } }); B3.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q3.gameObject.SetActive(true); } }); B4.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q4.gameObject.SetActive(true); } }); B5.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q5.gameObject.SetActive(true); } }); BlackFade.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(false); Q1.gameObject.SetActive(false); Q2.gameObject.SetActive(false); Q3.gameObject.SetActive(false); Q4.gameObject.SetActive(false); Q5.gameObject.SetActive(false); } }); }
public void Test_StructToClass() { A3 a = new A3(); B3 b = new B3(); b.fld1 = 87; a = Context.objMan.GetMapper <B3, A3>().Map(b, a); Assert.AreEqual(a.fld1, 87); }
void GameStart() { Minigame.SetActive(false); Bumbu1.SetActive(false); Bumbu2.SetActive(false); telurGoreng.SetActive(false); NasiP.SetActive(false); NasiG.SetActive(false); Panel1 = false; Panel2 = false; Panel3 = false; Panel4 = false; score = 0; Achieve.value = score; startPos = AIoned.transform.position; Debug.Log(startPos); AI1 = true; AI2 = false; AI3 = false; AI4 = false; Time.timeScale = 1; if (Level == 1) { Achieve.maxValue = 45; timerF = 60; Hitung = true; } if (Level == 2) { Achieve.maxValue = 60; timerF = 100; Hitung = true; } if (Level == 3) { Achieve.maxValue = 100; timerF = 140; Hitung = true; } Winlose.SetActive(false); B0.SetActive(false); B1.SetActive(false); B2.SetActive(false); B3.SetActive(false); PauseBG.SetActive(true); Pauz.SetActive(false); }
public string[] ToLines() { return(new string[] { A1.ToString(), A2.ToString(), A3.ToString(), B1.ToString(), B2.ToString(), B3.ToString(), C1.ToString(), C2.ToString(), C3.ToString(), Start.ToString() }); }
public void Test_StructToClass() { var a = new A3(); var b = new B3 { Fld1 = 87 }; a = Context.ObjMan.GetMapper <B3, A3>().Map(b, a); a.Fld1.ShouldBe(87); }
public void TestOrderMultipleRunBefore() { var a = new A3(); var b = new B3(); var c = new C3(); var s = new IBuildStep[] { b, a, c }; var sorted = Builder.SortSteps(s); Assert.That(sorted, Is.EqualTo(new IBuildStep[] { a, b, c })); }
// Use this for initialization void Start() { FX = GetComponent <AudioSource> ().clip; B1.SetActive(false); B2.SetActive(false); B3.SetActive(false); B4.SetActive(false); B5.SetActive(false); B6.SetActive(false); Bcount = Random.Range(100, 800); }
/** * Initialization method. * * @method initialize * @constructor **/ public BehaviorTree(object target = null) { _target = target; this._id = B3.CreateUUID(); this.title = "The behavior tree"; this.description = "Default description"; this.properties = new Dictionary <string, string>(); _nodeDic = new Dictionary <string, BaseNode>(); _tick = new Tick(); _tick.Tree = this; _tick.Target = _target; }
public void Left() { if (MobileSettings) { if (n == 5) { B5.SetActive(false); B4.SetActive(true); n--; } else if (n == 4) { B4.SetActive(false); B2.SetActive(true); n -= 2; } else if (n == 2) { B2.SetActive(false); B1.SetActive(true); n--; } } else { if (n == 5) { B5.SetActive(false); B4.SetActive(true); n--; } else if (n == 4) { B4.SetActive(false); B3.SetActive(true); n--; } else if (n == 3) { B3.SetActive(false); B2.SetActive(true); n--; } else if (n == 2) { B2.SetActive(false); B1.SetActive(true); n--; } } }
public void Right() { if (MobileSettings) { if (n == 1) { B1.SetActive(false); B2.SetActive(true); n++; } else if (n == 2) { B2.SetActive(false); B4.SetActive(true); n += 2; } else if (n == 4) { B4.SetActive(false); B5.SetActive(true); n++; } } else { if (n == 1) { B1.SetActive(false); B2.SetActive(true); n++; } else if (n == 2) { B2.SetActive(false); B3.SetActive(true); n++; } else if (n == 3) { B3.SetActive(false); B4.SetActive(true); n++; } else if (n == 4) { B4.SetActive(false); B5.SetActive(true); n++; } } }
// Start is called before the first frame update void Start() { bsc = bs.GetComponent <Text>(); wsc = ws.GetComponent <Text>(); winner = win.GetComponent <Text>(); rbb = new Rigidbody[5]; rbw = new Rigidbody[5]; scb = new Shoot_Black[5]; scw = new Shoot_White[5]; rbb[0] = B0.GetComponent <Rigidbody>(); rbb[1] = B1.GetComponent <Rigidbody>(); rbb[2] = B2.GetComponent <Rigidbody>(); rbb[3] = B3.GetComponent <Rigidbody>(); rbb[4] = B4.GetComponent <Rigidbody>(); rbw[0] = W0.GetComponent <Rigidbody>(); rbw[1] = W1.GetComponent <Rigidbody>(); rbw[2] = W2.GetComponent <Rigidbody>(); rbw[3] = W3.GetComponent <Rigidbody>(); rbw[4] = W4.GetComponent <Rigidbody>(); scb[0] = B0.GetComponent <Shoot_Black>(); scb[1] = B1.GetComponent <Shoot_Black>(); scb[2] = B2.GetComponent <Shoot_Black>(); scb[3] = B3.GetComponent <Shoot_Black>(); scb[4] = B4.GetComponent <Shoot_Black>(); scw[0] = W0.GetComponent <Shoot_White>(); scw[1] = W1.GetComponent <Shoot_White>(); scw[2] = W2.GetComponent <Shoot_White>(); scw[3] = W3.GetComponent <Shoot_White>(); scw[4] = W4.GetComponent <Shoot_White>(); for (int i = 0; i < 5; i++) { rbb[i].velocity = Vector3.zero; rbw[i].velocity = Vector3.zero; rbb[i].rotation = Quaternion.Euler(new Vector3(0, 0, 0)); rbw[i].rotation = Quaternion.Euler(new Vector3(0, 0, 0)); scb[i].alive = true; scw[i].alive = true; } rbb[0].position = new Vector3(-12.5f, 1f, 13f); rbb[1].position = new Vector3(-6f, 1f, 6.5f); rbb[2].position = new Vector3(-12.5f, 1f, 0f); rbb[3].position = new Vector3(-6f, 1f, -6.5f); rbb[4].position = new Vector3(-12.5f, 1f, -13f); rbw[0].position = new Vector3(12.5f, 1f, -13f); rbw[1].position = new Vector3(6f, 1f, -6.5f); rbw[2].position = new Vector3(12.5f, 1f, 0f); rbw[3].position = new Vector3(6f, 1f, 6.5f); rbw[4].position = new Vector3(12.5f, 1f, 13f); turnnum = 0; win.transform.position = new Vector3(Screen.width / 2, Screen.height + 500, 0); }
public void ShouldAllowAssertingOnInstanceDependency() { //TODO split into several facts var a3 = new A3(); var b3 = new B3(); var abc = "abc"; var num = 123; var a2 = new A2(a3, b3, abc, num); var b2 = new B2(b3); var a1 = new A1(a2, b2); a1.Should().DependOn(a2); a1.Should().DependOn(b2); a1.Should().DependOn(b3); a1.Should().DependOn(abc); a1.Should().DependOn(num); new Action(() => a1.Should().DependOn(new A2())) .Should().ThrowExactly <XunitException>().WithMessage( @"Could not find the particular instance: TddXt.XFluentAssert.EndToEndSpecification.XAssertSpecifications.A2 anywhere in dependency graph however, another instance of this type was found within the following paths: [Root(A1)]->[_a2(A2)]->[_a3(A3)] [Root(A1)]->[_a2(A2)]->[_b3(B3)] [Root(A1)]->[_a2(A2)]->[_str(String)] [Root(A1)]->[_a2(A2)]->[_num(Int32)]"); new Action(() => a1.Should().DependOn(new B2())) .Should().ThrowExactly <XunitException>().WithMessage( @"Could not find the particular instance: TddXt.XFluentAssert.EndToEndSpecification.XAssertSpecifications.B2 anywhere in dependency graph however, another instance of this type was found within the following paths: [Root(A1)]->[_b2(B2)]->[_b3(B3)]"); new Action(() => a1.Should().DependOn(new B3())) .Should().ThrowExactly <XunitException>().WithMessage( @"Could not find the particular instance: TddXt.XFluentAssert.EndToEndSpecification.XAssertSpecifications.B3 anywhere in dependency graph however, another instance of this type was found within the following paths: [Root(A1)]->[_a2(A2)]->[_b3(B3)] [Root(A1)]->[_b2(B2)]->[_b3(B3)]"); new Action(() => a1.Should().DependOn(abc + "a")) .Should().ThrowExactly <XunitException>().WithMessage( @"Could not find the particular instance: abca anywhere in dependency graph however, another instance of this type was found within the following paths: [Root(A1)]->[_a2(A2)]->[_str(String)]"); new Action(() => a1.Should().DependOn(num + 1)) .Should().ThrowExactly <XunitException>().WithMessage( @"Could not find the particular instance: 124 anywhere in dependency graph however, another instance of this type was found within the following paths: [Root(A1)]->[_a2(A2)]->[_num(Int32)]"); new Action(() => a1.Should().DependOn(a1)) .Should().ThrowExactly <XunitException>().Which.Message.Contains( @"Could not find the particular instance: TddXt.XFluentAssert.EndToEndSpecification.XAssertSpecifications.A1 anywhere in dependency graph"); new Action(() => a2.Should().DependOn(a1)) .Should().ThrowExactly <XunitException>().Which.Message.Contains( "Could not find the particular instance: TddXt.XFluentAssert.EndToEndSpecification.XAssertSpecifications.A1 anywhere in dependency graph"); abc.Should().DependOn(3); }
// Start is called before the first frame update void Start() { stopWatch = new Stopwatch(); stopWatch.Start(); scoreText.text = "Score: " + score.ToString(); score = 0; b2 = FindObjectOfType <Bullet2script>(); b1 = FindObjectOfType <sc>(); b3 = FindObjectOfType <B3>(); b4 = FindObjectOfType <B4>(); b5 = FindObjectOfType <B5>(); b6 = FindObjectOfType <B6>(); b7 = FindObjectOfType <B7>(); b8 = FindObjectOfType <B8>(); b9 = FindObjectOfType <B9>(); b10 = FindObjectOfType <B10>(); b11 = FindObjectOfType <B11>(); b12 = FindObjectOfType <B12>(); b13 = FindObjectOfType <B13>(); b14 = FindObjectOfType <B14>(); b15 = FindObjectOfType <B15>(); b16 = FindObjectOfType <B16>(); b17 = FindObjectOfType <B17>(); b18 = FindObjectOfType <B18>(); b19 = FindObjectOfType <B19>(); b20 = FindObjectOfType <B20>(); b21 = FindObjectOfType <B21>(); b22 = FindObjectOfType <B22>(); b23 = FindObjectOfType <B23>(); b24 = FindObjectOfType <B24>(); b25 = FindObjectOfType <B25>(); b26 = FindObjectOfType <B26>(); b27 = FindObjectOfType <B27>(); b28 = FindObjectOfType <B28>(); b29 = FindObjectOfType <B29>(); b30 = FindObjectOfType <B30>(); b31 = FindObjectOfType <B31>(); b32 = FindObjectOfType <B32>(); b33 = FindObjectOfType <B33>(); b34 = FindObjectOfType <B34>(); b35 = FindObjectOfType <B35>(); b36 = FindObjectOfType <B36>(); b37 = FindObjectOfType <B37>(); b38 = FindObjectOfType <B38>(); b39 = FindObjectOfType <B39>(); b40 = FindObjectOfType <B40>(); b41 = FindObjectOfType <B41>(); }
private void simpleButton3_Click(object sender, EventArgs e) { MainMenu.Stop(); HostMenuMain.Stop(); B1.Stop(); B2.Stop(); B3.Stop(); B4.Stop(); B5.Stop(); Client1.Stop(); C1.Stop(); C2.Stop(); C3.Stop(); C4.Stop(); ResetMenu.Stop(); D1.Stop(); D2.Stop(); D3.Stop(); D4.Stop(); D5.Stop(); AccountMenu.Stop(); E1.Stop(); E2.Stop(); E3.Stop(); E4.Stop(); E5.Stop(); TeleportMenu.Stop(); F1.Stop(); F2.Stop(); F3.Stop(); F4.Stop(); VisionMenu.Stop(); G1.Stop(); G2.Stop(); G3.Stop(); G4.Stop(); G5.Stop(); G6.Stop(); OtherMenu.Stop(); H1.Stop(); PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed"); toolStripStatusLabel2.Text = "Not Started !"; toolStripStatusLabel2.ForeColor = Color.Red; simpleButton2.Enabled = true; simpleButton3.Enabled = false; }
private void FemSelect_Load(object sender, EventArgs e) { if (this.PailieMode == 3) { this.buttonX1.Visible = true; this.textBoxX29.Visible = true; this.textBoxX30.Visible = true; this.textBoxX31.Visible = true; this.textBoxX32.Visible = true; this.textBoxX33.Visible = true; } else { this.buttonX1.Visible = false; this.textBoxX29.Visible = false; this.textBoxX30.Visible = false; this.textBoxX31.Visible = false; this.textBoxX32.Visible = false; this.textBoxX33.Visible = false; } if (this.isOneOrTwo == 0) { this.textBoxX1.Text = "情况一组合方式"; this.textBoxX8.Text = A1.ToString(); this.textBoxX9.Text = A2.ToString(); this.textBoxX10.Text = A3.ToString(); this.textBoxX20.Text = B1.ToString(); this.textBoxX21.Text = B2.ToString(); this.textBoxX22.Text = B3.ToString(); this.textBoxX23.Text = C1.ToString(); this.textBoxX24.Text = C2.ToString(); this.textBoxX25.Text = C3.ToString(); this.textBoxX26.Text = D1.ToString(); this.textBoxX27.Text = D2.ToString(); this.textBoxX28.Text = D3.ToString(); } else if (this.isOneOrTwo == 1) { this.textBoxX1.Text = "情况二组合方式"; this.textBoxX8.Text = A1.ToString(); this.textBoxX9.Text = A2.ToString(); this.textBoxX10.Text = A3.ToString(); this.textBoxX20.Text = B1.ToString(); this.textBoxX21.Text = B2.ToString(); this.textBoxX22.Text = B3.ToString(); this.textBoxX23.Text = C1.ToString(); this.textBoxX24.Text = C2.ToString(); this.textBoxX25.Text = C3.ToString(); this.textBoxX26.Text = D1.ToString(); this.textBoxX27.Text = D2.ToString(); this.textBoxX28.Text = D3.ToString(); } }
// Use this for initialization void Awake() { //Speed = 0.0f; isPlaying = false; isCopied = false; //StartCoroutine ("Updat"); Rb1 = B1.GetComponent <Rigidbody2D> (); Rb2 = B2.GetComponent <Rigidbody2D> (); Rb3 = B3.GetComponent <Rigidbody2D> (); Rb4 = B4.GetComponent <Rigidbody2D> (); Tr1 = B1.transform; Tr2 = B2.transform; Tr3 = B3.transform; Tr4 = B4.transform; Pos1 = Out1.transform.position; Pos2 = Out2.transform.position; Pos3 = Out3.transform.position; Pos4 = Out4.transform.position; S = GetComponent <SpriteRenderer> (); }
public static int Main() { var b = new B(); if (b.Foo <int?> () == null) { return(0); } b.Foo2 <int?> (); var b2 = new B2(); b2.Foo <byte> (); var b3 = new B3(); b3.Foo <string> (); return(1); }
public void Test3_ShallowCopy() { A3 a = new A3(); B3 b = new B3(); b.a1.fld1 = 15; Context.objMan.GetMapper<B3, A3>(new DefaultMapConfig().DeepMap()).Map(b, a); Assert.AreEqual(a.a1.fld1, 15); b.a1.fld1 = 666; Assert.AreEqual(a.a1.fld1, 15); Context.objMan.GetMapper<B3, A3>(new DefaultMapConfig().ShallowMap()).Map(b, a); b.a1.fld1 = 777; Assert.AreEqual(777, a.a1.fld1); b = new B3(); Context.objMan.GetMapper<B3, A3>(new DefaultMapConfig().ShallowMap<A1>().DeepMap<A2>()).Map(b, a); b.a1.fld1 = 333; b.a2.fld3 = new string[1]; Assert.AreEqual(333, a.a1.fld1); Assert.IsNull(a.a2.fld3); }
private void button8_Click(object sender, EventArgs e) { double CGCSa = 6378137.0, CGCSf = 1 / 298.257222101; double CGCSb = CGCSa * (1 - CGCSf); double CGCSe = Math.Sqrt(CGCSa * CGCSa - CGCSb * CGCSb) / CGCSa; double CGCSe1 = Math.Sqrt(CGCSa * CGCSa - CGCSb * CGCSb) / CGCSb; double B, L, H, X, Y, Z; X = double.Parse(textBox10.Text); Y = double.Parse(textBox11.Text); Z = double.Parse(textBox12.Text); double CGCSu = Math.Atan((CGCSa * Z) / (CGCSb * Math.Sqrt(X * X + Y * Y))); B = Math.Atan((Z + CGCSe1 * CGCSe1 * CGCSb * Math.Pow(Math.Sin(CGCSu), 3)) / (Math.Sqrt(X * X + Y * Y) - CGCSe * CGCSe * CGCSa * Math.Pow(Math.Cos(CGCSu), 3))); L = Math.Atan2(Y, X); double WGSw = Math.Sqrt(1 - Math.Pow(CGCSe * Math.Sin(B), 2)); double WGSn = CGCSa / WGSw; H = Math.Sqrt(X * X + Y * Y) / Math.Cos(B) - WGSn; B = B * 180 / Math.PI; L = L * 180 / Math.PI; double B1, B2, B3; B1 = Math.Truncate(B); B2 = Math.Truncate((B - B1) * 60); B3 = ((B - B1) * 60 - B2) * 60; string strB = B1.ToString() + '.' + B2.ToString() + B3.ToString("f6"); double L1, L2, L3; L1 = Math.Truncate(L); L2 = Math.Truncate((L - L1) * 60); L3 = ((L - L1) * 60 - L2) * 60; string strL = L1.ToString() + '.' + L2.ToString() + L3.ToString("f6"); textBox4.Text = strB; textBox5.Text = strL; textBox6.Text = H.ToString("f4"); }
public void NullableStruct_to_Struct() { NullableTypes.B3.BInt bint = new B3.BInt(); bint.fld1 = "b"; B3 b = new B3(); b.fld1 = bint; b.fld2 = bint; b.fld3 = bint; b.fld4 = bint; b.fld6 = bint; b.fld7 = bint; var mapper = ObjectMapperManager.DefaultInstance.GetMapper<B3, A3>(); //DynamicAssemblyManager.SaveAssembly(); A3 a = mapper.Map(b); Assert.AreEqual("b", a.fld1.Value.fld1); Assert.AreEqual("b", a.fld2.Value.fld1); Assert.AreEqual("b", a.fld3.Value.fld1); Assert.AreEqual("b", a.fld4.Value.fld1); Assert.AreEqual("b", a.fld6.Value.fld1); Assert.AreEqual("b", a.fld7.fld1); Assert.AreEqual("a", a.fld2.Value.fld3); Assert.IsFalse(a.fld5.HasValue); }
public static void TestUseCase() { var a = new A(); Assert.AreEqual(a, a, "Bridge692 A"); var b1 = new B1(); Assert.AreEqual(b1, b1, "Bridge692 B1"); var b2 = new B1(); Assert.AreEqual(b2, b2, "Bridge692 B2"); var b3 = new B3(); Assert.AreEqual(b3, b3, "Bridge692 B3"); var c1 = new C1(); Assert.AreNotStrictEqual(c1, c1, "Bridge692 C1"); var c2 = new C2(); Assert.AreNotStrictEqual(c2, c2, "Bridge692 C2"); var c3 = new C3(); Assert.AreNotStrictEqual(c3, c3, "Bridge692 C3"); C3? c3_1 = new C3(); Assert.AreNotStrictEqual(c3_1, c3_1, "Bridge692 C3_1"); }
public void Test_StructToClass() { B3 b = new B3(); b.fld1 = 87; var a = Mapper.Map<B3, A3>(b); Assert.AreEqual(a.fld1, 87); }
public void NullableStruct_to_Struct() { NullableTypes.B3.BInt bint = new B3.BInt(); bint.fld1 = "b"; B3 b = new B3(); b.fld1 = bint; b.fld2 = bint; b.fld3 = bint; b.fld4 = bint; b.fld6 = bint; b.fld7 = bint; A3 a = Mapper.Map<B3, A3>(b); Assert.AreEqual("b", a.fld1.Value.fld1); Assert.AreEqual("b", a.fld2.Value.fld1); Assert.AreEqual("b", a.fld3.Value.fld1); Assert.AreEqual("b", a.fld4.Value.fld1); Assert.AreEqual("b", a.fld6.Value.fld1); Assert.AreEqual("b", a.fld7.fld1); Assert.IsFalse(a.fld5.HasValue); }