Package rtype.entity

Examples of rtype.entity.Text


    Planet planet= new Planet(IEntity.PLANET);
      planet.spawn(new Vector2f(320,0),new Vector2f(7f*-1,0),Prototyp.background);
   
    layer = new Layer();
   
    Text title = new Text (" . Prototyp .");
    Text commandLabel = new Text("- Commands -");
    Text commandLabel0 = new Text("P            : Pause.");
    Text commandLabel1 = new Text("F1           : Start homing missile.");
    Text commandLabel2 = new Text("F2           : Start enemy waves.");
    Text commandLabel3 = new Text("X            : Detach/Move Orb.");
    Text commandLabel4 = new Text("Arrow key    : Move.");
    Text commandLabel5 = new Text("Space        : Fire ( maintain to charge).");
    Text commandLabel6 = new Text("Press SPACE to Start !!");
    Vector2f immobile = new Vector2f(0,0);
   
    int pointY = 240;
    int pointX = -270;
    int interspace = 20;
   
    title.spawn(new Vector2f(pointX+160,pointY -=interspace*4), immobile, layer);
    commandLabel.spawn(new Vector2f(pointX+200,pointY -=interspace*4), immobile, layer);
    commandLabel0.spawn(new Vector2f(pointX,pointY -=interspace*2), immobile, layer);
    commandLabel1.spawn(new Vector2f(pointX,pointY -=interspace), immobile, layer);
    commandLabel2.spawn(new Vector2f(pointX,pointY -=interspace), immobile, layer);
    commandLabel3.spawn(new Vector2f(pointX,pointY -=interspace), immobile, layer);
    commandLabel4.spawn(new Vector2f(pointX,pointY -=interspace), immobile, layer);
    commandLabel5.spawn(new Vector2f(pointX,pointY -=interspace), immobile, layer);
    commandLabel6.spawn(new Vector2f(pointX+150,pointY -=interspace*3), immobile, layer);

   
    KeyListener space = new KeyListener()
    {
        public void onKeyUp()
View Full Code Here


   private void addBasicEntities() {
     player1 = new PlayerShip(); // Calling default constructor, if you want to chanage them: PlayerShip(Use Keyboard.KEY_UP,Keyboard.KEY_DOWN,Keyboard.KEY_LEFT,Keyboard.KEY_RIGHT,Keyboard.KEY_SPACE,Keyboard.KEY_X)
          player1.spawn(new Vector2f(-150,-100),new Vector2f(0,0),bullets);
          player1.addBooster();
         
          textFPS = new Text("");
          textFPS.spawn(new Vector2f(SCREEN_WIDTH/2-100,SCREEN_HEIGHT/2-20),new Vector2f(0,0),text);
 
          textHisCore = new Text("HISCORE:");
          textHisCore.spawn(new Vector2f(-SCREEN_WIDTH/2+20,SCREEN_HEIGHT/2 - 20),new Vector2f(0,0),text);
         
          entitiesCount = new TextEntityCounter();
          entitiesCount.spawn(new Vector2f(-SCREEN_WIDTH/2+20,-SCREEN_HEIGHT/2 + 20),new Vector2f(0,0),text);
   
View Full Code Here

              timer.resume();
              pause.unSpawn();
            }
            else
            {
                pause = new Text("GAME PAUSED");
              //pause.setRatio(1.5f);
              pause.spawn(new Vector2f(-50,0),new Vector2f(0,0),frontground);
              timer.pause();
            }
        };
View Full Code Here

        BonusRapidShootOrb rBonus = new BonusRapidShootOrb();
        BonusMagneticOrb mBonus = new BonusMagneticOrb();
        BonusCrystalOrb cBonus = new BonusCrystalOrb();
        BonusBooster bBonus = new BonusBooster();
       
        Text commandLabel = new Text("One more thing...");
        Text lightningLabel = new Text("Lightning Orb :");
        Text rapidLabel =     new Text("RapidFire Orb :");
        Text magneticLabel =  new Text("Magnetic  Orb :");
        Text crystalLabel =   new Text("Crystal   Orb :");
        Text boosterLabel =   new Text("Booster   Orb :");
       
       
    commandLabel.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
    pointX = ORIGIN_X - interspaceX*2;
        pointY = ORIGIN_Y;
       
        pointY-=interspaceY;
        lightningLabel.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        rapidLabel.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        magneticLabel.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        crystalLabel.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        boosterLabel.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
    pointX = ORIGIN_X + 50 ;
        pointY = ORIGIN_Y;
   
        pointY-=interspaceY;
View Full Code Here

TOP

Related Classes of rtype.entity.Text

Copyright © 2018 www.massapicom. 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.