Search in sources :

Example 6 with NoosaScript

use of com.watabou.noosa.NoosaScript in project shattered-pixel-dungeon-gdx by 00-Evan.

the class CharSprite method draw.

@Override
public void draw() {
    if (texture == null || (!dirty && buffer == null))
        return;
    if (renderShadow) {
        if (dirty) {
            verticesBuffer.position(0);
            verticesBuffer.put(vertices);
            if (buffer == null)
                buffer = new Vertexbuffer(verticesBuffer);
            else
                buffer.updateVertices(verticesBuffer);
            dirty = false;
        }
        NoosaScript script = script();
        texture.bind();
        script.camera(camera());
        updateMatrix();
        script.uModel.valueM4(shadowMatrix);
        script.lighting(0, 0, 0, am * .6f, 0, 0, 0, aa * .6f);
        script.drawQuad(buffer);
    }
    super.draw();
}
Also used : NoosaScript(com.watabou.noosa.NoosaScript) Vertexbuffer(com.watabou.glwrap.Vertexbuffer)

Example 7 with NoosaScript

use of com.watabou.noosa.NoosaScript in project shattered-pixel-dungeon-gdx by 00-Evan.

the class Flare method drawRays.

private void drawRays() {
    NoosaScript script = NoosaScript.get();
    texture.bind();
    script.uModel.valueM4(matrix);
    script.lighting(rm, gm, bm, am, ra, ga, ba, aa);
    script.camera(camera);
    script.drawElements(vertices, indices, nRays * 3);
}
Also used : NoosaScript(com.watabou.noosa.NoosaScript)

Example 8 with NoosaScript

use of com.watabou.noosa.NoosaScript in project pixel-dungeon-remix by NYRDS.

the class Flare method drawRays.

private void drawRays() {
    NoosaScript script = NoosaScript.get();
    texture.bind();
    script.uModel.valueM4(matrix);
    script.lighting(rm, gm, bm, am, ra, ga, ba, aa);
    script.camera(camera);
    script.drawElements(vertices, indices, nRays * 3);
}
Also used : NoosaScript(com.watabou.noosa.NoosaScript)

Aggregations

NoosaScript (com.watabou.noosa.NoosaScript)8 Vertexbuffer (com.watabou.glwrap.Vertexbuffer)3 SkinnedBlock (com.watabou.noosa.SkinnedBlock)2 IntMap (com.badlogic.gdx.utils.IntMap)1 Blob (com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob)1 Mob (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob)1 Flare (com.shatteredpixel.shatteredpixeldungeon.effects.Flare)1 Heap (com.shatteredpixel.shatteredpixeldungeon.items.Heap)1 Honeypot (com.shatteredpixel.shatteredpixeldungeon.items.Honeypot)1 Item (com.shatteredpixel.shatteredpixeldungeon.items.Item)1 Potion (com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion)1 RegularLevel (com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel)1 Plant (com.shatteredpixel.shatteredpixeldungeon.plants.Plant)1 HeroSprite (com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite)1 CustomTiledVisual (com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTiledVisual)1 DungeonTerrainTilemap (com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTerrainTilemap)1 DungeonWallsTilemap (com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonWallsTilemap)1 FogOfWar (com.shatteredpixel.shatteredpixeldungeon.tiles.FogOfWar)1 GridTileMap (com.shatteredpixel.shatteredpixeldungeon.tiles.GridTileMap)1 TerrainFeaturesTilemap (com.shatteredpixel.shatteredpixeldungeon.tiles.TerrainFeaturesTilemap)1