public void DestructNaviMesh() { _navigation.DestructNavi(); _splinecurve.destructSplinecurveAll(); _triCollector.DestructAllTris(); _triCollector = null; _navigation = null; _splinecurve = null; }
//@ Process public void InitializeNaviMesh() { _navigation = new CNavigation(); _triCollector = new CTriCollector(); _splinecurve = new CSplineManufacturer(); _navigation.InitializeNavi(); _triCollector.InitTriCollector(); _splinecurve.InitSplieCurve(); m_meshGeometry = GetComponent <MeshFilter>().mesh; m_arrVertex = m_meshGeometry.vertices; m_arrTri = m_meshGeometry.triangles; }
public bool resetGlobal(int iIdxKeyNavi, bool bInitFromGeometry) { if (iIdxKeyNavi < 0) { return(false); } _IdxKeyNavi = iIdxKeyNavi; bool bResultProcess = false; //@ Clear all managers bResultProcess = clearGLOBAL(true); if (false == bResultProcess) { Debug.Log("Error. clearGLOBAL()!/////"); } //@ Instantiate NaviMesh m_meshNavigation_global = m_datanavimeshs.getNavigationMesh(iIdxKeyNavi); m_meshNavigation_global.InitializeNaviMesh(); m_triCollector = m_meshNavigation_global.triCollector; m_SplineCurve = m_meshNavigation_global.splinecurve; if (true == bInitFromGeometry) { //@ Construct All Triangle bResultProcess = resetGlobal_TrianglesAll(m_meshNavigation_global); if (false == bResultProcess) { Debug.Log("Error!.//"); } //@ Set constant objects to start position bResultProcess = resetGlobal_constantObjects(m_triCollector, false); if (false == bResultProcess) { Debug.Log("Error!.//"); } //@ Intiailzie basemanets LinkTriCollectorToAllBase(ref m_baseTowerCollector, ref m_baseCoreCollector, ref m_baseCoresubCollector, ref m_baseStartCollector, ref m_baseBlockCollector, m_triCollector); //@ Re-load navi cells from template pre-loads. LoadNaviFromTemplate(); //@ Load bases. Load_BaseTower_Binary(ref m_baseTowerCollector); Load_BaseCore_Binary(ref m_baseCoreCollector); Load_BaseCoreSub_Binary(ref m_baseCoresubCollector); Load_BaseStart_Binary(ref m_baseStartCollector); Load_BaseBlock_Binary(ref m_baseBlockCollector); //@ Load Curve Path through script bResultProcess = Load_CurvePath_Binary(ref m_SplineCurve); if (false == bResultProcess) { Debug.Log("loadingProcess_Binary Load_CurvePath_Binary_error. //"); } //@ Construct Navigation bResultProcess = resetGlobal_NavigationCells(m_triCollector, ref m_meshNavigation_global); if (false == bResultProcess) { Debug.Log("Error!.//"); } //@Initialze UnitWalking UnitWalking.SetStatusCellToCell(); } // if (true == bInitFromGeometry) else { //@ Load using script. loadingProcess_Binary(iIdxKeyNavi); } // if (false == bInitFromGeometry) //@ Input Process Initialize m_processInput.resetInput(this); m_intervalUnitWalking.InitIntervalUnitWalking(m_triCollector); return(true); } // public void resetGlobal
protected bool Load_CurvePath_Binary(ref CSplineManufacturer splinecurveManufacturer) { splinecurveManufacturer.LoadCurvePath_CMapTemplate(m_stageMap.FlyUnitPath_List); return(true); }
protected void setSplineGuide(int isplineguide, ref CSplineManufacturer.curvesection[] arrLineGuide) { CNaviMesh navimeshcurr = getNavimeshcurr(); CSplineManufacturer splinecurveManufacturer = navimeshcurr.splinecurve; arrLineGuide = splinecurveManufacturer.getLineGuide(isplineguide); }