예제 #1
0
        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;
            }
        }
예제 #2
0
        public CCStopGridState(CCStopGrid action, CCNodeGrid target)
            : base(action, target)
        {
            CCGridBase pGrid = target.Grid;

            if (pGrid != null && pGrid.Active)
            {
                pGrid.Active = false;
            }
        }
예제 #3
0
        public CCReuseGridState(CCReuseGrid action, CCNodeGrid target)
            : base(action, target)
        {
            CCGridBase grid = target.Grid;

            if (grid != null && grid.Active)
            {
                grid.ReuseGrid += action.Times;
            }
        }
예제 #4
0
        public override void StartWithTarget(CCNode target)
        {
            base.StartWithTarget(target);

            CCGridBase pGrid = m_pTarget.Grid;

            if (pGrid != null && pGrid.Active)
            {
                pGrid.Active = false;
            }
        }