public void DisplayBonds() { if (UIData.secondarystruct) { bondEPList = MoleculeModel.bondCAList; } else { bondEPList = MoleculeModel.bondEPList; } MoleculeModel.bondsnumber = bondEPList.Count; int Number = bondEPList.Count / number; Debug.Log("DisplayBonds??bondEPList.Count " + bondEPList.Count); Debug.Log("UIData.EnableUpdate " + UIData.EnableUpdate); for (int i = 0; i < Number; i++) { CreateLine(i * number); } GameObject lineManagerObj = GameObject.FindGameObjectWithTag("LineManager"); LineManager lineManager = lineManagerObj.GetComponent <LineManager>(); lineManager.Init(); }
private void OnTriggerStay(Collider other) { if (other.tag == "Line") { OnArround(false); Line = other.gameObject.GetComponentInParent <LineManager>(); LineObject = other.gameObject.GetComponent <Transform>(); LineCheck = true; if (Line.parent != null) { if (Line.parent.tag == "DIGITAL") { soundparaent.DigitalConnect = true; } else if (Line.parent.tag == "BreadDIGITAL") { soundparaent.DigitalConnect = true; } //================================================ //else if (LineCheck == true) //{ // OnArround(true); //} //================================================ } } }
public void AddNewLine_LineNumberIsAvailable_ReturnsAddedLine() { //arrange Line lineToAdd = new Line() { LineNumber = "12345", Status = Common.Enums.LineStatus.Avaliable }; Customer customer = _data.GetCustomer(); _mock.Setup(s => s.Customer.Get(It.IsAny <int>())) .Returns(customer); _mock.Setup(s => s.Line.LineNumberIsAvailable("1")) .Returns(() => null); _mock.Setup(s => s.Line.GetLineByLineNumber(It.IsAny <string>())) .Returns(lineToAdd); _manager = new LineManager(_mock.Object); //act var res = _manager.AddNewLine(lineToAdd, 1); //assert Assert.IsNotNull(res); }
public SettingsController( SettingsManager settingsManager, LineManager lineManager) { _settingsManager = settingsManager; _lineManager = lineManager; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } var services = app.ApplicationServices.CreateScope().ServiceProvider; services.GetService <IDatabaseService>().InitAsync().Wait(); var lines = services.GetRequiredService <ILineService>().Query <LineFilter>().Result; LineManager.ResetLine(lines); Jt808TerminalEmulator.Core.DependencyInjectionExtensions.ServiceProvider = app.ApplicationServices; app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseCors("cors"); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public void OnTriggerStay(Collider other) { if (other.tag == "Line") { Connect = true; Line = other.gameObject.GetComponentInParent <LineManager>(); LineObject = other.gameObject.GetComponent <Transform>(); LineCheck = true; OnArround(false); if (Line.parent != null) { if (Line.parent.tag == "VCC") { if (sub != null) { sub.VccConnect = true; } // sub.GetComponentInChildren<SubSpin>().Run(3); } else if (Line.parent.tag == "BreadPlus") { sub.VccConnect = true; } } } }
// Use this for initialization void Start() { currentLine = null; lineMan = GameObject.Find("LineManager").GetComponent <LineManager>(); gridMan = GameObject.Find("GridManager").GetComponent <GridManager>(); }
private void Initialization() { iterationCounter = 0; List <Vector3[]> firstIter = new List <Vector3[]> { initVexters }; algIterations = new List <List <Vector3[]> > { firstIter }; // List of List of VectorSplineChain curvePoints = new List <Vector3>(); lineManager = GetComponent <LineManager> (); lineManager.UpdateData(algIterations[0], curvePoints); if (lineDivideScale == 0.0f) { lineDivideScale = 0.5f; } // veikia tik su 0.5 for (int i = 0; i < 5; i++) { Use_DeCastaljau(true); } }
} // RenderObjectsToPickerTexture #endregion #region Render Object To Picker /// <summary> /// Render Object To Picker. /// </summary> public void RenderObjectToPicker(GameObject gameObject) { if (gameObject is GameObject3D) { GameObject3D gameObject3D = (GameObject3D)gameObject; if (gameObject3D.LineRenderer != null) { LineManager.Begin3D(gameObject3D.LineRenderer.PrimitiveType, viewMatrix, projectionMatrix); for (int j = 0; j < gameObject3D.LineRenderer.Vertices.Length; j++) { LineManager.AddVertex(Vector3.Transform(gameObject3D.LineRenderer.Vertices[j].Position, gameObject3D.Transform.WorldMatrix), gameObject3D.LineRenderer.Vertices[j].Color); } LineManager.End(); } } else if (gameObject is GameObject2D) { GameObject2D gameObject2D = (GameObject2D)gameObject; if (gameObject2D.LineRenderer != null) { LineManager.Begin2D(gameObject2D.LineRenderer.PrimitiveType); for (int j = 0; j < gameObject2D.LineRenderer.Vertices.Length; j++) { LineManager.AddVertex(gameObject2D.LineRenderer.Vertices[j].Position, gameObject2D.LineRenderer.Vertices[j].Color); } LineManager.End(); } } } // RenderObjectToPicker
void Start() { H = new Lib_QuaternionAritmetics(); droneScrp = droneObj.GetComponent <Drone>(); //gameObject.GetComponent<Drone>();//droneObj.GetComponent<Drone>(); meshInitVexList = droneScrp.vexDic.Keys.ToList(); objPath = new List <Vector4>(); meshPath = new List <List <Vector4> >(); // Su salyga, kad neatsiras daugiau vex meshe eigoje foreach (var vex in meshInitVexList) { meshPath.Add(new List <Vector4>()); } curveObjsArr = GetCurves("Trajectory"); curveGenArr = ExtractSrpts_fromObjs(curveObjsArr); GenerateSplinePath(); LM = droneObj.GetComponent <LineManager>(); if (renderMeshPath) { verteciesPaths = CreateMeshPathCurves(); LM.AddManyCurves(verteciesPaths.Count); LM.UpdateAllCurves(verteciesPaths); } }
private void OnTriggerStay(Collider other) { if (other.tag == "Line") { OnArround(false); Line = other.gameObject.GetComponentInParent <LineManager>(); LineObject = other.gameObject.GetComponent <Transform>(); LineCheck = true; if (Line.parent != null) { if (Line.parent.tag == "VCC") { watervalue.VccConnect = true; } else if (Line.parent.tag == "BreadPlus") { watervalue.VccConnect = true; } //================================================ //else if (LineCheck == true) //{ // OnArround(true); //} //================================================ } } }
public SourceLineInfo(LineManager lm, int pos) { this.lineNumber = lm.lines; this.startOfLine = 0; this.endOfLine = lm.end; this.charPosition = pos; this.rawCharPosition = pos; LineList lineList = lm.list; while (lineList != null) { if (lineList.head > pos) { this.endOfLine = lineList.head; lineList = lineList.tail; --this.lineNumber; } else { this.startOfLine = lineList.head + 1; this.rawCharPosition = lineList.getpos(pos); this.charPosition = pos - this.startOfLine + 1; break; } } }
private void OnTriggerStay(Collider other) { if (other.tag == "Line") { Connect = true; OnArround(false); Line = other.gameObject.GetComponentInParent <LineManager>(); LineObject = other.gameObject.GetComponent <Transform>(); LineCheck = true; if (Line.parent != null) { if (Line.parent.tag == "GND") { //ledmanager.parant = other.gameObject; ultmanager.GNDConnect = true; } else if (Line.parent.tag == "BreadGND") { ultmanager.GNDConnect = true; } //================================================ //else if (LineCheck == true) //{ // OnArround(true); //} //================================================ } } }
private void OnTriggerStay(Collider other) { if (other.tag == "Line") { Connect = true; OnArround(false); Line = other.gameObject.GetComponentInParent <LineManager>(); LineObject = other.gameObject.GetComponent <Transform>(); LineCheck = true; if (Line != null) { if (Line.L298N_OUTCONNECT == true) { dcmanager.l298connect2 = true; } } //================================================ //else if (LineCheck == true) //{ // OnArround(true); //} //================================================ } }
private void OnTriggerStay(Collider other) { if (other.tag == "Line") { Line = other.gameObject.GetComponentInParent <LineManager>(); OnArround(false); // Debug.Log(other.tag); if (Line.parent != null) { // Debug.Log(Line.parent.tag); if (Line.parent.tag == "GND") { Connect = true; manager.GNDConnect = true; } } else if (Line.parent == null) { manager.GNDConnect = false; } } }
void Start() { lineManager = FindObjectOfType <LineManager>(); mainCamera = FindObjectOfType <Camera>(); gridGenerated = false; NewGrid(); }
public void Stop() { if (LineManager.GetLineCount() == 0) { SimulatorListener.Singleton.Stop(); } SendStop(); }
public InitHosted(ILogger <InitHosted> logger, IServiceScopeFactory serviceScopeFactory) { this.logger = logger; var services = serviceScopeFactory.CreateScope().ServiceProvider; lineManager = services.GetRequiredService <LineManager>(); lineService = services.GetRequiredService <ILineService>(); databaseService = services.GetRequiredService <IDatabaseService>(); }
private void Start() { lineManager = FindObjectOfType <LineManager>(); if (!lineManager) { Debug.LogWarning("Line Manager can't be found by Line Selector"); } }
private void Awake() { Instance = this; gos = new List <GameObject>(); if (btn != null) { btn.onClick.AddListener(CleanAll); } }
private void ProcessLines() { while (linesToProcess.Count > 0) { string currentLine = linesToProcess.Dequeue(); LineManager.ProcessLine(this, currentLine); } PlayersManager.Instance.Save(); }
public async Task <ActionResult> DeleteConfirmed(int id) { LineManager lineManager = await db.LineManagers.FindAsync(id); db.LineManagers.Remove(lineManager); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
private void OnTriggerEnter(Collider other) { //전력을 받는다 if (other.tag == "Line") { Connect = true; OnArround(false); Line = other.gameObject.GetComponentInParent <LineManager>(); } }
public override void OnInspectorGUI() { DrawDefaultInspector(); LineManager tmp = (LineManager)target; if (GUILayout.Button("Draw Line")) { tmp.DrawLine(); } }
public async Task <IActionResult> Update(LineDto dto) { await lineService.Update(dto); LineManager.Add(dto); return(Ok(new JsonResultDto <LineDto> { Data = dto })); }
public HomeController( LineManager lineManager, StopManager stopManager, DepartureManager departureManager, SettingsManager settingsManager) { _lineManager = lineManager; _stopManager = stopManager; _departureManager = departureManager; _settingsManager = settingsManager; }
public async Task <IActionResult> Delete(string id) { var result = await lineService.Delete(x => x.Id == id) > 0; LineManager.Remove(id); return(Ok(new JsonResultDto <bool> { Data = result, Message = result ? null : "操作失败" })); }
// Start is called before the first frame update void Start() { timers = new List <float>(); lineManager = GameObject.FindObjectOfType <LineManager>(); pieces = new List <RepairObject>(FindObjectsOfType <RepairObject>()); foreach (var piece in pieces) { timers.Add(Random.Range(minTimeToBreak, maxTimeToBreak)); } gm = GameObject.FindObjectOfType <GM>(); }
private IEnumerator Work(Collider other) { if (other.tag == "Line") { OnArround(false); Line = other.gameObject.GetComponentInParent <LineManager>(); if (Line.parent != null) { if (Line.parent.tag == "VCC" || Line.parent.tag == "BreadPlus") { if (this.tag != "BreadGND" && this.tag != "BreadDIGITAL") { group.tag = "BreadPlus"; this.tag = "BreadPlus"; group.SetVcc(true); } } else if (Line.parent.tag == "GND" || Line.parent.tag == "BreadGND") { if (this.tag != "BreadPlus" && this.tag != "BreadDIGITAL") { group.tag = "BreadGND"; this.tag = "BreadGND"; group.SetGND(true); } } else if (Line.parent.tag == "DIGITAL" || Line.parent.tag == "BreadDIGITAL") { if (this.tag != "BreadPlus" && this.tag != "BreadGND") { group.tag = "BreadDIGITAL"; this.tag = "BreadDIGITAL"; group.SetDigital(true); } } if (Line.parent.tag != "VCC" && Line.parent.tag != "GND" && Line.parent.tag != "DIGITAL") { pinruncollect = new RunCollect(Line.RunCollect); pinpausecollect = new PauseCollect(Line.PauseCollect); } } } yield return(new WaitForSeconds(1)); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(instance); } }
/// <summary> /// Create a new text document with the specified initial text. /// </summary> public TextDocument(IEnumerable<char> initialText) { if (initialText == null) throw new ArgumentNullException("initialText"); rope = new Rope<char>(initialText); lineTree = new DocumentLineTree(this); lineManager = new LineManager(lineTree, this); lineTrackers.CollectionChanged += delegate { lineManager.UpdateListOfLineTrackers(); }; anchorTree = new TextAnchorTree(this); undoStack = new UndoStack(); FireChangeEvents(); }