package com.example.move;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.SurfaceView;
public class mySurfaceView extends SurfaceView implements Callback, Runnable {
private SurfaceHolder sfh;
private Paint paint;
private int x = 100, y = 100;
private Thread th;
private Bitmap bmp;
private Bitmap bmps[] = new Bitmap[12];
private int curFrame = 0;
int frame;
private Bitmap bg;
public mySurfaceView(Context context) {
super(context);
// TODO 自动生成的构造函数存根
sfh = this.getHolder();
sfh.addCallback(this);
paint = new Paint();
paint.setColor(Color.YELLOW);
bg = BitmapFactory.decodeResource(getResources(), R.drawable.bg);
frame = R.drawable.anim001;
for (int
Android人物精灵动画练习
最新推荐文章于 2021-05-28 12:14:45 发布
z
摘要由CSDN通过智能技术生成