Package com.mlarktar.spacewar.sprites

Examples of com.mlarktar.spacewar.sprites.OffensiveRepresentation


    // add ship and victories by each ship
    Ship ship = new Ship(bounds.width / 4, bounds.height * 2 / 3, space);
    ship.setRepresentation(new DeffensiveRepresentation());
    space.addSpaceItem(ship);
    ship = new Ship(bounds.width * 3 / 4, bounds.height * 2 / 3, space);
    ship.setRepresentation(new OffensiveRepresentation());
    space.addSpaceItem(ship);
   
    // add the equal sign and the number of victories for each ship
    ScrollingText text = new ScrollingText(" = " + app.getShipVictories(0), bounds.width / 4 + Ship.SHIPSIZE, bounds.height * 2 / 3 + Ship.SHIPSIZE);
    text.setAboutFont(new Font("Monospaced", Font.BOLD, 20));
View Full Code Here


    ship1.setEnemy(ship2);
    ship2.setEnemy(ship1);
    ship1.setSounds(SoundServer.getSoundEvents());
    ship2.setSounds(SoundServer.getSoundEvents());
    ship1.setRepresentation(new DeffensiveRepresentation());
    ship2.setRepresentation(new OffensiveRepresentation());

    space.addSpaceItem(ship1);
    space.addSpaceItem(ship2);

    // Add observers that show ships energy levels
View Full Code Here

TOP

Related Classes of com.mlarktar.spacewar.sprites.OffensiveRepresentation

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.