一、游戏效果图: 飞机发射的子弹
二、实现原理:重写paintComponet方法,按照一定的时间间隔,让子弹的坐标一直向Y轴递减,这样这实现了子弹的运动效果,子弹重画的开始位置就是飞机的坐标。
三、代码:在前两次的基础,把代码进行一些简单优化,如下:
package com.jack;
import java.awt.Graphics;
import java.awt.Image;
...
package com.example.customshapedemo;import android.content.Context;import android.content.res.TypedArray;import android.graphics.Bitmap;import android...
分类:
其他好文 时间:
2014-11-20 18:26:22
阅读次数:
217
用tikz画的图片如果想用于别的tex文件中,需要生产与图片大小符合的pdf图片文件(这样可以防止后续截图丢失像素)。方法如下,使用pgfrealjob。一个简单的例子:\documentclass{article}\usepackage{graphics}\usepackage{tikz}\pgf...
分类:
其他好文 时间:
2014-11-20 13:36:49
阅读次数:
135
this computer meets the requirements for HAXM,but intel Virtualization Technology (VT-x) is not turned on. HAXM cannot be instealled until VT-x is ena...
分类:
其他好文 时间:
2014-11-19 20:13:59
阅读次数:
10688
VNC (Virtual Network Computer)是虚拟网络计算机的缩写。VNC 是在基于 UNIX 和 Linux 操作系统的免费的开源软件,远程控制能力强大,高效实用,其性能可以和 Windows 和 MAC 中的任何远程控制软件媲美。在 Linux 中,VNC 包括以下四个命令:.....
分类:
其他好文 时间:
2014-11-19 18:20:51
阅读次数:
159
由于最近要用到ICF,DPM等新的行人检测算法,找到了开源库CCV http://libccv.org/tutorial/ ,但代码是在linux平台下的,公司机器又不允许自己装双系统,就使用了Visual Box+Ubuntu来进行实现,具体的实现步骤如下:
一、安装VisualBox+Ubuntu
1 下载VisualBox https://www.virtualbox.org/
...
分类:
编程语言 时间:
2014-11-19 14:15:09
阅读次数:
953
1.如果 没有更改工作空间,去c:\user\administrator中删除.android文件 重启eclipse 网上通常只说了这种方法2.如果 更换了工作空间 则需要将原工作空间中 your workspace\.metadata\.plugins\org.eclipse.core.runt...
分类:
移动开发 时间:
2014-11-19 12:29:45
阅读次数:
206
How to manually remove an infected file from your computer
In order to manually remove an infected item from your computer you need to perform the following steps:
1. Restart the computer in Safe...
分类:
其他好文 时间:
2014-11-19 11:15:22
阅读次数:
162
C++ TCHAR* 与char* 互转 在MSDN中有这么一段: Note: The ANSI code pages can be different on different computers, or can be changed for a single computer, leading ...
分类:
编程语言 时间:
2014-11-19 10:44:44
阅读次数:
274
How to manually remove an infected file from your computer
In order to manually remove an infected item from your computer you need to perform the following steps:
1. Restart the computer in Safe...
分类:
其他好文 时间:
2014-11-19 01:12:38
阅读次数:
246