private void lines_AfterSelect(object sender, TreeViewEventArgs e) { currentNormal = (Vector2)((object[])e.Node.Tag)[0]; LVD.LVDSelection = currentNormal; currentMat = (CollisionMat)((object[])e.Node.Tag)[1]; leftLedge.Checked = currentMat.getFlag(6); rightLedge.Checked = currentMat.getFlag(7); noWallJump.Checked = currentMat.getFlag(4); comboBox1.Text = Enum.GetName(typeof(materialTypes), currentMat.physics); passthroughAngle.Value = (decimal)(Math.Atan2(currentNormal.Y, currentNormal.X) * 180.0 / Math.PI); }
private void lines_AfterSelect(object sender, TreeViewEventArgs e) { currentNormal = (Vector2D)((object[])e.Node.Tag)[0]; Runtime.LVDSelection = currentNormal; MainForm.Instance.viewports[0].timeSinceSelected.Restart(); currentMat = (CollisionMat)((object[])e.Node.Tag)[1]; leftLedge.Checked = currentMat.getFlag(6); rightLedge.Checked = currentMat.getFlag(7); noWallJump.Checked = currentMat.getFlag(4); comboBox1.Text = Enum.GetName(typeof(materialTypes), currentMat.getPhysics()); passthroughAngle.Value = (decimal)(Math.Atan2(currentNormal.y, currentNormal.x) * 180.0 / Math.PI); }
private void lines_AfterSelect(object sender, TreeViewEventArgs e) { // Find the currently selected normal. int selectedIndex = linesTreeView.SelectedNode.Index; Collision collision = (Collision)currentEntry; if (selectedIndex >= collision.normals.Count) { return; } LVD.LVDSelection = collision.normals[selectedIndex]; currentMat = (CollisionMat)((object[])e.Node.Tag)[1]; leftLedgeCB.Checked = currentMat.getFlag(6); rightLedgeCB.Checked = currentMat.getFlag(7); noWallJumpCB.Checked = currentMat.getFlag(4); physicsMatComboBox.SelectedItem = (CollisionMatType)currentMat.physics; passthroughAngleUpDown.Value = (decimal)(Math.Atan2(collision.normals[selectedIndex].Y, collision.normals[selectedIndex].X) * 180.0 / Math.PI); }