Package engine.classes

Examples of engine.classes.Colour


    @Override
    protected void onDraw(RenderTarget target) {
        // HUD
        target.transformPush();
        target.transformIdentity();
        target.fillRectangle(new Rectangle(240, 24, 160, 16), new Colour(128, 128, 128, 128));
        target.fillRectangle(new Rectangle(240, 24, (160 * dust) / DUST_MAX, 16), new Colour(0, 128, 0, 128));
        target.transformPop();
    }
View Full Code Here


    @Override
    public void onAdd() {
        text = "";
        position = new Vector(2, 476);
        rectangle = new Rectangle(0, 464, 640, 16);
        textColour = new Colour(255, 255, 255);
        rectColour = new Colour(0, 0, 0, 128);
        font = getStage().getLibrary().findFont("Debug");

        activeScenes = new LinkedList<Scene>();
        for (Scene s : getStage().getScenes()) {
            if (s.isActive()) {
View Full Code Here

    private Colour rectColour;
    private Font font;

    @Override
    public void onAdd() {
        textColour = new Colour(255, 255, 255);
        position = new Vector(2, 12);
        font = getStage().getLibrary().findFont("Debug");
        rectangle = new Rectangle(0, 0, 640, 16);
        rectColour = new Colour(0, 0, 0, 128);
    }
View Full Code Here

        direction.normalise();
       
        // calculate state
        if (mouse.isDown(Button.MB_LEFT)) {
            state = State.ATTRACT;
            colour = new Colour(0, 255, 0, 128);
        } else if (mouse.isDown(Button.MB_RIGHT)) {
            state = State.REPEL;
            colour = new Colour(255, 0, 0, 128);
        } else {
            if (keyboard.isDown(Key.VK_SPACE)) {
                if (power < 30) {
                    power += 0.5;
                }
            } else {
                power = 0;
            }
            state = State.OFF;
            colour = new Colour(0, 0, 255, 128);
            return; // don't do MagRay calculations if it is unactivated
        }
       
        // calculate bounding box
        direction.multiply(RADIUS);
View Full Code Here

    @Override
    public void onDraw(final RenderTarget target) {
        target.transformPush();
        target.transformIdentity();
        target.fillRectangle(SCREEN, new Colour(0, 0, 0, alpha));
        target.transformPop();
    }
View Full Code Here

        return new Circle(dynamic.getPolygon().getMid(), 40); // TODO: use the correct size
    }
   
    @Override
    protected void onDraw(RenderTarget target) {
        target.fillCircle(getCircle(), new Colour(255, 0, 0, 64)); // TODO: remove once debugged
    }
View Full Code Here

        int r1 = (int) Math.max(0, Math.floor(viewY / Block.HEIGHT));
        int r2 = (int) Math.min(blocks.length - 1, Math.ceil((viewY + 480) / Block.HEIGHT));
        int c1 = (int) Math.max(0, Math.floor(viewX / Block.WIDTH));
        int c2 = (int) Math.min(blocks[0].length - 1, Math.ceil((viewX + 640) / Block.WIDTH));

        Colour grey = new Colour(128, 128, 128, 128);
        for (int r = r1; r <= r2; r++) {
            for (int c = c1; c <= c2; c++) {
                if (blocks[r][c].getPolygon() != null) {
                    target.fillPolygon(blocks[r][c].getPolygon(), grey);
                }
View Full Code Here

TOP

Related Classes of engine.classes.Colour

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.