• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CameraGroupStrategy类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy的典型用法代码示例。如果您正苦于以下问题:Java CameraGroupStrategy类的具体用法?Java CameraGroupStrategy怎么用?Java CameraGroupStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CameraGroupStrategy类属于com.badlogic.gdx.graphics.g3d.decals包,在下文中一共展示了CameraGroupStrategy类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void show() {
    stage = new Stage(new StretchViewport(Width,Height));
    stage.addActor(tabContinue);
    PerspectiveCamera camera2 = new PerspectiveCamera(40, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    camera2.position.set(0, -Width * 0.075f, Width * 0.135f);
    camera2.lookAt(0, 0, 0);
    camera2.far = Width*0.3f;
    camera2.near = 1;
    camera2.update();
    controller = new CameraInputController(camera2);
    CameraGroupStrategy cameraGroupStrategy = new CameraGroupStrategy(camera2);
    batch = new DecalBatch(cameraGroupStrategy);
    modelBatch = new ModelBatch();
    InputMultiplexer in = new InputMultiplexer();
    in.addProcessor(stage);
    in.addProcessor(controller);
    Gdx.input.setInputProcessor(in);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:20,代码来源:ScreenBricks.java


示例2: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void show() {
    if(drawone){
        addBackgroundExtension();
        addPuls();
        addimagebg();
        addButtonBottom();
        drawone = false;
    }
    cameraGroupStrategy = new CameraGroupStrategy(camera);
    batch = new DecalBatch(cameraGroupStrategy);
    stage = new Stage(new StretchViewport(Gdx.graphics.getWidth(),Gdx.graphics.getHeight()));
    addtostage();
    Gdx.input.setCatchBackKey(true);
    inputmulti = new InputMultiplexer();
    inputmulti.addProcessor(stage);
    Gdx.input.setInputProcessor(inputmulti);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:19,代码来源:ScreenExtensions.java


示例3: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
    public void show() {
        if(drawone){
            addroomselect();
            addButtonBottom();
            addPuls();
            addimagebg();
            addbuildRoom();
            addtimerbuildroom();
            drawone = false;
        }
        cameraGroupStrategy = new CameraGroupStrategy(camera);
//        CameraInputController controller = new CameraInputController(camera);
        stage = new Stage(new StretchViewport(Gdx.graphics.getWidth(),Gdx.graphics.getHeight()));
        batchsprite = new SpriteBatch();
        addtostage();
        batch = new DecalBatch(this.cameraGroupStrategy);
        Gdx.input.setCatchBackKey(true);
        InputMultiplexer inputmulti = new InputMultiplexer();
        inputmulti.addProcessor(stage);
        Gdx.input.setInputProcessor(inputmulti);
    }
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:23,代码来源:ScreenRooms.java


示例4: State

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
public State(){
	entities = new Stack<Entity>();
	layeredEntityList = new ArrayList<LayeredEntity>();
	particles = new Stack<Particle>();
	text = new Stack<Text>();
	tiles = new Stack<Entity>();
	cam = new Camera(MyGdxGame.VIRTUAL_WIDTH, MyGdxGame.VIRTUAL_HEIGHT, 1);
	cam3d = new Camera3D(75, MyGdxGame.VIRTUAL_WIDTH, MyGdxGame.VIRTUAL_HEIGHT);
	sb = new SpriteBatch();
	CameraGroupStrategy cgs = new CameraGroupStrategy(cam3d, new LayeredEntity.YComparator());
	db = new DecalBatch(cgs);
	cursor = new Cursor(cam);
	ui = new UI(cursor);
	
	inputMultiplexer = new InputMultiplexer();
	inputMultiplexer.addProcessor(ui);
	Gdx.input.setInputProcessor(inputMultiplexer);
}
 
开发者ID:MisterYO1122,项目名称:utilsLibGDX,代码行数:19,代码来源:State.java


示例5: onInitialize

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
protected void onInitialize() {
  GLProfiler.enable();
  this.overlay              = new Overlay();

  this.level                = new Level(state, new DynamicGeometryProvider(state.terrainMap));
  this.selectionSystem      = new SelectionSystem(level);
  this.cameraController     = new RTSCameraController();
  this.decalBatch           = new DecalBatch(new CameraGroupStrategy(level.camera));
  level.camera.far          = LEVEL_EDITOR_FAR_CAMERA;
  level.camera.near         = 0.01f;
  level.camera.fieldOfView  = 70;
  cameraController.setCenter(level.terrainMap.getWidth() / 2, level.terrainMap.getDepth() / 2);
  cameraController.setCamera(level.camera);
  cameraController.setOverlay(overlay);

  selectionSystem.setOverlay(overlay);
  level.entities.addSystem(selectionSystem);
  level.entities.psychics.disable();

  this.fullScreenBuffer = new FullScreenFrameBufferResult(Fbo.FRAMEBUFFER_FINAL);
  //
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:24,代码来源:LevelEditorScreen.java


示例6: create

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void create () {
	Gdx.gl.glEnable(GL20.GL_DEPTH_TEST);
	Gdx.gl.glDepthFunc(GL20.GL_LESS);

	egg = new Texture(Gdx.files.internal("data/egg.png"));
	egg.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
	egg.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
	wheel = new Texture(Gdx.files.internal("data/wheel.png"));
	wheel.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
	wheel.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);

	w = Gdx.graphics.getWidth() / 0.8f;
	h = Gdx.graphics.getHeight() / 0.8f;
	for (int i = 0; i < INITIAL_RENDERED; i++) {
		toRender.add(makeDecal());
	}
	cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
	cam.near = 0.1f;
	cam.far = 10f;
	cam.position.set(0, 0, 0.1f);
	cam.direction.set(0, 0, -1f);
	batch = new DecalBatch(new CameraGroupStrategy(cam));

	Gdx.gl.glClearColor(1, 1, 0, 1);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:27,代码来源:DecalTest.java


示例7: initialize

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
protected void initialize() {
  displayableCollections = new Array<Array<? extends Displayable>>();

  modelDisplayables = new Array<ModelDisplayable>();
  displayableCollections.add(modelDisplayables);

  decalDisplayables = new Array<DecalDisplayable>();
  displayableCollections.add(decalDisplayables);

  renderContext = new RenderContext(
      new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED));
  renderContext.setCullFace(GL20.GL_BACK);

  modelBatch = new ModelBatch(renderContext,
                              new DefaultShaderProvider(),
                              new HelixRenderableSorter());

  decalBatch = new DecalBatch(new CameraGroupStrategy(camera));

  spriteBatch = new SpriteBatch();
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:23,代码来源:RenderingSystem.java


示例8: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void show() {
    if(!draw){
        draw = true;
        addBackground();
        addtoStage();
    }
    stage = new Stage(new StretchViewport(Width,Height));
    decalBatch = new DecalBatch(new CameraGroupStrategy(camera));
    stage.addActor(groupStage);
    modelBatch = new ModelBatch();
    Gdx.input.setInputProcessor(stage);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:14,代码来源:ScreenRaider.java


示例9: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void show() {
    if(drawone) {
        initializeMenuTab();
        drawProfile();
        addInformation();
        drawone = false;
    }
    addInfoUser();
    sp.setScrollPercentX(0);
    sp.updateVisualScroll();
    b1.setChecked(true);
    stage = new Stage(new StretchViewport(Gdx.graphics.getWidth(),Gdx.graphics.getHeight())){
        @Override
        public boolean keyDown(int keyCode) {
            if(keyCode == Input.Keys.BACK)
                gameManager.setScreen(gameManager.mapsScreen);
            return super.keyDown(keyCode);
        }
    };
    stage.addActor(backButton);
    stage.addActor(groupUser);
    stage.addActor(groupInformation);
    stage.addActor(ta);
    queueDisplay.AddtoStage(stage);
    batchDecal = new DecalBatch(new CameraGroupStrategy(camera));
    modelBatch = new ModelBatch();
    Gdx.input.setInputProcessor(stage);
    Gdx.input.setCatchBackKey(true);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:31,代码来源:ScreenProfile.java


示例10: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void show() {
    CameraGroupStrategy cameraGroupStrategy = new CameraGroupStrategy(camera);
    decalBatch = new DecalBatch(cameraGroupStrategy);
    stagefordialog = new Stage(new StretchViewport(Gdx.graphics.getWidth(),Gdx.graphics.getHeight()));
    stage = new Stage(new StretchViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight())) {
        @Override
        public boolean keyDown(int keyCode) {
            if (keyCode == Input.Keys.BACK) {
                if (InformationProfile.getInstance().getDateUserGame().getEnklaveCombatId() == -1)
                    gameManager.setScreen(gameManager.screenEnklave);
                else
                    dialogExit("You can't out from combat!");
            }
            return super.keyDown(keyCode);
        }
    };
    drawtopcombat();
    drawmap();
    drawdefenders();
    drawAttachers();
    addBtnStartCombat();
    combatFight = new CombatFitght(this, WIDTH * 0.6f);
    addcomponenttostage();
    progressBarEnergy.FadeIn();
    Gdx.input.setCatchBackKey(true);
    InputMultiplexer inputmulti = new InputMultiplexer();
    GestureDetector gd = new GestureDetector(this);
    inputmulti.addProcessor(stage);
    inputmulti.addProcessor(gd);
    inputmulti.addProcessor(this);
    Gdx.input.setInputProcessor(inputmulti);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:34,代码来源:ScreenCombat.java


示例11: MapsScreen

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
public MapsScreen(GameManager game) {
    gameManager = game;
    environment = new Environment();
    environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 1f, 1f, 1f, 1f));
    environment.add(new DirectionalLight().set(1f, 1f, 1f, -1f, -0.8f, -0.2f));
    camera = new PerspectiveCamera(40, Width, Height);
    camera.lookAt(0, 0, 0);
    camera.far = 4000;
    camera.near = 1;
    camera.update();
    pos = new Vector2[3][3];
    CameraGroupStrategy cameraGroupStategy = new CameraGroupStrategy(camera);
    batch = new DecalBatch(cameraGroupStategy);
    bounds = new Bounds();
    matrixPixmap = MapPixmap.getInstance();
    managerAssets = ManagerAssets.getInstance();
    myLocation = MyLocation.getInstance();
    pointerx = new int[4];
    pointery = new int[4];
    compass = myLocation.getCompas();
    queue = MyQueue.getInstance();
    //calc bounds
    bounds.getCorners(matrixPixmap.getMatrix()[1][1].getLatitude(),matrixPixmap.getMatrix()[1][1].getLongitude() , 17.0, 640.0, 640.0);
    unitlong = (bounds.calcDisance(bounds.latSW, bounds.longSW, bounds.latSW, bounds.longNE)+bounds.calcDisance(bounds.latNE,bounds.longNE,bounds.latNE,bounds.longSW))/2.0;
    unitlong=600/unitlong;
    unitlat = bounds.calcDisance(bounds.latSW, bounds.longSW, bounds.latNE, bounds.longSW);
    unitlat= 600/unitlat;
    timerEnergy = new Timer();
    informationProfile = InformationProfile.getInstance();
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:31,代码来源:MapsScreen.java


示例12: create

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
public void create () {
	float width = Gdx.graphics.getWidth();
	float height = Gdx.graphics.getHeight();

	camera = new PerspectiveCamera(45, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
	camera.near = 1;
	camera.far = 300;
	camera.position.set(0, 0, 5);
	controller = new PerspectiveCamController(camera);

	Gdx.input.setInputProcessor(controller);
	batch = new DecalBatch(new CameraGroupStrategy(camera));

	TextureRegion[] textures = {new TextureRegion(new Texture(Gdx.files.internal("data/egg.png"))),
		new TextureRegion(new Texture(Gdx.files.internal("data/wheel.png"))),
		new TextureRegion(new Texture(Gdx.files.internal("data/badlogic.jpg")))};

	Decal decal = Decal.newDecal(1, 1, textures[1]);
	decal.setPosition(0, 0, 0);
	decals.add(decal);

	decal = Decal.newDecal(1, 1, textures[0], true);
	decal.setPosition(0.5f, 0.5f, 1);
	decals.add(decal);

	decal = Decal.newDecal(1, 1, textures[0], true);
	decal.setPosition(1, 1, -1);
	decals.add(decal);

	decal = Decal.newDecal(1, 1, textures[2]);
	decal.setPosition(1.5f, 1.5f, -2);
	decals.add(decal);

	decal = Decal.newDecal(1, 1, textures[1]);
	decal.setPosition(2, 2, -1.5f);
	decals.add(decal);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:38,代码来源:SimpleDecalTest.java


示例13: initialize

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
public void initialize(AssetManager assetManager) {
    // User interface
    sb = GlobalResources.spriteBatch;
    ui = new Stage(new ScreenViewport(), sb);

    float factor = GlobalConf.SCALE_FACTOR;

    indicatorw = 300 * factor;
    indicatorh = 300 * factor;
    indicatorx = -20 * factor;
    indicatory = -25 * factor;

    // init gui camera
    aiCam = new PerspectiveCamera(30, indicatorw, indicatorh);
    aiCam.near = (float) (1e5 * Constants.KM_TO_U);
    aiCam.far = (float) (1e8 * Constants.KM_TO_U);
    aiCam.up.set(0, 1, 0);
    aiCam.direction.set(0, 0, 1);
    aiCam.position.set(0, 0, 0);

    // Init AI
    dlight = new DirectionalLight();
    dlight.color.set(1f, 1f, 1f, 1f);
    dlight.setDirection(-1f, .05f, .5f);
    env = new Environment();
    env.set(new ColorAttribute(ColorAttribute.AmbientLight, 1f, 1f, 1f, 1f), new ColorAttribute(ColorAttribute.Specular, .5f, .5f, .5f, 1f));
    env.add(dlight);
    db = new DecalBatch(new CameraGroupStrategy(aiCam));
    mb = new ModelBatch();

    assetManager.load("data/tex/attitudeindicator.png", Texture.class);
    assetManager.load("img/ai-pointer.png", Texture.class);
    assetManager.load("img/ai-vel.png", Texture.class);
    assetManager.load("img/ai-antivel.png", Texture.class);

    EventManager.instance.subscribe(this, Events.SPACECRAFT_LOADED);
}
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:38,代码来源:SpacecraftGui.java


示例14: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
public void show() {
    enklave3D = new Enklave3D(new Vector2(),InformationEnklave.getInstance().getFaction());
    enklave3D.FrontEnklave(InformationEnklave.getInstance().getFaction());
    this.enklave3D.setCoordraw(coordonatedraw);
    camera = new PerspectiveCamera(35, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    camera.position.set(0, -222, 350);//initial 180
    camera.lookAt(0, 50, 0);
    camera.far = 2500;
    camera.near = 1;
    camera.update();
    this.cameraGroupStrategy = new CameraGroupStrategy(camera);
    CameraInputController controller = new CameraInputController(camera);
    batch = new DecalBatch(this.cameraGroupStrategy);
    stage = new Stage(new StretchViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight())){
        @Override
        public boolean keyDown(int keyCode) {
            if(keyCode == Input.Keys.BACK){
                if (buttonCombat.getText().toString().contentEquals("ROOMS ")) {
                    buttonCombat.setText("COMBAT ");
                    buttonDeveloper.setText("    DEVELOPER");
                    deployBricks.setVisible(false);
                    informationEnklave.setVisible(true);
                    disaibleButton.setVisible(true);
                    if(disaibleButton1 !=null)
                        disaibleButton1.setVisible(true);
                } else {
                    manager.getAssertEnklaveScreen().setIsupdate(false);
                    gameManager.setScreen(gameManager.mapsScreen);
                }
            }
            return super.keyDown(keyCode);
        }
    };
    if(drawone){
        adddrawenklave();
        addToolInformation();
        addDeployBrick();
        addButtonsBottom();
        addMap();
        if (InformationProfile.getInstance().getDateUserGame().isInCombat()) {
            manager.loadAssetsCombat();
            new SubscribeCombat().makeRequest(InformationEnklave.getInstance().getId());
            gameManager.setScreen(new ScreenCircleLoading(gameManager, gameManager.screenCombat, manager.getAssetsCombat()));
        }
        drawone =false;
    }
    updatelabel();
    rangeEnklave = new RangeEnklave((float)location.getLatitude(),(float)location.getLongitude(),infoEnklave.getLatitude(),infoEnklave.getLongitude(),this,range);
    if (infoEnklave.getId() !=16066)rangeEnklave.start();
    else setvisibility(false);
    manager.getAssertEnklaveScreen().setIsupdate(false);
    labelName.setText(InformationEnklave.getInstance().getName());
    backButton.setChecked(false);
    progressBarEnergy.addGrouptoStage(stage);
    stage.addActor(backButton);
    addinfo(stage);
    int level = infoEnklave.getBricks()/9;
    if(QueueBuildCraft.getInstance().deployOn) {
        labelLevel.setText("LVL " + level + " (Bricks:" + (infoEnklave.getBricks()-1) + ")");
    }else{
        labelLevel.setText("LVL " + level + " (Bricks:" + infoEnklave.getBricks() + ")");
    }
    mmodelBatch = new ModelBatch();
    progressBarEnergy.FadeIn();
    controller.camera.lookAt(enklave3D.getDecalbrick(0).getCenterX(), enklave3D.getDecalbrick(0).getCenterY(), enklave3D.getDecalbrick(0).getCenterZ());
    Gdx.input.setCatchBackKey(true);
    InputMultiplexer inputmulti = new InputMultiplexer();
    inputmulti.addProcessor(stage);
    Gdx.input.setInputProcessor(inputmulti);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:72,代码来源:ScreenEnklave.java


示例15: show

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
@Override
    public void show() {
        if (drawone) {
            initializeMenuTab();
            drawselector();
            addModele3D();
            drawBackground();
            addbackObject();
            createexitdialog();
            addDescriptorModel();
            drawone = false;
        }
        stage = new Stage(new StretchViewport(Gdx.graphics.getWidth(),Gdx.graphics.getHeight()))
        {
            @Override
            public boolean keyDown(int keyCode) {
                if(keyCode == Input.Keys.BACK){
                    gameManager.setScreen(gameManager.mapsScreen);
                }
                return super.keyDown(keyCode);
            }
        };
        stage.addActor(backButton);
        stage.addActor(labelBusy);
        stage.addActor(arrowCraft);
        stage.addActor(buttoncraft);
        stage.addActor(labelDesc);
        stage.addActor(labelValue);
        stage.addActor(tab);
        stage.addActor(ta);
//        screenChat.addToStage(stage);
        queueDisplay.AddtoStage(stage);
        updateDisplay();
        progressbar.addGrouptoStage(stage);
//        progressbar.update();
        b2.setChecked(true);
        backButton.setChecked(false);
        sp.setScrollPercentX(0);
        sp.updateVisualScroll();
        decalBatch = new DecalBatch(new CameraGroupStrategy(camera));
        modelBatch = new ModelBatch();
        GestureDetector gd = new GestureDetector(this);
        InputMultiplexer input = new InputMultiplexer();
        input.addProcessor(gd);
        input.addProcessor(stage);
        Gdx.input.setInputProcessor(input);
        Gdx.input.setCatchBackKey(true);
    }
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:49,代码来源:ScreenCrafting.java


示例16: DecalManager

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
public DecalManager(Camera camera) {
    this(new DecalBatch(new CameraGroupStrategy(camera)));
    this.camera = camera;
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:5,代码来源:DecalManager.java


示例17: GameLevelScreen

import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy; //导入依赖的package包/类
public GameLevelScreen(LevelFile levelDef) {
  this.gameObjectsTweenManager = new TweenManager();
  this.uiTweenManager          = new TweenManager();
  this.renderContext      = new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
  this.entities           = new ArrayList<Entity>();
  this.perspectiveCamera  = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());

  levelDefinition         = levelDef;

  this.map                = new Map(levelDefinition.geometryFile());
  perspectiveCamera.position.set(0, 0, 0);
  perspectiveCamera.near = 0.1f;
  perspectiveCamera.far = 50f;
  perspectiveCamera.update(true);

  this.cameraController = new RTSCameraController();
  cameraController.setCamera(perspectiveCamera);
  cameraController.setCenter(0, 0);
  cameraController.setEnabled(true);

  environment = new Environment();
  environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.3f, 0.3f, 0.3f, 1f));

  this.cellShadingCompositor = new LevelCompositor(renderContext);

  this.robot = BotLogic.entities.robot();
  this.robot.led = BotLogic.entities.led();

  addEntity(this.robot);
  addEntity(this.robot.led);

  colorModelBatch = new ModelBatch(renderContext);
  decalBatch      = new DecalBatch();

  decalBatch.setGroupStrategy(new CameraGroupStrategy(perspectiveCamera));

  DepthShader.Config depthConfig     = new DepthShader.Config(Gdx.files.internal("shaders/depth.vertex").readString(), Gdx.files.internal("shaders/depth.frag").readString());
  depthConfig.defaultCullFace        = GL20.GL_BACK;
  depthConfig.depthBufferOnly        = false;
  depthModelBatch = new ModelBatch(renderContext, new DepthShaderProvider(depthConfig));

  map.environment = environment;
  this.controller = new GameController(this);
  reset();

  environment.set(new ColorAttribute(ColorAttribute.Fog, 0f, 0f, 0f, 1f));
  environment.add(new DirectionalLight().set(new Color(.4f,.4f, .4f, 0.1f), new Vector3(1,-1,0)));
  BotLogic.audio.mainMenuMusic.play();
}
 
开发者ID:macbury,项目名称:BotLogic,代码行数:50,代码来源:GameLevelScreen.java



注:本文中的com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java InOutAxisOperation类代码示例发布时间:2022-05-23
下一篇:
Java IPeripheral类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap