Пример #1
0
  public void lightScene(Bounds bounds) {
    AmbientLight ambient = new AmbientLight(GameColors.LIGHT_COLOR);
    ambient.setInfluencingBounds(bounds);
    branchGroup.addChild(ambient);

    Vector3f lightDirection = new Vector3f(0.0f, -1.0f, 0.0f);
    DirectionalLight direct1 = new DirectionalLight(GameColors.LIGHT_COLOR, lightDirection);
    direct1.setInfluencingBounds(bounds);
    branchGroup.addChild(direct1);
  }
Пример #2
0
 public void createBackground(Bounds bounds) {
   Background background = new Background();
   background.setApplicationBounds(bounds);
   background.setColor(GameColors.BACKGROUND_COLOR);
   branchGroup.addChild(background);
 }
Пример #3
0
 public void createGameGrid(IPicker picker, IGameGridFactory gameGridFactory) {
   branchGroup.addChild(gameGridFactory.constructGameGrid(picker));
   branchGroup.addChild(gameGridFactory.constructHighlightedGrid());
 }