安卓贪吃蛇课程设计报告(15)

2021-04-05 16:02

}

此外还定义了updateWalls()、updateApples()、updateSnake()绘制墙、果子、蛇,以及更新画面函数、保存位置坐标函数等,具体代码请详见目录。

4.3界面设计

界面设计包括游戏主界面(Snake)、游戏说明界面、游戏界面的设计。界面的设计采用的是xml文档形式,在xml文档中规划好界面布局布局后,分别在java文件中声明。

主界面设计:主界面包括一个 TextView及布局设定,其main.xml文档如下

<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright (C) 2007 The Android Open Source Project

you may not use this file except in compliance with the License. You may obtain a copy of the License at

/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->

android:layout_width="match_parent" android:layout_height="match_parent">

<com.example.android.snake.SnakeView android:id="@+id/snake"

android:layout_width="match_parent"

android:layout_height="match_parent" tileSize="24" />


安卓贪吃蛇课程设计报告(15).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:中学2005级高三四班毕业十周年聚会策划书

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: