Пример #1
0
 public static PhongMaterial getMaterial(String face) {
   PhongMaterial arrowMat = new PhongMaterial();
   arrowMat.setSpecularColor(Color.WHITESMOKE);
   Color color = Color.WHITE;
   switch (face) {
     case "F":
     case "Fi":
       color = Color.BLUE.brighter();
       break;
     case "B":
     case "Bi":
       color = Color.BLUE.brighter();
       break;
     case "R":
     case "Ri":
       color = Color.RED.brighter();
       break;
     case "L":
     case "Li":
       color = Color.RED.brighter();
       break;
     case "U":
     case "Ui":
       color = Color.FORESTGREEN.brighter();
       break;
     case "D":
     case "Di":
       color = Color.FORESTGREEN.brighter();
       break;
     case "Z":
     case "Zi":
       color = Color.BLUE.brighter();
       break;
     case "X":
     case "Xi":
       color = Color.RED.brighter();
       break;
     case "Y":
     case "Yi":
       color = Color.FORESTGREEN.brighter();
       break;
   }
   arrowMat.setDiffuseColor(color);
   return arrowMat;
 }
Пример #2
0
  private static DInfo getSimpleMessage(int event, Sprite sprite) {
    DInfo dinfo = new DInfo(D_SPRITE);

    dinfo.set(K_METHOD, event);
    dinfo.set(USER_ID, mainController.getUserName());
    dinfo.set(K_SPRITE_NAME, sprite.getName());
    dinfo.set(K_X1, (int) sprite.getX());
    dinfo.set(K_Y1, (int) sprite.getY());
    dinfo.set(K_X2, (int) sprite.getTranslateX());
    dinfo.set(K_Y2, (int) sprite.getTranslateY());
    dinfo.set(K_ROTATE, (int) sprite.getRotate());
    dinfo.set(K_SPEECH, sprite.getSpeech());
    dinfo.set(K_COSTUME_CURRENT, sprite.getCostumeNumber());
    dinfo.set(K_COLOR, Color.RED.toString());

    return dinfo;
  }