用NetBeans开发J2ME游戏实例讲解(三)[13]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

            }
           
            moves++;// 增加移动的步骤
        
            byte[] step = new byte[5]; //五个参数分别为,前四个和SelectArea一样,最后一个表示上1,下2,左3,右4。

            //将此次移动记录到历史记录当中;

            step[0]= this.currentCursor[0];

            step[1]= this.currentCursor[1];

            step[2]= this.currentCursor[2];

            step[3]= this.currentCursor[3];

            step[4]= this.getMoveDirection();

            history.addStep(step);

            //PrintHistory("record a step");// 调试信息

            //PrintGrid("3");// 调试信息

            this.currentCursor[0] = this.nextCursor[0];//重置选中位置的水平坐标

            this.currentCursor[1] = this.nextCursor[1];//重置选中位置的竖直坐标

            this.nextCursor[0] = -1;//清空要移动到的位置

            this.nextCursor[1] = -1;//清空要移动到的位置

            this.nextCursor[2] = 0;//清空要移动到的位置

            this.nextCursor[3] = 0;//清空要移动到的位置

        }

    }

}

本文关键:用NetBeans开发J2ME游戏实例讲解(三)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top