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

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

?? actor.java

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

/**
 * An abstract base class for higher level Actors. This class handles basic
 * position as well as maintaining a link to the GameScreen. A class extending
 * this needs to implement the cycle and render methods.
 * @author Martin J. Wells.
 */
abstract public class Actor
{
   protected GameScreen gameScreen;
   private int x, y;

   /**
    * Constructs a new Actor.
    * @param gsArg The GameScreen this Actor belongs to.
    * @param xArg The starting x position.
    * @param yArg The starting y position.
    */
   public Actor(GameScreen gsArg, int xArg, int yArg)
   {
      gameScreen = gsArg;
      x = xArg;
      y = yArg;
   }

   /**
    * Called by the main game loop to let the Actor have a life. Typically an
    * implementation should use the deltaMS (the number of milliseconds that
    * have passed since the cycle method was last called) to carry out movement
    * or other actions relative to the amount of time that has passed. The
    * default implementation in the base class does nothing.
    * @param deltaMS The number of milliseconds that have passed since the last
    * call to cycle.
    */
   public void cycle(long deltaMS) { }

   /**
    * Called by the main game loop to draw this Actor to the screen. It is
    * intended that a child class override this implementation in order to
    * draw a representation of the actor (in a way it sees fit).
    * @param g The Graphics context upon which to draw the actor.
    */
   public void render(Graphics g) { }

   /**
    * Returns the width of the Actor (can be overriden by a child class to
    * return a different size).
    * @return Width of the actor.
    */
   public int getActorWidth()
   {
      // square by default
      return getActorHeight();
   }

   /**
    * Returns the height of the Actor (can be overriden by a child class to
    * return a different size). The default implementation (the most common
    * case) is to use a value slightly smaller than the lane height.
    * @return Height of the actor.
    */
   public int getActorHeight()
   {
      return gameScreen.getLaneHeight() - 2;
   }

   /**
    * @return The current x position of the actor.
    */
   public int getX() { return x; }

   /**
    * Sets the current x position of the actor. We also check to see if the
    * actor has moved off the edge of the screen and wrap it around.
    */
   public void setX(int newX)
   {
      x = newX;

      // we wrap on the x-axis on a constant number to maintain an
      // equal distance between all vehicles
      if (x < -32)
         x = gameScreen.getWidth();

      if (x > gameScreen.getWidth())
         x = -getActorWidth();
   }

   /**
    * @return The current y position of the actor.
    */
   public int getY() { return y; }

   /**
    * Sets the current y position of the actor. We also check to see if the
    * actor has moved off the edge of the screen and wrap it around.
    */
   public void setY(int newY)
   {
      y = newY;

      // we don't wrap on the y-axis
      if (y < gameScreen.getLaneYPos(0))
         y = gameScreen.getLaneYPos(0);

      if (y > gameScreen.getLaneYPos(8))
         y = gameScreen.getLaneYPos(8);
   }

   /**
    * Simple collision detection checks if a given point is in the Actor's
    * bounding rectangle.
    * @param px The x position of the point to check against.
    * @param py The y position of the point to check against.
    * @return true if the point px, py is within this Actor's bounding rectangle
    */
   public boolean isCollidingWith(int px, int py)
   {
      if (px >= getX() && px <= (getX() + getActorWidth()) &&
          py >= getY() && py <= (getY() + getActorHeight()) )
         return true;
      return false;
   }

   /**
    * Determins if another Actor has collided with this one. We do this by
    * checking if any of the four points in the passed in Actor's bounding
    * rectangle are within the bounds of this Actor's (using the isCollidingWith
    * point method above)
    * @param another The other Actor we're checking against.
    * @return true if the other Actor's bounding box collides with this one.
    */
   public boolean isCollidingWith(Actor another)
   {
      // check if any of our corners lie inside the other actor's
      // bounding rectangle
      if (isCollidingWith(another.getX(), another.getY()) ||
          isCollidingWith(another.getX() + another.getActorWidth(), another.getY()) ||
          isCollidingWith(another.getX(), another.getY() + another.getActorHeight()) ||
          isCollidingWith(another.getX() + another.getActorWidth(),
                          another.getY()+ another.getActorHeight()))
         return true;
      else
         return false;
   }

}


















?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费成人在线播放| 欧美精品 日韩| 久久综合色天天久久综合图片| 亚洲精品免费在线| 成人中文字幕电影| 欧美国产日韩一二三区| 亚洲国产人成综合网站| 一区二区三区中文在线观看| 日本精品裸体写真集在线观看| 日本一区二区三区四区在线视频| 国产成人综合自拍| 国产精品久久99| 色屁屁一区二区| 亚洲va在线va天堂| 精品少妇一区二区三区日产乱码| 蜜臀a∨国产成人精品| 精品日韩99亚洲| 99久久免费国产| 亚洲成av人片观看| 久久久国际精品| 91在线观看成人| 男女男精品视频| 国产精品久久久久久户外露出| 成人av集中营| 美女视频黄 久久| 国产精品美女久久久久久久久久久| 不卡大黄网站免费看| 亚洲福中文字幕伊人影院| 精品国产网站在线观看| 在线一区二区视频| 激情久久久久久久久久久久久久久久| 久久精品亚洲精品国产欧美kt∨| 在线中文字幕不卡| 国产一区二区剧情av在线| 欧美大片在线观看| 91蝌蚪porny| 性做久久久久久久久| 欧美国产精品专区| 精品久久久久久无| 欧美日韩精品三区| 欧美自拍偷拍一区| 色激情天天射综合网| 国产乱一区二区| 久久av资源站| 免费美女久久99| 免费看欧美女人艹b| 午夜精品福利视频网站| 一区二区日韩av| 亚洲品质自拍视频网站| 国产精品丝袜91| 欧美激情一区三区| 国产精品国产三级国产aⅴ入口| 日韩精品专区在线影院重磅| 欧美久久久影院| 欧美伦理视频网站| 欧美一区二区黄| 精品久久久久av影院| 久久久亚洲国产美女国产盗摄 | 亚洲自拍欧美精品| 一区二区三区四区蜜桃| 一二三区精品视频| 亚洲成人7777| 男人操女人的视频在线观看欧美| 琪琪久久久久日韩精品| 精品夜夜嗨av一区二区三区| 成人综合婷婷国产精品久久| 91网站在线观看视频| 欧美自拍偷拍午夜视频| 日韩一区二区不卡| 国产视频一区二区在线观看| 国产精品白丝在线| 日韩福利视频导航| 国产精品白丝jk黑袜喷水| 色综合天天在线| 精品国产一区二区三区四区四| 欧美激情一区二区三区蜜桃视频 | 久88久久88久久久| 97国产精品videossex| 8v天堂国产在线一区二区| 国产亚洲欧美日韩在线一区| 有坂深雪av一区二区精品| 日韩成人一区二区| 91丨九色porny丨蝌蚪| 日韩欧美黄色影院| 亚洲午夜成aⅴ人片| 国产999精品久久久久久| 欧美三级中文字幕在线观看| 国产午夜精品久久久久久久| 亚洲成人tv网| 欧美视频一区在线| 亚洲免费在线观看视频| 成人福利电影精品一区二区在线观看| 91精品国产免费久久综合| 一区二区三区久久| 色悠悠久久综合| 樱桃国产成人精品视频| 处破女av一区二区| 中文字幕乱码日本亚洲一区二区 | 国产精一区二区三区| www国产成人免费观看视频 深夜成人网| 亚洲国产精品欧美一二99| 在线精品视频免费观看| 一区二区三区久久久| 在线日韩一区二区| 亚洲国产日韩综合久久精品| 欧美天天综合网| 日韩精品久久久久久| 日韩欧美国产午夜精品| 国产精品自在在线| 亚洲人123区| 色老综合老女人久久久| 偷拍自拍另类欧美| 久久久精品tv| 色婷婷久久久久swag精品| 亚洲一二三四区不卡| 日韩欧美黄色影院| 成人黄色大片在线观看| 亚洲免费观看高清完整版在线观看| 欧美亚洲精品一区| 经典三级在线一区| 中文字幕欧美一| 欧美一二三在线| 99久久99久久综合| 蜜臀av国产精品久久久久| 国产精品色哟哟| 精品日韩av一区二区| 在线视频一区二区免费| 国产乱码字幕精品高清av| 亚洲国产成人av| 国产精品视频一二| 91精品国产综合久久精品性色| 粉嫩高潮美女一区二区三区| 日韩精品欧美成人高清一区二区| 日本一区二区视频在线观看| 日韩一区和二区| 国产精品亚洲午夜一区二区三区 | 一本久道久久综合中文字幕| 久久se精品一区精品二区| 亚洲午夜羞羞片| 日韩毛片视频在线看| 中文字幕免费一区| 久久中文娱乐网| 久久综合给合久久狠狠狠97色69| 欧美日韩亚洲综合在线| 欧美主播一区二区三区| 99精品久久免费看蜜臀剧情介绍| 国产91精品在线观看| 国产专区综合网| 国产成人精品影视| 国产白丝网站精品污在线入口| 久久99精品国产.久久久久 | 激情欧美一区二区三区在线观看| 国产精品国产三级国产普通话99| 国产永久精品大片wwwapp| 欧美国产一区在线| 91麻豆精品国产91久久久使用方法 | 国产日韩欧美一区二区三区乱码 | 国产91色综合久久免费分享| 中文字幕成人网| 色婷婷av一区二区三区软件 | 精品国产乱子伦一区| 国产精品一卡二| 亚洲三级在线观看| 色综合天天综合色综合av| 亚洲精品欧美在线| 91麻豆精品91久久久久同性| 国产一区二区不卡老阿姨| 国产清纯美女被跳蛋高潮一区二区久久w| 国产精品一区二区三区四区| 中文字幕日韩一区| 欧美日韩免费高清一区色橹橹| 免费视频最近日韩| 国产精品久久久久久久蜜臀 | 精品视频在线免费| 韩国午夜理伦三级不卡影院| 国产精品成人免费精品自在线观看 | 蜜桃av一区二区| 亚洲色图制服丝袜| 日韩一级二级三级| 国产成人亚洲精品青草天美| 99精品久久99久久久久| 日本免费新一区视频| 中文字幕一区二区视频| 欧美一级精品在线| 99热这里都是精品| 精品一区二区三区在线视频| 亚洲色图第一区| 欧美sm美女调教| 91福利资源站| 中文字幕一区在线| 欧美不卡在线视频| 欧美系列一区二区| 不卡影院免费观看| 久久99国产精品尤物| 一级日本不卡的影视| 久久久精品中文字幕麻豆发布| 色婷婷综合久久久久中文一区二区 | 亚洲国产中文字幕| 国产欧美日韩综合| 欧美亚洲国产一区二区三区va|