Examples of Sprite


Examples of com.sencha.gxt.chart.client.draw.sprite.Sprite

    if (index == 0) {
      if (surfaceElement.getChildIndex(element) != 2) {
        surfaceElement.insertChild(element, 2);
      }
    } else {
      Sprite previousSprite = sprites.get(index - 1);
      XElement previousSpriteElement = getElement(previousSprite);
      if (previousSpriteElement == null) {
        previousSprite.redraw();
        previousSpriteElement = getElement(previousSprite);
      }
      if (previousElement != previousSpriteElement) {
        surfaceElement.insertAfter(element, previousSpriteElement);
      }
View Full Code Here

Examples of com.thecherno.cherno.engine.graphics.Sprite

    test.addTileCode(0xff00ff, new RockTile(rock));
    test.add(player);
  }

  protected void init() {
    grass = new Sprite(Texture.load("res/grass.png"));
    rock = new Sprite(Texture.load("res/rock.png"));
    player = new Player();
    levels();
    createDisplay("Cherno 0.1a", 960, 540, 2.0);
    setInput(KEYBOARD | MOUSE);
    start();
View Full Code Here

Examples of com.threerings.media.sprite.Sprite

        // can't do anything if we don't know where the mouse pointer is
        if (_mouseEvent == null) {
            return;
        }

        Sprite newHighestHit = _spritemgr.getHighestHitSprite(
            _mouseEvent.getX(), _mouseEvent.getY());

        CardSprite newActiveCardSprite =
            (newHighestHit instanceof CardSprite ? (CardSprite)newHighestHit : null);
View Full Code Here

Examples of de.christopherstock.shooter.g3d.wall.Sprite

                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSlideLeft,
                        DoorStyle.EAnchorDefault, 6,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        new Wall[]
                        {
                            new Sprite( Others.ESprite1, new LibVertex( 5.5f, 0.75f, 0.0f ), Scalation.EAddThird,   WallCollidable.EYes, WallTex.EPlant1 ),
                            new Wall(   Others.ESodaMachine1,   new LibVertex( 7.5f, 0.5f0.0f ), 270.0f, Scalation.ENone,   Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.ESodaMachine2,   null, 0,         WallHealth.EVendingMachine, FXSize.ELarge, SoundFg.EExplosion1 ),

                            new Sprite( Others.ESprite1, new LibVertex( 8.0f, 3.0f0.0f ), Scalation.EAddHalf,   WallCollidable.EYes, WallTex.EPlant2 ),
                            new Sprite( Others.ESprite1, new LibVertex( 8.0f, 7.5f0.0f ), Scalation.EAddHalf,   WallCollidable.EYes, WallTex.EPlant1 ),
                            new Sprite( Others.ESprite1, new LibVertex( 8.0f, 12.5f, 0.0f ), Scalation.EAddHalf,   WallCollidable.EYes, WallTex.EPlant2 ),
                            new Wall(   Others.ESofa1,          new LibVertex( 8.5f, 10.0f, 0.0f ), 0.0f,   Scalation.ENone,   Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EClothDarkRed, new LibTexture[] { WallTex.ETest, }, 0, WallHealth.EFurniture,      FXSize.ELarge, null                     ),
                            new Wall(   Others.ESofa1,          new LibVertex( 8.5f, 5.0f0.0f ), 0.0f,   Scalation.ENone,   Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EClothDarkRed, new LibTexture[] { WallTex.ETest, }, 0, WallHealth.EFurniture,      FXSize.ELarge, null                     ),
                        },
                        null,
                        null,
                        null,
                        null
                    ),

                    //big office
                    ShooterWallCollection.createRoom
                    (
                        iOffsetX - 8.0f,   iOffsetY - 6.0f,   iOffsetZ + 2.5f,   0.0f,   8, 14,
                        WallStyle.EWindows, WallStyle.EWindowsAndCeilingWindows, WallStyle.EWindows, WallStyle.ENoWall,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSlideRight,
                        DoorStyle.ENoDoor, 0,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        new Wall[]
                        {
                        },
                        null,
                        null,
                        null,
                        null
                    ),

                    //right hallway
                    ShooterWallCollection.createRoom
                    (
                        iOffsetX + 0.0f,   iOffsetY - 12.0f,   iOffsetZ + 2.5f,   0.0f,   46,
                        WallStyle.EWindowsAndCeilingWindows, WallStyle.ESolidWall, WallStyle.ENoWall, WallStyle.ENoWall,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSwingCounterClockwise,
                        DoorStyle.ENoDoor, 0,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        null,
                        null,
                        null,
                        null,
                        null
                    ),

                    //small office
                    ShooterWallCollection.createRoom
                    (

                        iOffsetX + 4.0f,   iOffsetY + 10.0f,   iOffsetZ + 2.0f,   0.0f,   55,

                        WallStyle.ESolidWall, WallStyle.ESolidWall, WallStyle.ESolidWall, WallStyle.EWindowsAndCeilingWindows,
                        WallTex.EWood1, WallHealth.EUnbreakale, WallAction.EDoorSwingClockwise,
                        DoorStyle.EAnchorDefault, 2,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        new Wall[]
                        {
                            new Sprite( Others.ESprite1, new LibVertex( 1.0f, 1.0f, 0.0f ), Scalation.EAddQuarter, WallCollidable.EYes, WallTex.EPlant2 ),
                            new Wall(   Others.EPoster1,        new LibVertex3.0f,   0.01f, 0.7f   ), 270.0f,  Scalation.EAddHalf,     Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EPoster1,      null,                                   0, WallHealth.ESolidWood, FXSize.ESmall, null   ),
                            new Wall(   Others.EChairOffice1,   new LibVertex4.0f,   1.0f0.0f   ), 290.0f,  Scalation.ENone,        Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.ELeather1,     new LibTexture[] { WallTex.EChrome2, }, 0, WallHealth.ESolidWood, FXSize.ESmall, null   ),
                            new Article( Others.EWhiteboard1,  3.0f,   4.8f0.9f, 90.0f, Scalation.EAddThird, Invert.ENo, WallTex.EWhiteboard1, WallHealth.ESolidWood, FXSize.ESmall, null ),
                        },
                        null,
                        null,
                        null,
                        null
                    ),

                    //office desk ( must be a separate wallCollection! .. cannot be applied to small office?
                    new WallCollection
                    (
                        new Wall(       Others.EDeskOffice1,    new LibVertexiOffsetX + 7.5f,   iOffsetY + 10.0f,  iOffsetZ + 2.5f    ), 0.0f,   Scalation.ENone,        Invert.ENo, WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EWood1, new LibTexture[] { WallTex.EScreen2, }, 0, WallHealth.ESolidWood, FXSize.ESmall, null   ),
                        new Wall[]
                        {
                            new Wall(   Others.EKeyboard1,      new LibVertex-0.25f0.0f,   0.8f    ), 180.0f,    Scalation.ENone,        Invert.EYes, WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EWood1, new LibTexture[] { WallTex.EScreen2, }, 0, WallHealth.EElectricalDevice, FXSize.ESmall, null   ),
                            new Wall(   Others.EScreen1,        new LibVertex-0.75f0.0f0.8f    ), 180.0f,    Scalation.ENone,        Invert.EYes, WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EWood1,  new LibTexture[] { WallTex.EScreen2, }, 0, WallHealth.EElectricalDevice, FXSize.ESmall, null   ),
                        }
                    ),

                    //left hallway
                    ShooterWallCollection.createRoom
                    (
                        iOffsetX + 0.0f,   iOffsetY + 8.0f,   iOffsetZ + 2.5f,   0.0f,   45,
                        WallStyle.ENoWall, WallStyle.ESolidWall, WallStyle.ENoWall, WallStyle.ENoWall,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSwingCounterClockwise,
                        DoorStyle.ENoDoor, 0,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        null,
                        null,
                        null,
                        null,
                        null
                    ),
/*
                    //left hallway around corner
                    ShooterWallCollection.createRoom
                    (
                        x + 4.0f,   y + 13.0f,   z + 2.5f,   0.0f,   12,  4,
                        WallStyle.ESolidWall, WallStyle.ENoWall, WallStyle.EWindowsAndCeilingWindows, WallStyle.ENoWall,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSwingCounterClockwise,
                        DoorStyle.ENoDoor, 0,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        null
                    ),
*/
/*
                    //next level's hallway
                    ShooterWallCollection.createRoom
                    (
                        x + 16.0f,   y + 13.0f,   z + 2.5f,   0.0f,   4,  4,
                        WallStyle.ENoWall, WallStyle.ENoWall, WallStyle.EWindowsAndCeilingWindows, WallStyle.ESolidWall,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSwingCounterClockwise,
                        DoorStyle.ENoDoor, 0,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        null
                    ),
*/
/*
                    //next level's hallway
                    ShooterWallCollection.createRoom
                    (
                        x + 16.0f,   y + 9.0f,   z + 2.5f,   0.0f,   4,  4,
                        WallStyle.ENoWall, WallStyle.ENoWall, WallStyle.ENoWall, WallStyle.ESolidWall,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSwingCounterClockwise,
                        DoorStyle.ENoDoor, 0,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        null
                    ),
*/
/*
                    //storage room
                    ShooterWallCollection.createRoom
                    (
                        x + 4.0f,   y - 10.0f,   z + 2.5f,   0.0f,   5,  8,
                        WallStyle.ESolidWall, WallStyle.ESolidWall, WallStyle.ESolidWall, WallStyle.EWindowsAndCeilingWindows,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSwingClockwise,
                        DoorStyle.EAnchorDefault, 4,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        new Wall[]
                        {
                        }
                    ),

                    //shelves
                    ShooterWallCollection.createShelves( x + 8.0f,   y - 12.5f,  z + 2.5f, 70.0f  ),
                    ShooterWallCollection.createShelves( x + 8.0f,   y - 10.0f, z + 2.5f, 90.0f  ),
                    ShooterWallCollection.createShelves( x + 8.0f,   y - 7.5f,   z + 2.5f, 110.0f ),
*/
/*
                    //staircase
                    ShooterWallCollection.createStaircase(      x + -34.0f,  y + -1.0f, z + 0.0f, true, false, 90.0f   ),
*/
                },

                //EPlayersOffices2
                new WallCollection[]
                {
/*
                    //ground
                    ShooterWallCollection.createGround( WallTex.EGrass1, -0.01f ),
*/
                    //normal office
                    ShooterWallCollection.createRoom
                    (
                        iOffsetX + 6.0f,   iOffsetY + 2.0f,   iOffsetZ + 0.0f,   90.0f,   55,
                        WallStyle.ESolidWall, WallStyle.ESolidWall, WallStyle.ESolidWall, WallStyle.EWindowsAndCeilingWindows,
                        WallTex.EGlass1, WallHealth.ESolidGlass, WallAction.EDoorSlideRight,
                        DoorStyle.EAnchorDefault, 2,
                        WallTex.EBricks2, WallTex.ECarpet1, WallTex.ECeiling1,
                        new Wall[]
                        {
                            new Sprite( Others.ESprite1,        new LibVertex1.0f,   1.0f0.0f   ),          Scalation.EAddQuarter, WallCollidable.EYes, WallTex.EPlant2 ),
                            new Wall(   Others.EPoster1,        new LibVertex3.0f,   0.01f, 0.7f   ), 270.0f,  Scalation.EAddHalf,     Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EPoster1,      null, 0,             WallHealth.ESolidWood, FXSize.ESmall, null   ),
                            new Wall(   Others.EChairOffice1,   new LibVertex4.0f,   1.0f0.0f   ), 290.0f,  Scalation.ENone,        Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.ELeather1,     new LibTexture[] { WallTex.EChrome2, }, 0, WallHealth.ESolidWood, FXSize.ESmall, null   ),
                            new Wall(   Others.EWhiteboard1,    new LibVertex3.0f,   4.8f0.9f   ), 90.0f,   Scalation.EAddThird,    Invert.ENo,  WallCollidable.EYes, WallAction.ENone,   WallClimbable.ENo, DrawMethod.EAlwaysDraw, WallTex.EWhiteboard1,  null, 0,             WallHealth.ESolidWood, FXSize.ESmall, null   ),
                        },
                        null,
View Full Code Here

Examples of dwlab.shapes.sprites.Sprite

 
  @Override
  public void init() {
    ball.visualizer = new Visualizer( "3F3F7F", 1d, true );
    cursor = new Sprite( 0d, 0d, 1d );
    cursor.visualizer = new Visualizer( "7FFF3F", 1d, true );
  }
View Full Code Here

Examples of fm.ak.otse.twod.Sprite

        }

        // draw timage and tdecal
        for ( int i = 0; i < 2; i++ ) {
            sheet.getTexture().bind();
            Sprite sprite = null;
           
            int rot = 0;
           
            float tr[][] {{-1,-1}, {1,0}, {1,-1}, {0,-1}};
            float ar[] =    {-1,      90,    180,     270};
           
            if ( i == 0 ) { // image
                sprite = timage;
                rot = timagerot;
            }
            else if ( i == 1 ) { // decal
                sprite = tdecal;
                rot = tdecalrot;
            }
           
            if ( sprite == null )
                break;
           
            if ( rot > 0 ) {
                glPushMatrix();
                glTranslatef(tr[rot][0] * 40, -tr[rot][1] * 40, 0);   
                glRotatef(ar[rot], 0, 0, 1);
            }
           
            float TW = Tile.sheet.getTexture().getTextureWidth();
            float TH = Tile.sheet.getTexture().getTextureHeight();
           
            float tx = (float) sprite.x() / TW;
            float ty = (float) sprite.y() / TH;
            float tw = ((float) 40 / TW) + tx;
            float th = ((float) 40 / TH) + ty;
           
            glBegin(GL_QUADS);
           
View Full Code Here

Examples of fm.ak.otse.twod.Sprite

*/
public class Static {

    static void fillSprites() {
        // datagrams
        Main.main.main.sheet1.sprite("puzzle", new Sprite(24, 476, 12, 12));
        Main.main.sheet1.sprite("puzzleshadow", new Sprite(24, 488, 21, 15));
        Main.main.sheet1.sprite("region", new Sprite(36, 476, 12, 12));
        Main.main.sheet1.sprite("entity", new Sprite(24, 476, 12, 12));
       
        // ble
        Main.main.sheet1.sprite("player", new Sprite(0, 476, 12, 12));
        Main.main.sheet1.sprite("marker", new Sprite(48, 476, 40, 40));
        Main.main.sheet1.sprite("exit", new Sprite(88, 476, 40, 40));
       
        // blu
        Main.main.sheet1.sprite("sel", new Sprite(12, 476, 6, 6));
        Main.main.sheet1.sprite("uns", new Sprite(18, 476, 6, 6));
       
        // large
        Main.main.sheet1.sprite("lgrass", new Sprite(0, 316, 160, 160));
       
        // road
        Main.main.sheet1.sprite("rturn1", new Sprite(0, 235, 40, 40));
        Main.main.sheet1.sprite("rdoor1", new Sprite(123, 235, 40, 40));
        Main.main.sheet1.sprite("rplain1", new Sprite(82, 235, 40, 40));
        Main.main.sheet1.sprite("rside1", new Sprite(41, 235, 40, 40));
        Main.main.sheet1.sprite("rcorner1", new Sprite(164, 235, 40, 40));
       
        // bad road
        Main.main.sheet1.sprite("rbadcorner1", new Sprite(410, 235, 40, 40));
        Main.main.sheet1.sprite("rbaddoor1", new Sprite(369, 235, 40, 40));
        Main.main.sheet1.sprite("rbadside1", new Sprite(328, 235, 40, 40));
        Main.main.sheet1.sprite("rbadside2", new Sprite(287, 235, 40, 40));
        Main.main.sheet1.sprite("rbadturn1", new Sprite(246, 235, 40, 40));
        Main.main.sheet1.sprite("rbadturn2", new Sprite(205, 235, 40, 40));
       
       
        // building
        Main.main.sheet1.sprite("bplain1", new Sprite(451, 235, 40, 40));
       
        // decals
        Main.main.sheet1.sprite("dblast1", new Sprite(369, 276, 40, 40));
        Main.main.sheet1.sprite("dzebra1", new Sprite(410, 276, 40, 40));
        Main.main.sheet1.sprite("dzebra2", new Sprite(451, 276, 40, 40));
    }
View Full Code Here

Examples of fm.ak.otse.twod.Sprite

        if ( null == last  ||  quoteCount++ > &&  XD.nextInt(4) == 1 ) { // 1 in 3
            //quote(witty[XD.nextInt(witty.length)]);
            quoteCount = 0;
        }
       
        Sprite s2 = sheet.sprite("puzzleshadow");
        shadow = new Component("$datagram shadow", 50, 50, s2.w(), s2.h());
        shadow.setSheetSprite(sheet, "puzzleshadow");
        shadow.index = 5;
        //shadow.visibile = false;
        //Component.queue.add(shadow);
View Full Code Here

Examples of fr.cyann.reactdemo.ui.Sprite

      public void invoke(Integer arg1) {
        // count every frame
        final Var<Integer> counter = fps.weak().fold(0, new Signal.CountFold<Integer>());

        // create sprite with image
        final Sprite sprite = new Sprite(fileName, Shape.Type.OTHER);
        final float random = rnd.nextFloat();

        // determine x position according time
        final Var<Integer> x = game.getRWidth().weak().map(new Function1<Integer, Integer>() {

          @Override
          public Integer invoke(Integer arg1) {
            return (int) (random * arg1);
          }
        });

        // determine y position according time
        final Var<Integer> y = counter.map(new Function1<Integer, Integer>() {

          @Override
          public Integer invoke(Integer value) {
            return (velY * value);
          }
        });

        // if out of the screen
        sprite.getOutBottom().subscribe(new Procedure1<Boolean>() {

          @Override
          public void invoke(Boolean arg1) {
            if (arg1) {
              game.removeShape(sprite);
            }
          }
        });

        sprite.setX(x);
        sprite.setY(y);
        game.addShape(sprite);

      }
    });
  }
View Full Code Here

Examples of games.stendhal.client.sprite.Sprite

   *            The map to populate.
   */
  @Override
  protected void buildSprites(IEntity entity, final Map<Object, Sprite> map) {
    final SpriteStore store = SpriteStore.get();
    final Sprite tiles = store.getSprite(translate(entity.getType()));

    map.put(STATE_CLOSED, store.getTile(tiles, 0, 0,
        IGameScreen.SIZE_UNIT_PIXELS, IGameScreen.SIZE_UNIT_PIXELS));
    map.put(STATE_OPEN, store.getTile(tiles, 0,
        IGameScreen.SIZE_UNIT_PIXELS, IGameScreen.SIZE_UNIT_PIXELS,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.