Package ch.blackspirit.graphics

Examples of ch.blackspirit.graphics.ResourceManager


   
    final Image dark = canvas.getImageFactory().createImage(128, 128, true);
    final Image light = canvas.getImageFactory().createBufferedImage(128, 128,
        BufferTypeUtil.getBest(canvas.getImageFactory(), true));
   
    ResourceManager rm = canvas.getResourceManager();
    rm.cacheImage(dark);
    rm.cacheImage(campfire);
    rm.cacheImage(animLeftImage);
    rm.cacheImage(animFrontImage);
    rm.cacheImage(animBackImage);
    rm.cacheImage(leftImage);
    rm.cacheImage(frontImage);
    rm.cacheImage(backImage);
    rm.cacheImage(grass)
    final Animation<Frame> animLeft = new AnimationImpl<Frame>();
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000, 0, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000, 45, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000, 90, 0, 44, 68));
View Full Code Here


    final Image darktest = canvas.getImageFactory().createImage(128, 128, true);
//    final Image dark = canvas.getImageFactory().createBufferedImage(128, 128, BufferTypes.RGBA_4Byte);
    final Image gradient = canvas.getImageFactory().createBufferedImage(256, 256, BufferTypes.RGBA_4Byte);
    final Image light = canvas.getImageFactory().createBufferedImage(128, 128, BufferTypes.RGBA_4Byte);
   
    ResourceManager rm = canvas.getResourceManager();
    rm.cacheImage(dark);
    rm.cacheImage(campfire);
    rm.cacheImage(animLeftImage);
    rm.cacheImage(animFrontImage);
    rm.cacheImage(animBackImage);
    rm.cacheImage(leftImage);
    rm.cacheImage(frontImage);
    rm.cacheImage(backImage);
    rm.cacheImage(grass)
    final Animation<Frame> animLeft = new AnimationImpl<Frame>();
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000, 0, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000, 45, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000, 90, 0, 44, 68));
View Full Code Here

TOP

Related Classes of ch.blackspirit.graphics.ResourceManager

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.