亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sprite.java

?? 大量j2me源代碼
?? JAVA
字號:
import javax.microedition.lcdui.Graphics;

/**
 * A state manager for a game sprite. Use in conjunction with an ImageSet in
 * order to draw animated, multi-state sprites. For each instance of an animated
 * graphic you should create one corresponding Sprite object. Graphics are
 * shared using a common ImageSet. To animate you must call this class's cycle
 * method.
 * @author Martin J. Wells
 */
public class Sprite
{
   private int currentFrame;
   private int currentState;
   private long currentStateBegan;		// time this currentState started
   private ImageSet imageSet;
   private long lastFrameChange;
   private int totalCycles;

   /**
    * Constructor for a Sprite object requiring the source image set and the
    * starting state and frame.
    * @param is The imageSet which is the source of graphics for this Sprite.
    * @param startingState The starting state (normally 0).
    * @param startingFrame The starting frame (normally 0).
    */
   public Sprite(ImageSet is, int startingState, int startingFrame)
   {
      imageSet = is;
      setState(startingState, true);
      currentFrame = startingFrame;
   }

   /**
    * Change to a specific frame.
    * @param f The frame to change to.
    */
   public final void setFrame(int f)
   {
      currentFrame = f;
   }

   /**
    * Change to a different state.
    * @param s The state to change to.
    * @param force Normally we wont change change if that is already the current
    * state. However this has the effect of not reseting the state began time
    * and totalCycles counter. Set this to true to force those to be reset.
    */
   public final void setState(int s, boolean force)
   {
      if (currentState != s || force)
      {
         currentState = s;
         currentFrame = 0;
         totalCycles = 0;
         currentStateBegan = System.currentTimeMillis();
      }
   }

   /**
    * Resets all state information such as the current animation frame, total
    * number of completed cycles and the time the state began.
    */
   public final void reset()
   {
      currentFrame = 0;
      totalCycles = 0;
      currentStateBegan = 0;
      lastFrameChange = 0;
   }

   /**
    * Get the time the last state change occurred.
    * @return Time last state was changed in milliseconds since epoch.
    */
   public final long getWhenStateBegan()
   {
      return currentStateBegan;
   }

   /**
    * @return The total time spent in the current state.
    */
   public final long getTimeInCurrentState()
   {
      return (System.currentTimeMillis() - currentStateBegan);
   }

   /**
    * @return The current state.
    */
   public final int getCurrentState()
   {
      return currentState;
   }

   /**
    * @return The current frame number.
    */
   public final int getCurrentFrame()
   {
      return currentFrame;
   }

   /**
    * Draws the current sprite frame onto a specified graphics context.
    * @param target The target to draw the image frame onto.
    * @param targetX The target x position.
    * @param targetY The target y position.
    */
   public final void draw(Graphics target, int targetX, int targetY)
   {
      imageSet.draw(target, currentState, currentFrame, targetX, targetY);
   }

   /**
    * Cycles the current sprites animation and goes forward by the number of
    * frames corresponding to the amount of time that has elapsed.
    * @param deltaMS The amount of time that has passed in milliseconds.
    */
   public final void cycle(long deltaMS)
   {
      // change frame if we are animating (and enough time has passed)
      if (imageSet.getTotalFrames(currentState) > 1 &&
              imageSet.getAnimTime(currentState) > 0)
      {
         long deltaTime = System.currentTimeMillis() - lastFrameChange;
         if (deltaTime > imageSet.getAnimTimePerFrame(currentState))
         {
            currentFrame++;
            lastFrameChange = System.currentTimeMillis();
            if (currentFrame >= imageSet.getTotalFrames(currentState))
            {
               currentFrame = 0;
               totalCycles++;
            }
         }
      }
   }

   /**
    * @return The total number of cycles this sprite has animated through.
    * Very useful for determining if a sprite has finished it's animation.
    */
   public final int getTotalCycles()
   {
      return totalCycles;
   }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频你懂的| 国产精品无人区| 一本一道久久a久久精品| 国产黄人亚洲片| 国产尤物一区二区| 国产一区二区毛片| 岛国精品在线观看| 成人的网站免费观看| 成人永久aaa| av色综合久久天堂av综合| caoporn国产一区二区| 94色蜜桃网一区二区三区| 欧美图片一区二区三区| 91精品蜜臀在线一区尤物| 日韩女同互慰一区二区| 国产午夜精品一区二区| 亚洲婷婷综合久久一本伊一区| 亚洲免费高清视频在线| 午夜视频在线观看一区| 日本不卡1234视频| 国产精品亚洲一区二区三区在线| 国产一区二区女| av午夜精品一区二区三区| 欧美色精品天天在线观看视频| 欧美巨大另类极品videosbest | 久久久亚洲精品一区二区三区| 26uuu精品一区二区三区四区在线| 久久久久久一级片| 中文字幕高清不卡| 亚洲综合精品自拍| 另类小说欧美激情| 91亚洲精品久久久蜜桃网站 | 日韩成人免费电影| 美女被吸乳得到大胸91| 国产盗摄精品一区二区三区在线| 一本色道**综合亚洲精品蜜桃冫| 欧美丰满少妇xxxxx高潮对白| 亚洲精品在线观看网站| 中文字幕五月欧美| 天天射综合影视| 国产成人午夜高潮毛片| 欧美午夜精品电影| 国产日韩欧美精品在线| 日日夜夜精品视频天天综合网| 国产精品亚洲一区二区三区妖精| 欧美午夜精品久久久久久孕妇| 国产校园另类小说区| 亚洲第一精品在线| 97se亚洲国产综合自在线| 欧美tk—视频vk| 亚洲一区二区三区四区在线观看| 国产伦精品一区二区三区视频青涩 | 欧美视频三区在线播放| 精品国产a毛片| 亚洲成av人片一区二区| 成人高清av在线| 精品国产123| 免费不卡在线观看| 欧洲国内综合视频| 中文字幕不卡在线| 国产盗摄精品一区二区三区在线 | 97精品久久久午夜一区二区三区 | 91美女在线观看| 国产亚洲污的网站| 狂野欧美性猛交blacked| 精品视频一区三区九区| 亚洲激情图片一区| 不卡的av中国片| 国产精品国产精品国产专区不片 | 一区二区三区在线免费播放| 国产成人av一区| 久久久亚洲午夜电影| 国产最新精品免费| 久久在线观看免费| 国产在线一区二区综合免费视频| 日韩欧美三级在线| 久久99日本精品| 精品成人在线观看| 国产精品小仙女| 国产欧美一区二区精品性| 国产精品99久久久久久有的能看| 久久久久久久久久久99999| 老司机精品视频在线| 欧美成人精品高清在线播放| 国产专区欧美精品| 中文字幕高清一区| 91蝌蚪porny九色| 亚洲综合在线视频| 欧美日韩精品专区| 另类综合日韩欧美亚洲| 精品国产免费视频| www.欧美色图| 夜夜亚洲天天久久| 日韩美女视频一区二区在线观看| 国产在线国偷精品产拍免费yy| 久久精品一区二区三区av| caoporm超碰国产精品| 亚洲高清在线视频| 欧美精品一区二区三区久久久| 国产成人av电影在线观看| 中文字幕在线观看不卡视频| 色就色 综合激情| 奇米精品一区二区三区在线观看 | 国产精品一二三| 亚洲精品国产一区二区三区四区在线 | 爽好多水快深点欧美视频| 精品久久久网站| 99视频一区二区| 三级亚洲高清视频| 国产精品久久久久一区二区三区共| 精品视频一区三区九区| 国产又黄又大久久| 亚洲精品乱码久久久久久日本蜜臀| 久久综合狠狠综合久久综合88| www..com久久爱| 免费在线欧美视频| 亚洲男人天堂av网| 久久在线观看免费| 欧美精品在欧美一区二区少妇| 国产精品一卡二卡| 日本美女视频一区二区| 综合av第一页| 国产视频在线观看一区二区三区| 在线观看一区二区视频| 精品亚洲国内自在自线福利| 亚洲永久免费视频| 亚洲国产精品t66y| 2020国产精品久久精品美国| 欧美性生活一区| 99这里只有精品| 国产不卡免费视频| 激情深爱一区二区| 亚洲亚洲精品在线观看| 亚洲欧美激情在线| 国产蜜臀97一区二区三区| 日韩欧美亚洲一区二区| 欧美日韩一区中文字幕| 99视频精品全部免费在线| 国产91精品久久久久久久网曝门| 久久精工是国产品牌吗| 人人狠狠综合久久亚洲| 亚洲成人自拍偷拍| 亚洲男人的天堂网| 国产精品看片你懂得| 亚洲国产成人一区二区三区| 不卡的av在线播放| 精品剧情v国产在线观看在线| 欧美日高清视频| 欧美久久久一区| 91精品国产欧美一区二区成人| 欧美三片在线视频观看| 欧美日韩在线直播| 欧美人与z0zoxxxx视频| 欧美日韩你懂得| 欧美男男青年gay1069videost| 欧美吻胸吃奶大尺度电影| 欧美写真视频网站| 91精品国产综合久久精品| 欧美一级二级在线观看| 欧美一区二区免费观在线| 日韩欧美一级在线播放| 欧美成人艳星乳罩| 国产日韩影视精品| 国产精品久久久久久久久搜平片 | 国产一区免费电影| 国产传媒欧美日韩成人| 成人国产在线观看| 欧美在线不卡视频| 欧美日韩dvd在线观看| 精品国产免费一区二区三区四区 | 精品在线观看视频| 大白屁股一区二区视频| 色综合天天视频在线观看| 欧美综合色免费| 日韩免费在线观看| 亚洲国产精品高清| 午夜精品成人在线视频| 狠狠色丁香婷婷综合| 99r精品视频| 日韩手机在线导航| 亚洲国产成人午夜在线一区| 亚洲不卡av一区二区三区| 久久99精品国产麻豆婷婷洗澡| 不卡的av电影| 91精品视频网| 国产精品激情偷乱一区二区∴| 婷婷综合另类小说色区| 国产一区不卡视频| 精品视频一区二区三区免费| 国产婷婷一区二区| 午夜精品福利一区二区蜜股av| 国产suv精品一区二区883| 91久久免费观看| 国产免费成人在线视频| 日韩精品一二三四| 成av人片一区二区| 日韩一区二区三区四区| 亚洲精品日韩专区silk| 国产精品自拍在线| 日韩欧美亚洲一区二区|