Package rtype.entity

Examples of rtype.entity.PlayerShip





   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);
View Full Code Here


   
    Vector2f immobile = new Vector2f(0,0);
   
   
   
    PlayerShip lightning = new PlayerShip();
    LightningOrb lorb = new LightningOrb(lightning);
   
    PlayerShip rapid = new PlayerShip();
    RapidFireOrb rforb = new RapidFireOrb(rapid);
   
    PlayerShip magnetic = new PlayerShip();
    MagneticOrb morb = new MagneticOrb(magnetic);
   
    PlayerShip crystal = new PlayerShip();
    CrystalOrb corb = new CrystalOrb(crystal);
   
    PlayerShip booster = new PlayerShip();
   
    BonusLightningOrb lBonus = new BonusLightningOrb();
        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;
        lBonus.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        rBonus.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        mBonus.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        cBonus.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointY-=interspaceY;
        bBonus.spawn(new Vector2f(pointX,pointY), immobile, layer);
       
        pointX = ORIGIN_X + interspaceX+ 50;
        pointY = ORIGIN_Y;
       
        pointY-=interspaceY;
        lightning.spawn(new Vector2f(pointX,pointY), immobile, nullLayer);
        lorb     .spawn(new Vector2f(pointX-400,pointY), immobile, layer);
       
        pointY-=interspaceY;
        rapid    .spawn(new Vector2f(pointX,pointY), immobile, nullLayer);
        rforb    .spawn(new Vector2f(pointX-400,pointY), immobile, layer);
       
        pointY-=interspaceY;
        magnetic .spawn(new Vector2f(pointX,pointY), immobile, nullLayer);
        morb     .spawn(new Vector2f(pointX-400,pointY), immobile, layer);
       
        pointY-=interspaceY;
        crystal  .spawn(new Vector2f(pointX,pointY), immobile, nullLayer);
        corb     .spawn(new Vector2f(pointX-400,pointY), immobile, layer);
   
        pointY-=interspaceY;
        booster  .spawn(new Vector2f(pointX+60,pointY), immobile, nullLayer);
        booster.addBooster(layer);
    booster.addBooster(layer);

   
   

  }
View Full Code Here

TOP

Related Classes of rtype.entity.PlayerShip

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.