コード例 #1
0
 boolean setPlaneDraw(int index, Picture draw) {
   STGPlane plane = planes.get(index);
   if (plane == null) {
     plane = new STGPlane();
     this.planes.put(index, plane);
   }
   plane.font = null;
   plane.color = null;
   plane.str = null;
   plane.planeMode = DRW_MODE;
   plane.view = true;
   plane.images.clear();
   plane.animation = false;
   plane.animeNo = 0;
   plane.draw = draw;
   return true;
 }
コード例 #2
0
 boolean setPlaneCenterString(int index, String mes) {
   STGPlane plane = planes.get(index);
   if (plane == null) {
     plane = new STGPlane();
     this.planes.put(index, plane);
   }
   plane.font = LFont.getFont(LSystem.FONT_NAME, 0, planeFontSize);
   plane.color = new LColor(0, 0, 0);
   plane.str = mes;
   plane.planeMode = CENTER_STR_MODE;
   plane.view = true;
   plane.images.clear();
   plane.animation = false;
   plane.animeNo = 0;
   plane.draw = null;
   return true;
 }
コード例 #3
0
 boolean setPlaneFont(int index, String font, int style, int size) {
   STGPlane plane = planes.get(index);
   if (plane == null) {
     return false;
   } else if ((plane.planeMode & STR_MODE) == 0) {
     return false;
   } else {
     if (font == null) {
       font = LSystem.FONT_NAME;
     }
     if (style < 0) {
       style = 0;
     }
     if (size < 0) {
       size = planeFontSize;
     }
     plane.font = LFont.getFont(font, style, size);
     return true;
   }
 }
コード例 #4
0
 boolean setPlaneBitmap(int index, int animeNo, int imgId) {
   if (bitmapPack == null) {
     return false;
   }
   try {
     STGPlane plane = planes.get(index);
     if (plane == null) {
       plane = new STGPlane();
       this.planes.put(index, plane);
     }
     plane.animeNo = animeNo;
     plane.rect = bitmapPack.getImageRect(imgId);
     plane.images.put(plane.animeNo, imgId);
     plane.planeMode = GRP_MODE;
     plane.view = true;
     plane.str = null;
     plane.font = null;
     plane.color = null;
     plane.draw = null;
   } catch (Exception e) {
     e.printStackTrace();
   }
   return true;
 }