public override void StartWithTarget(CCNode target) { base.StartWithTarget(target); CCNode t = m_pTarget; CCGridBase targetGrid = t.Grid; if (targetGrid != null && targetGrid.ReuseGrid > 0) { Grid = targetGrid; if (targetGrid.Active && targetGrid.GridSize.X == m_sGridSize.X && targetGrid.GridSize.Y == m_sGridSize.Y /*&& dynamic_cast<CCGridBase*>(targetGrid) != NULL*/) { targetGrid.Reuse(); } else { Debug.Assert(false); } } else { if (targetGrid != null && targetGrid.Active) { targetGrid.Active = false; } CCGridBase newgrid = Grid; t.Grid = newgrid; t.Grid.Active = true; } }
public override void startWithTarget(CCNode pTarget) { base.startWithTarget(pTarget); CCGridBase newgrid = this.getGrid(); CCNode t = m_pTarget; CCGridBase targetGrid = t.Grid; if (targetGrid != null && targetGrid.ReuseGrid > 0) { if (targetGrid.Active && targetGrid.GridSize.x == m_sGridSize.x && targetGrid.GridSize.y == m_sGridSize.y) { targetGrid.reuse(); } } else { if (targetGrid != null && targetGrid.Active) { targetGrid.Active = false; } t.Grid = newgrid; t.Grid.Active = true; } }
public static CCGridBase gridWithSize(ccGridSize gridSize) { CCGridBase cCGridBase = new CCGridBase(); if (cCGridBase.initWithSize(gridSize)) { return(cCGridBase); } return(null); }
public static CCGridBase gridWithSize(ccGridSize gridSize, CCTexture2D texture, bool flipped) { CCGridBase cCGridBase = new CCGridBase(); if (cCGridBase.initWithSize(gridSize, texture, flipped)) { return(cCGridBase); } return(null); }
public override void startWithTarget(CCNode pTarget) { base.startWithTarget(pTarget); CCGridBase grid = this.m_pTarget.Grid; if (grid != null && grid.Active) { grid.Active = false; } }
public override void StartWithTarget(Node pTarget) { base.StartWithTarget(pTarget); CCGridBase pGrid = Target.Grid; if (pGrid != null && pGrid.Active) { pGrid.Active = false; } }
public static CCGridBase gridWithSize(ccGridSize gridSize, Texture texture, bool flipped) { CCGridBase pGridBase = new CCGridBase(); if (pGridBase.initWithSize(gridSize, texture, flipped)) { return pGridBase; } return null; }
public static CCGridBase gridWithSize(ccGridSize gridSize, CCTexture2D texture, bool flipped) { CCGridBase pGridBase = new CCGridBase(); if (pGridBase != null) { if (pGridBase.initWithSize(gridSize, texture, flipped)) { //pGridBase->autorelease(); } else { //CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }
public override void startWithTarget(CCNode pTarget) { base.startWithTarget(pTarget); CCGridBase grid = this.getGrid(); CCNode mPTarget = this.m_pTarget; CCGridBase cCGridBase = mPTarget.Grid; if (cCGridBase == null || cCGridBase.ReuseGrid <= 0) { if (cCGridBase != null && cCGridBase.Active) { cCGridBase.Active = false; } mPTarget.Grid = grid; mPTarget.Grid.Active = true; } else if (cCGridBase.Active && cCGridBase.GridSize.x == this.m_sGridSize.x && cCGridBase.GridSize.y == this.m_sGridSize.y) { cCGridBase.reuse(); return; } }
public static CCGridBase gridWithSize(ccGridSize gridSize) { CCGridBase pGridBase = new CCGridBase(); if (pGridBase.initWithSize(gridSize)) { return pGridBase; } return null; }
public static CCGridBase gridWithSize(ccGridSize gridSize) { CCGridBase pGridBase = new CCGridBase(); if (pGridBase != null) { if (pGridBase.initWithSize(gridSize)) { //pGridBase->autorelease(); } else { //CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }