⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isoman.java

📁 java learn PPT java learn PPT java learn PPT java learn PPT
💻 JAVA
字号:
     import java.awt.*;

     public class IsoMan extends Actor2D
     {
          public IsoMan(ActorGroup2D grp)
          {
               super(grp);
          }

          public void update()
          {
               if(currAnimation == null)
               {
                    currAnimation = group.getAnimationStrip(IsoManGroup.WALKING_NORTH);
               }

               if(frameWidth <= 0)
               {
                    frameWidth = currAnimation.getFrameWidth();
               }
               if(frameHeight <= 0)
               {
                    frameHeight = currAnimation.getFrameHeight();
               }

               if(! vel.equals(Vector2D.ZERO_VECTOR))
               {
                    animate();
               }

               // 确保IsoMan的脚被设置为参考点
               xform.setToTranslation(pos.getX()-frameWidth/2, pos.getY()-frameHeight); 

               updateBounds();
               checkBounds();
          }

     }    // IsoMan

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -