MinieExamples/src/main/java/jme3utilities/minie/test/TargetDemo.java
/**
     * Initialize the library of named materials during startup.
     */
Initialize the library of named materials during startup.
Initialize the library of named materials during startup .
@Override
    public void generateMaterials() {
        super.generateMaterials();
        ColorRGBA red = new ColorRGBA(0.5f, 0f, 0f, 1f);
        Material missile = MyAsset.createShinyMaterial(assetManager, red);
        missile.setFloat("Shininess", 15f);
        registerMaterial("missile", missile);
        ColorRGBA lightGray = new ColorRGBA(0.6f, 0.6f, 0.6f, 1f);
        Material selected = MyAsset.createShinyMaterial(assetManager, lightGray);
        selected.setFloat("Shininess", 15f);
        registerMaterial("selected", selected);
        /*
         * shiny, lit materials for targets
         */
        ColorRGBA[] targetColors = new ColorRGBA[numTargetColors];
        targetColors[0] = new ColorRGBA(0.2f, 0f, 0f, 1f); 
        targetColors[1] = new ColorRGBA(0f, 0.07f, 0f, 1f); 
        targetColors[2] = new ColorRGBA(0f, 0f, 0.3f, 1f); 
        targetColors[3] = new ColorRGBA(0.2f, 0.1f, 0f, 1f); 
        for (int index = 0; index < targetColors.length; ++index) {
            ColorRGBA color = targetColors[index];
            Material material
                    = MyAsset.createShinyMaterial(assetManager, color);
            material.setFloat("Shininess", 15f);
            registerMaterial("target" + index, material);
        }
    }
@ Override public void generateMaterials ( ) { super . generateMaterials ( ) ; ColorRGBA red = new ColorRGBA ( 0.5f , 0f , 0f , 1f ) ; Material missile = MyAsset . createShinyMaterial ( assetManager , red ) ; missile . setFloat ( "Shininess" , 15f ) ; registerMaterial ( "missile" , missile ) ; ColorRGBA lightGray = new ColorRGBA ( 0.6f , 0.6f , 0.6f , 1f ) ; Material selected = MyAsset . createShinyMaterial ( assetManager , lightGray ) ; selected . setFloat ( "Shininess" , 15f ) ; registerMaterial ( "selected" , selected ) ; /*
         * shiny, lit materials for targets
         */ ColorRGBA [ ] targetColors = new ColorRGBA [ numTargetColors ] ; targetColors [ 0 ] = new ColorRGBA ( 0.2f , 0f , 0f , 1f ) ; targetColors [ 1 ] = new ColorRGBA ( 0f , 0.07f , 0f , 1f ) ; targetColors [ 2 ] = new ColorRGBA ( 0f , 0f , 0.3f , 1f ) ; targetColors [ 3 ] = new ColorRGBA ( 0.2f , 0.1f , 0f , 1f ) ; for ( int index = 0 ; index < targetColors . length ; ++ index ) { ColorRGBA color = targetColors [ index ] ; Material material = MyAsset . createShinyMaterial ( assetManager , color ) ; material . setFloat ( "Shininess" , 15f ) ; registerMaterial ( "target" + index , material ) ; } }
Initialize the library of named materials during startup.
Initialize the library of named materials during startup .
// ruby
 // emerald
 // sapphire
 // topaz
