private void Start() { inside = false; cm = Camera.main.gameObject.GetComponent <CameraZoomOut>(); cf = Camera.main.gameObject.GetComponent <CamFollow>(); Sp1.SetActive(false); Sp2.SetActive(false); Sp3.SetActive(false); cm.enabled = false; }
public static void Update(List <Keys> pressedKeys) { Up.Append((uint)(pressedKeys.Contains(Keys.Up) ? 1 : 0)); Down.Append((uint)(pressedKeys.Contains(Keys.Down) ? 1 : 0)); Left.Append((uint)(pressedKeys.Contains(Keys.Left) ? 1 : 0)); Right.Append((uint)(pressedKeys.Contains(Keys.Right) ? 1 : 0)); Button1.Append((uint)(pressedKeys.Contains(Keys.Enter) ? 1 : 0)); Button2.Append((uint)(pressedKeys.Contains(Keys.Space) ? 1 : 0)); Sp1.Append((uint)(pressedKeys.Contains(Keys.Z) ? 1 : 0)); Sp2.Append((uint)(pressedKeys.Contains(Keys.X) ? 1 : 0)); }
private void Update() { if (inside) { cf.enabled = false; cm.enabled = true; Sp1.SetActive(true); Sp2.SetActive(true); Sp3.SetActive(true); } }
//====================================================================// // Variante 6: Crea un Circulo 3 rectas tangentes. //====================================================================// public CircleEx(Line L1, Line L2, Line L3, Vector3d normal, bool right_up = true) { byte intersec; bool x1, x2, x3; PointType A, B, C, Ps1, Ps2, P; SegmentType S1, S2, S3, Sp1, Sp2, Ss; S1 = is2GraphTranslator.Tois2Graph(L1); S2 = is2GraphTranslator.Tois2Graph(L2); S3 = is2GraphTranslator.Tois2Graph(L3); intersec = 0; x1 = is2GraphObj.SegmentsApparentIntercept(S1, S2, out A); x2 = is2GraphObj.SegmentsApparentIntercept(S2, S3, out B); x3 = is2GraphObj.SegmentsApparentIntercept(S3, S1, out C); if (x1) { intersec++; } if (x2) { intersec++; } if (x3) { intersec++; } if (intersec < 2 || (is2GraphObj.isEqualPoint(A, B) || is2GraphObj.isEqualPoint(B, C) || is2GraphObj.isEqualPoint(C, A))) { throw new CircleException("No se puede crear una circunferencia tangente a los 3 segmentos dados."); } if (!x1) { Sp1 = S1; //Sp2 = S2; Ss = S3; } else if (!x2) { Sp1 = S2; //Sp2 = S3; Ss = S1; } else { Sp1 = S3; //Sp2 = S1; Ss = S2; } if (right_up) { P = (Sp1.isVertical) ? Sp1.PointMayorY() : Sp1.PointMayorX(); } else { P = (Sp1.isVertical) ? Sp1.PointMenorY() : Sp1.PointMenorX(); } Utilities_acad2014.AcadUtilities.AddPinToModel(is2GraphTranslator.ToAcad_DB(A), 34, 0.3, 2); Utilities_acad2014.AcadUtilities.AddPinToModel(is2GraphTranslator.ToAcad_DB(B), 34, 0.3, 2); Utilities_acad2014.AcadUtilities.AddPinToModel(is2GraphTranslator.ToAcad_DB(C), 34, 0.3, 2); //Center = is2GraphTranslator.ToAcad_3d(center); //RadiusEx = radius; Normal = normal; Thickness = 0.0; }
public override string ToString() { return($"{Sp1.ToString("X2")} {Sp2.ToString("X2")} {Sp3.ToString("X2")} {Sp4.ToString("X2")} ({Name})"); }