void array() { array1 = new Part1[array1size]; for (int i = 0; i < array1.Length; i++) { array1[i] = new Part1(); } array1[0] = boatstatus.Turn1; array1[1] = boatstatus.Turn2; //array1[2] = boatstatus.Turn3; array2 = new Part2[array2size]; for (int i = 0; i < array2.Length; i++) { array2[i] = new Part2(); } array2[0] = boatstatus.Body1; array2[1] = boatstatus.Body2; array2[2] = boatstatus.Body3; array3 = new Part3[array3size]; for (int i = 0; i < array3.Length; i++) { array3[i] = new Part3(); } array3[0] = boatstatus.Ancor1; array3[1] = boatstatus.Ancor2; array3[2] = boatstatus.Ancor3; array3[3] = boatstatus.Ancor4; }
public static void Main(String[] args) { // change this section to run Part2 and Part 3 Part3 p = new Part3(); p.Run(); }
public override int GetHashCode() { return(Part1.GetHashCode() ^ Part2.GetHashCode() ^ Part3.GetHashCode() ^ Part4.GetHashCode()); }
boat(Part1 part1_, Part2 part2_, Part3 part3_) { part1 = part1_; part2 = part2_; part3 = part3_; power = part1_.power + part2_.power + part3_.power; weight = part1_.weight + part2_.weight + part3_.weight; movementspeed = part1_.movementspeed + part2_.movementspeed + part3_.movementspeed; strength = part1_.strength + part2_.strength + part3_.strength; }
public void NextLVL() { CurrentLVL++; AmmoRemaining = 3; if (CurrentLVL == 2) { Part1.SetActive(false); Part2.SetActive(true); Part3.SetActive(false); } if (CurrentLVL == 4) { Part1.SetActive(false); Part2.SetActive(false); Part3.SetActive(true); } if (CurrentLVL == 7) { SceneManager.LoadScene(2); } }
static void Main(string[] args) { int taskNumber; while (true) { Console.Write("Enter the number of task you want to check (0 - exit): "); if (Int32.TryParse(Console.ReadLine(), out taskNumber)) { switch (taskNumber) { case 0: return; case 1: Part1.DoIt("input.txt", "output.txt"); break; case 2: Part2.DoIt(); break; case 3: Part3.DoIt(); break; default: Console.WriteLine("Incorrect task number"); break; } } else { Console.WriteLine("Can not resolve the task number"); } } }
/// <inheritdoc cref="Object.GetHashCode"/> public override int GetHashCode() => Part3.GetHashCode();
void Start() { var eventSystem = FindObjectOfType <EventSystem>(); eventSystem.pixelDragThreshold = (int)(Screen.width / 50f); Items = new Dictionary <string, UILayout>(); PartTitles = new [] { "Components", "TableView", "ListView", "GridView" }; TypeListView = new ListView { Name = "Type List View", UIRect = new UIRect(20, 0, 240, 720), Adapter = new TypeListAdapter(PartTitles), BackgroundColor = new Color(0, 0, 0, 0.75f), OnItemSelectedListener = (index) => { Debug.Log("Select : " + index); Group.Select(Items[PartTitles[index]]); } }; Group = new UIGroup <UILayout>((layout) => { layout.UIObject.SetActive(true); }, (layout) => { if (layout.UIObject.activeSelf) { layout.UIObject.SetActive(false); } }); // Components UILayout components = new Part1(); components.Name = "Components"; Items.Add(PartTitles[0], components); Group.Add(components); // TableView UILayout tableView = new Part2(); tableView.Name = "Table View"; Items.Add(PartTitles[1], tableView); Group.Add(tableView); // ListView ListView listView = new Part3(); listView.Name = "List View"; TextView textView = new TextView(listView); textView.UIFrame = new UIFrame(0, 0, 1000, 150); textView.TextComponent.alignment = TextAnchor.MiddleCenter; textView.FontSize = 30; textView.Text = "List View Header"; listView.HeaderView = textView; listView.Adapter = new Part3Adapter(); Items.Add(PartTitles[2], listView); Group.Add(listView); // GridView GridView gridView = new Part4(); gridView.Name = "Grid View"; gridView.ItemSize = new Vector2(150, 150); gridView.Adapter = new Part4Adapter(); Items.Add(PartTitles[3], gridView); Group.Add(gridView); }
public boat() { part1 = new Part1(); part2 = new Part2(); part3 = new Part3(); }