public override void StartWithTarget(Node pTarget) { base.StartWithTarget(pTarget); CCGridBase newgrid = this.getGrid(); Node t = Target; 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 CCStopGridState(CCStopGrid action, CCNodeGrid target) : base(action, target) { CCGridBase pGrid = target.Grid; if (pGrid != null && pGrid.Active) { pGrid.Active = false; } }
public CCReuseGridState(CCReuseGrid action, CCNodeGrid target) : base(action, target) { CCGridBase grid = target.Grid; if (grid != null && grid.Active) { grid.ReuseGrid += action.Times; } }
public override void StartWithTarget(CCNode target) { base.StartWithTarget(target); CCGridBase pGrid = m_pTarget.Grid; if (pGrid != null && pGrid.Active) { pGrid.Active = false; } }