void OnGUI() { GUIShapes.Disc(positionDisc, radiusDisc, blendDisc); GUIShapes.Circle(positionCircle, radiusCircle, widthCircle, blendCircle, Color.white); GUIShapes.Polygon(positionPolygon, radiusPolygon, cornerCountPolygon, edgeBend, edgeKnit, cornerBend, blendPolygon); }
public override void DisplayNode(Rect rect) { float sizeMod = (rect.width / 1920); float sizeModH = (rect.height / 1080); InitStyle(sizeMod); if (output == this) { GUIShapes.Disc(new Vector2(rect.width / 2f - 100f * sizeModH, rect.height - 100f * sizeModH), 90f * sizeModH, Color.white); GUI.Label(new Rect(rect.width / 2f - 130f * sizeModH, rect.height - 130f * sizeModH, 60f * sizeModH, 60f * sizeModH), new GUIContent("Friendly\n[A]"), labelcolored); GUIShapes.Disc(new Vector2(rect.width / 2f - 60f * sizeModH, rect.height - 70f * sizeModH), 40f * sizeModH, Color.white); GUIShapes.Disc(new Vector2(rect.width / 2f, rect.height - 140f * sizeModH), 90f * sizeModH, Color.white); GUI.Label(new Rect(rect.width / 2f - 30f * sizeModH, rect.height - 170f * sizeModH, 60f * sizeModH, 60f * sizeModH), new GUIContent("Strategic\n[S]"), labelcolored); GUIShapes.Disc(new Vector2(rect.width / 2f, rect.height - 100f * sizeModH), 40f * sizeModH, Color.white); GUIShapes.Disc(new Vector2(rect.width / 2f + 100f * sizeModH, rect.height - 100f * sizeModH), 90f * sizeModH, Color.white); GUI.Label(new Rect(rect.width / 2f + 70f * sizeModH, rect.height - 130f * sizeModH, 60f * sizeModH, 60f * sizeModH), new GUIContent("Aggressive\n[D]"), labelcolored); GUIShapes.Disc(new Vector2(rect.width / 2f + 60f * sizeModH, rect.height - 70f * sizeModH), 40f * sizeModH, Color.white); if (Input.GetKeyDown(KeyCode.A)) { if (decisionA) { if (decisionAAudio.audio) { AudioSource.PlayClipAtPoint(decisionAAudio.audio, Vector3.zero); } output = decisionA.to; } else { output = null; } decision = 0; } else if (Input.GetKeyDown(KeyCode.S)) { if (decisionB) { if (decisionBAudio.audio) { AudioSource.PlayClipAtPoint(decisionBAudio.audio, Vector3.zero); } output = decisionB.to; } else { output = null; } decision = 1; } else if (Input.GetKeyDown(KeyCode.D)) { if (decisionC) { if (decisionBAudio.audio) { AudioSource.PlayClipAtPoint(decisionBAudio.audio, Vector3.zero); } output = decisionC.to; } else { output = null; } decision = 2; } } else { switch (decision) { case 0: { DisplayText(rect, decisionAText.text); } break; case 1: { DisplayText(rect, decisionBText.text); } break; case 2: { DisplayText(rect, decisionCText.text); } break; } } }