当前位置: 首页>>代码示例>>Java>>正文


Java Picture.move方法代码示例

本文整理汇总了Java中com.jme3.ui.Picture.move方法的典型用法代码示例。如果您正苦于以下问题:Java Picture.move方法的具体用法?Java Picture.move怎么用?Java Picture.move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jme3.ui.Picture的用法示例。


在下文中一共展示了Picture.move方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: simpleInitApp

import com.jme3.ui.Picture; //导入方法依赖的package包/类
public void simpleInitApp() {
    Picture p = new Picture("Picture1");
    p.move(0,0,-1);
    p.setPosition(100, 100);
    p.setWidth(100);
    p.setHeight(100);
    p.setImage(assetManager, "Interface/Logo/Monkey.png", false);
    guiNode.attachChild(p);

    Picture p2 = new Picture("Picture2");
    p2.move(0,0,1.001f);
    p2.setPosition(150, 150);
    p2.setWidth(100);
    p2.setHeight(100);
    p2.setImage(assetManager, "Interface/Logo/Monkey.png", false);
    guiNode.attachChild(p2);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:18,代码来源:TestZOrder.java

示例2: initGuiElements

import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void initGuiElements()
{
    spiderInfo = new Picture("spiderInfo");
    spiderInfo.setImage(simpleApp.getAssetManager(), "Interface/spiderInfo.png", true);
    spiderInfo.setWidth(796);
    spiderInfo.setHeight(94);
    spiderInfo.move(270, 50, -1);
    
    ghostInfo = new Picture("ghostInfo");
    ghostInfo.setImage(simpleApp.getAssetManager(), "Interface/ghostInfo.png", true);
    ghostInfo.setWidth(796);
    ghostInfo.setHeight(94);
    ghostInfo.move(270, 50, -1);
    
    inventoryBackground = new Picture("inventoryBackground");
    inventoryBackground.setImage(simpleApp.getAssetManager(), "Interface/inventoryBackground.png", true);
    inventoryBackground.setWidth(798);
    inventoryBackground.setHeight(500);
    inventoryBackground.move(270, 50, -1);
    
    exit = new Picture("exit");
    exit.setImage(simpleApp.getAssetManager(), "Interface/exitMenu.png", true);
    exit.setWidth(1000);
    exit.setHeight(499);
    exit.move(160, 500, -1);
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:27,代码来源:InterfaceAppState.java

示例3: addInventoryOptions

import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void addInventoryOptions() 
{
    for (int i = 0; i < optionNames.length; i++) 
    {
        Picture option = new Picture(optionNames[i]);
        option.setImage(simpleApp.getAssetManager(), 
                        "Interface/" + optionNames[i] + ".png", 
                        true);
        option.setWidth(78);
        option.setHeight(247);
        option.move(370 + 250*i, 175, 0);
        simpleApp.getGuiNode().attachChild(option);
    }
    
    /* Highlight first option */
    highlightInventoryOption("laserTower");
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:18,代码来源:InterfaceAppState.java

示例4: showBudget

import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void showBudget() 
{
    Picture budgetIcon = new Picture("budgetIcon");
    budgetIcon.setImage(simpleApp.getAssetManager(), "Interface/budget.png", true);
    budgetIcon.setWidth(64);
    budgetIcon.setHeight(64);
    budgetIcon.move(15, 40, 0);
    simpleApp.getGuiNode().attachChild(budgetIcon);
    
    BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
    BitmapText budgetText = new BitmapText(myFont);
    budgetText.setName("budgetText");
    budgetText.setSize(myFont.getCharSet().getRenderedSize());
    budgetText.setText(Integer.toString(currentGameState.getBudget()));
    budgetText.move(92, 86, 0);
    simpleApp.getGuiNode().attachChild(budgetText);
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:18,代码来源:InterfaceAppState.java

示例5: simpleInitApp

import com.jme3.ui.Picture; //导入方法依赖的package包/类
public void simpleInitApp() {
    Picture p = new Picture("Picture");
    p.move(0, 0, -1); // make it appear behind stats view
    p.setPosition(0, 0);
    p.setWidth(settings.getWidth());
    p.setHeight(settings.getHeight());
    p.setImage(assetManager, "Interface/Logo/Monkey.png", false);

    // attach geometry to orthoNode
    guiNode.attachChild(p);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:TestOrtho.java

示例6: setLaserTowerText

import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void setLaserTowerText(boolean canSetText) 
{
    if (canSetText) 
    {
        BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
        BitmapText laserTowerText = new BitmapText(myFont);
        laserTowerText.setName("laserTowerText");
        laserTowerText.setSize(myFont.getCharSet().getRenderedSize());
        laserTowerText.setText("Laser              10");
        laserTowerText.move(350, 160, 0);
        simpleApp.getGuiNode().attachChild(laserTowerText);
        
        Picture budgetSmallIcon = new Picture("budgetSmallIcon1");
        budgetSmallIcon.setImage(simpleApp.getAssetManager(), "Interface/budgetSmall.png", true);
        budgetSmallIcon.setWidth(50);
        budgetSmallIcon.setHeight(50);
        budgetSmallIcon.move(410, 120, 0);
        simpleApp.getGuiNode().attachChild(budgetSmallIcon);
        return;
    }

    Spatial text = simpleApp.getGuiNode().getChild("laserTowerText");
    if (text != null)
        text.removeFromParent();
    
    Spatial textIcon = simpleApp.getGuiNode().getChild("budgetSmallIcon1");
    if (textIcon != null)
        textIcon.removeFromParent();
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:30,代码来源:InterfaceAppState.java

示例7: setLightTowerText

import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void setLightTowerText(boolean canSetText) 
{
    if (canSetText) 
    {
        BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
        BitmapText lightTowerText = new BitmapText(myFont);
        lightTowerText.setName("lightTowerText");
        lightTowerText.setSize(myFont.getCharSet().getRenderedSize());
        lightTowerText.setText("Light              15");
        lightTowerText.move(600, 160, 0);
        simpleApp.getGuiNode().attachChild(lightTowerText);
        
        Picture budgetSmallIcon = new Picture("budgetSmallIcon2");
        budgetSmallIcon.setImage(simpleApp.getAssetManager(), "Interface/budgetSmall.png", true);
        budgetSmallIcon.setWidth(50);
        budgetSmallIcon.setHeight(50);
        budgetSmallIcon.move(660, 120, 0);
        simpleApp.getGuiNode().attachChild(budgetSmallIcon);
        return;
    }

    Spatial text = simpleApp.getGuiNode().getChild("lightTowerText");
    if (text != null)
        text.removeFromParent();
    
    Spatial textIcon = simpleApp.getGuiNode().getChild("budgetSmallIcon2");
    if (textIcon != null)
        textIcon.removeFromParent();
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:30,代码来源:InterfaceAppState.java

示例8: setUnknownTowerText

import com.jme3.ui.Picture; //导入方法依赖的package包/类
private void setUnknownTowerText(boolean canSetText) 
{
    if (canSetText) 
    {
        BitmapFont myFont = simpleApp.getAssetManager().loadFont("Interface/Fonts/PoorRichardBig.fnt");
        BitmapText unknownTowerText = new BitmapText(myFont);
        unknownTowerText.setName("unknownTowerText");
        unknownTowerText.setSize(myFont.getCharSet().getRenderedSize());
        unknownTowerText.setText("?????              30");
        unknownTowerText.move(850, 160, 0);
        simpleApp.getGuiNode().attachChild(unknownTowerText);
        
        Picture budgetSmallIcon = new Picture("budgetSmallIcon3");
        budgetSmallIcon.setImage(simpleApp.getAssetManager(), "Interface/budgetSmall.png", true);
        budgetSmallIcon.setWidth(50);
        budgetSmallIcon.setHeight(50);
        budgetSmallIcon.move(910, 120, 0);
        simpleApp.getGuiNode().attachChild(budgetSmallIcon);
        return;
    }

    Spatial text = simpleApp.getGuiNode().getChild("unknownTowerText");
    if (text != null)
        text.removeFromParent();
    
    Spatial textIcon = simpleApp.getGuiNode().getChild("budgetSmallIcon3");
    if (textIcon != null)
        textIcon.removeFromParent();
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:30,代码来源:InterfaceAppState.java

示例9: simpleInitApp

import com.jme3.ui.Picture; //导入方法依赖的package包/类
@Override
    public void simpleInitApp() {
        viewPort.addProcessor(this);
        renderManager.setForcedTechnique("GBuf");

//        flyCam.setEnabled(false);
        cam.setLocation(new Vector3f(4.8037705f, 4.851632f, 10.789033f));
        cam.setRotation(new Quaternion(-0.05143692f, 0.9483723f, -0.21131563f, -0.230846f));

        Node tank = (Node) assetManager.loadModel("Models/HoverTank/Tank2.mesh.xml");
        
        //tankMesh.getMaterial().setColor("Specular", ColorRGBA.Black);
        rootNode.attachChild(tank);

        display1 = new Picture("Picture");
        display1.move(0, 0, -1); // make it appear behind stats view
        display2 = (Picture) display1.clone();
        display3 = (Picture) display1.clone();
        display4 = (Picture) display1.clone();
        display  = (Picture) display1.clone();

        ColorRGBA[] colors = new ColorRGBA[]{
            ColorRGBA.White,
            ColorRGBA.Blue,
            ColorRGBA.Cyan,
            ColorRGBA.DarkGray,
            ColorRGBA.Green,
            ColorRGBA.Magenta,
            ColorRGBA.Orange,
            ColorRGBA.Pink,
            ColorRGBA.Red,
            ColorRGBA.Yellow
        };

        for (int i = 0; i < 3; i++){
            PointLight pl = new PointLight();
            float angle = 0.314159265f * i;
            pl.setPosition( new Vector3f(FastMath.cos(angle)*2f, 0,
                                         FastMath.sin(angle)*2f));
            pl.setColor(colors[i]);
            pl.setRadius(5);
            rootNode.addLight(pl);
            display.addLight(pl);
        }
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:46,代码来源:TestMultiRenderTarget.java

示例10: simpleInitApp

import com.jme3.ui.Picture; //导入方法依赖的package包/类
@Override
    public void simpleInitApp() {
        viewPort.addProcessor(this);

//        flyCam.setEnabled(false);
        cam.setLocation(new Vector3f(4.8037705f, 4.851632f, 10.789033f));
        cam.setRotation(new Quaternion(-0.05143692f, 0.9483723f, -0.21131563f, -0.230846f));

        Node tank = (Node) assetManager.loadModel("Models/HoverTank/Tank2.mesh.xml");
        
        //tankMesh.getMaterial().setColor("Specular", ColorRGBA.Black);
        rootNode.attachChild(tank);

        display1 = new Picture("Picture");
        display1.move(0, 0, -1); // make it appear behind stats view
        display2 = (Picture) display1.clone();
        display3 = (Picture) display1.clone();
        display4 = (Picture) display1.clone();
        display  = (Picture) display1.clone();

        ColorRGBA[] colors = new ColorRGBA[]{
            ColorRGBA.White,
            ColorRGBA.Blue,
            ColorRGBA.Cyan,
            ColorRGBA.DarkGray,
            ColorRGBA.Green,
            ColorRGBA.Magenta,
            ColorRGBA.Orange,
            ColorRGBA.Pink,
            ColorRGBA.Red,
            ColorRGBA.Yellow
        };

        pls = new PointLight[3];
        for (int i = 0; i < pls.length; i++){
            PointLight pl = new PointLight();
            pl.setColor(colors[i % colors.length]);
            pl.setRadius(5);
            display.addLight(pl);
            pls[i] = pl;
        }
    }
 
开发者ID:shamanDevel,项目名称:ProceduralTerrain,代码行数:43,代码来源:TestMultiRenderTarget.java


注:本文中的com.jme3.ui.Picture.move方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。