下载频道  >  hejiaying68的资源
  • 用户提交表单插件

    jquery web前端 用户提交表单验证插件 轻量级 可编辑 稳定性高

    2019-03-25
    7
  • 5个亲测好用的基于javascript的开源网页流程图、结构图

    可在客户端编辑节点 ,获取节点所有信息并显示,放大缩小视图,看见节点相关明细, 设置连线方式 ,能在现有节点上增加新的节点,能在框上移动节点位置,伸缩节点大小,在界面中拖动,拖入基本元素并布局,能分别编辑部分元素、新建、连接、删除节点,移动在节点上会变色,能拖动、复原拖动、勾选节点,能在某个区域内拖动节点,编辑节点上的信息,让节点分层显示,点击之后打勾,可设置箭头节点位置等,总之现在的流程图需要的功能应该都囊括了。

    2017-05-25
    50
  • pmp复习步骤

    看了之后将会对pmp考试做到心里有数

    2016-08-22
    0
  • 多线程服务器平台-phpstudy

    支持多线程编码

    2016-08-22
    3
  • 服务器上的数据库-navicat

    可让在同一个服务器上的几个用户共享同一个数据库

    2016-08-22
    0
  • 射击游戏 android

    可以实现手机射击效果,控制射击方向, public static synchronized GameView sharedGameView(Context context,int level){ if(gameView==null){ gameView = new GameView(context,level); } return gameView; } private GameView(Context context,int level) { super(context); this.context = context; this.level = level; heroBmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.hero); projectileBmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.projectile); targetBmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.target); Tools.sharedTools(context).playBgSnd(); projectiles = new Vector(); targets = new Vector(); handler = new Handler(){ @Override public void handleMessage(Message msg) { if(over==true){ return; } switch(msg.what){ case kWin: //should be produce target. { overOutpost(true); break; } case kFail: overOutpost(false); break; case kPostInvalidate: invalidate(); break; case kProduceTarget: Random random = new Random(System.currentTimeMillis()); if(getHeight()!=0){ //because before gameView was display,this value is 0 float y = random.nextInt(getHeight()-targetBmp.getHeight()); float speed = Tools.sharedTools(GameView.this.context).getSetting(GameView.this.level).targetSpeed; targets.add(new Target(getWidth(), y,speed)); } break; default: break; } } }; timer = new Timer(true); timer.scheduleAtFixedRate(new TimerTask() { int j=0; int i=0; @Override public void run() { if(over==true){ return; } handler.sendEmptyMessage(kPostInvalidate); i=i+1; j=j+1; Log.d("waj", "i:"+i+Thread.currentThread().getName()+" "+GameView.this.toString()); int a = (int)Math.ceil(Tools.sharedTools(GameView.this.context).getSetting(GameView.this.level).targetDensity*60.0/1000.0); if(j == a){ handler.sendEmptyMessage(kProduceTarget); j=0; } if(i<1800){ for (Target target : targets) { if (target.latestX <= 0) { i=0; j=0; handler.sendEmptyMessage(kFail); break; } } } else{//30 second handler.sendEmptyMessage(kWin); i = 0; j = 0; } } }, 0, (long) (1000.0/60.0)); //flush 60 per second } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); canvas.drawBitmap(heroBmp, 0, getHeight()/2-heroBmp.getHeight()/2, paint); if(over==true){ return; } // remove projectiles which had outof bound of gameView. List destroyedProjectiles = new ArrayList(); for (Projectile projectile : projectiles) { Point p = projectile.nextPoint(); if (p.x > getWidth() | p.x + projectileBmp.getWidth() < 0 | p.y + projectileBmp.getHeight() < 0 | p.y > getHeight()) { destroyedProjectiles.add(projectile); continue; } canvas.drawBitmap(projectileBmp, p.x, p.y, paint); } projectiles.removeAll(destroyedProjectiles); // remove targets which's body had outof left bound of gameView List destroyedTargets = new ArrayList(); for (Target target : targets) { Point p = target.nextPoint(); canvas.drawBitmap(targetBmp, p.x, p.y, paint); } targets.removeAll(destroyedTargets); // crash detect destroyedProjectiles.clear(); destroyedTargets.clear(); for (Projectile projectile : projectiles) { for (Target target : targets) { // 判断是否相交 float x1 = projectile.latestX; float x2 = projectile.latestX + projectileBmp.getWidth(); float y1 = projectile.latestY; float y2 = projectile.latestY + projectileBmp.getHeight(); float x3 = target.latestX; float x4 = target.latestX + targetBmp.getWidth(); float y3 = target.latestY; float y4 = target.latestY + targetBmp.getHeight(); if (x1 < x4 && x2 > x3 && y1 < y4 && y2 > y3) { destroyedProjectiles.add(projectile); destroyedTargets.add(target); } } } projectiles.removeAll(destroyedProjectiles); targets.removeAll(destroyedTargets); } //outpost is over, include win and fail private void overOutpost(boolean isWin) { over = true; projectiles.clear(); targets.clear(); Intent intent = new Intent(context,SecondActivity.class); Activity mainActivity = (MainActivity)context; if(isWin){ intent.putExtra("message","You are winner of "+level+" outpost!"); mainActivity.startActivityForResult(intent,100); } else{ intent.putExtra("message","You failed on the "+level+" outpost"); mainActivity.startActivityForResult(intent,200); } } @Override public boolean onTouchEvent(MotionEvent event) { if(event.getAction()==MotionEvent.ACTION_DOWN){ int count = Tools.sharedTools(context).getSetting(level).projectileNum; for(int i=1;i<=count;i++){ Tools.sharedTools(context).playPewPew(); Projectile projectile = new Projectile(heroBmp.getWidth()/2, getHeight()/2-projectileBmp.getHeight()/2, event.getX(), event.getY(), Tools.sharedTools(context).getSetting(level).projectileSpeed*i); projectiles.add(projectile); } } return super.onTouchEvent(event); } //data area private final int kFail = 1; private final int kWin = 2; private final int kPostInvalidate=3; private final int kProduceTarget=4; private List projectiles; private List targets; private Bitmap heroBmp; private Bitmap projectileBmp; private Bitmap targetBmp; private Context context; private Timer timer; private Handler handler; private int level; //from 1...10 private boolean over=false; private static GameView gameView; void setLevel(int level){ this.level = level; } void stop(){ over = true; } void start(){ over = false; }

    2013-04-15
    3
  • 三维坐标画图

    三维 改变材质 改变视角 改变颜色 改变灯光

    2012-12-20
    1
  • 数字图像处理

    数字图像处理 反色 镜像 平移 对比度修改 亮度调节 指数变换 对数变换 直方图 装箱 均值

    2012-11-22
    3
  • MFC 画图 修改

    MFC 画图 修改大小 修改颜色 保存 打印 画直线 任意画线 画直线 画曲线 画圆 画矩形 画椭圆 画各种圆弧

    2012-11-09
    3
img

关注 私信


用户积分:123