Package invaders101.entities

Examples of invaders101.entities.ShipEntity


        g.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);

        // ciclo que dibuja todas las entidades que tiene el juego
        for (int i = 0; i < entities.size(); i++) {
            if (entities.get(i) instanceof Drawable) {
                Drawable entity = (Drawable) entities.get(i);
                entity.draw(g);
            }
        }
        drawLives("sprites/life.png", SCREEN_HEIGHT, 550, g, lives);

        // Si está esperando que se presione una tecla
View Full Code Here


        strategy.show();
    }

    public void addSprite() {
        Image image = ImageCache.getInstance().getImage("sprites/ship.png");
        Trackable trackable = new Trackable(){

            public float getX() {
                return 100;
            }
View Full Code Here

        strategy.show();
    }

    public void addSprite() {
        Image image = ImageCache.getInstance().getImage("sprites/alien.png");
        Trackable trackable = new Trackable(){

            public float getX() {
                return 100;
            }
View Full Code Here

        strategy.show();
    }

    public void addSprite() {
        Image image = ImageCache.getInstance().getImage("sprites/ship.png");
        Trackable trackable = new Trackable(){

            public float getX() {
                return 100;
            }
View Full Code Here

        strategy.show();
    }

    private void update(long delta) {
        for (int i = 0; i < entities.size(); i++) {
            Updateable entity = entities.get(i);
            entity.update(delta);
        }
        ship.hadleShipInput(keyInputHandler.isLeftPressed(), keyInputHandler.isRightPressed(),
                keyInputHandler.isFirePressed());
    }
View Full Code Here

     */
    public Explotion(Game game, int x, int y) {
        super(SpriteFactory.getInstance().getAnimation(SpriteFactory.Animations.EXPLOTION), x, y);
        this.game = game;

        AnimationEndHandler handler = new AnimationEndHandler() {

            @Override
            public void onAnimationFinished() {
                removeFromGame();
            }
View Full Code Here

        };
//        sprite =  new AnimatedSprite(
//                trackable,
//                true,
//                50, 0, 0, 4, 1, 42, 42, 0, 0, 1 , image);
                sprite =  new Sprite(
                trackable,
                true,
                8, 0, 0, 4, 1, 23, 50, 0, 0, 1 , image);
    }
View Full Code Here

        };
//        sprite =  new AnimatedSprite(
//                trackable,
//                true,
//                50, 0, 0, 4, 1, 42, 42, 0, 0, 1 , image);
                sprite =  new Sprite(
                trackable,
                true,
                128, 0, 0, 6, 1, 46, 46, 0, 0, 2, image);
                sprite.setScale(0.9);
    }
View Full Code Here

        };
//        sprite =  new AnimatedSprite(
//                trackable,
//                true,
//                50, 0, 0, 4, 1, 42, 42, 0, 0, 1 , image);
                sprite =  new Sprite(
                trackable,
                true,
                8, 0, 0, 4, 1, 23, 50, 0, 0, 1 , image);
    }
View Full Code Here

TOP

Related Classes of invaders101.entities.ShipEntity

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.