Package ch.blackspirit.graphics.anim

Examples of ch.blackspirit.graphics.anim.FrameImpl


    canvas.getResourceManager().cacheImage(grass)
    canvas.getResourceManager().cacheImage(wall);

    // Setting up the animations
    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));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,135, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,180, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,225, 0, 44, 68));
    animLeft.setRepeated(true);
   
    final Animation<Frame> animFront = new AnimationImpl<Frame>();
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 0, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 41, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 82, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,123, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,164, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,205, 0, 40, 70));
    animFront.setRepeated(true);
   
   
    final Animation<Frame> animLeftStill = new AnimationImpl<Frame>();
    animLeftStill.addFrame(new FrameImpl(leftImage, 160000000, 0, 0, 28, 68));
    animLeftStill.setRepeated(true);
   
    final Animation<Frame> animFrontStill = new AnimationImpl<Frame>();
    animFrontStill.addFrame(new FrameImpl(frontImage, 160000000, 0, 0, 32, 70));
    animFrontStill.setRepeated(true);
   
    final Animation<Frame> animBackStill = new AnimationImpl<Frame>();
    animBackStill.addFrame(new FrameImpl(backImage, 160000000, 0, 0, 32, 66));
    animBackStill.setRepeated(true);
   
    final Animation<Frame> animBack = new AnimationImpl<Frame>();
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 0, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 37, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 74, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,111, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,148, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,185, 0, 36, 70));
    animBack.setRepeated(true);
   
    final Color4f white = new Color4f(1,1,1,1);
    final Color4f red = new Color4f(1,0,0,1);
View Full Code Here


    canvas.getResourceManager().cacheImage(grass)
    canvas.getResourceManager().cacheImage(wall);

    // Setting up the animations
    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));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,135, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,180, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,225, 0, 44, 68));
    animLeft.setRepeated(true);
   
    final Animation<Frame> animFront = new AnimationImpl<Frame>();
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 0, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 41, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 82, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,123, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,164, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,205, 0, 40, 70));
    animFront.setRepeated(true);
   
   
    final Animation<Frame> animLeftStill = new AnimationImpl<Frame>();
    animLeftStill.addFrame(new FrameImpl(leftImage, 160000000, 0, 0, 28, 68));
    animLeftStill.setRepeated(true);
   
    final Animation<Frame> animFrontStill = new AnimationImpl<Frame>();
    animFrontStill.addFrame(new FrameImpl(frontImage, 160000000, 0, 0, 32, 70));
    animFrontStill.setRepeated(true);
   
    final Animation<Frame> animBackStill = new AnimationImpl<Frame>();
    animBackStill.addFrame(new FrameImpl(backImage, 160000000, 0, 0, 32, 66));
    animBackStill.setRepeated(true);
   
    final Animation<Frame> animBack = new AnimationImpl<Frame>();
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 0, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 37, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 74, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,111, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,148, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,185, 0, 36, 70));
    animBack.setRepeated(true);
   
    final Color4f white = new Color4f(1,1,1,1);
    final Color4f white_alpha = new Color4f(1,1,1,.5f);
    final Color4f red = new Color4f(1,0,0,1);
View Full Code Here

    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));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,135, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,180, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,225, 0, 44, 68));
    animLeft.setRepeated(true);

    final Animation<Frame> animFront = new AnimationImpl<Frame>();
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 0, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 41, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 82, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,123, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,164, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,205, 0, 40, 70));
    animFront.setRepeated(true);


    final Animation<Frame> animLeftStill = new AnimationImpl<Frame>();
    animLeftStill.addFrame(new FrameImpl(leftImage, 160000000, 0, 0, 28, 68));
    animLeftStill.setRepeated(true);
   
    final Animation<Frame> animFrontStill = new AnimationImpl<Frame>();
    animFrontStill.addFrame(new FrameImpl(frontImage, 160000000, 0, 0, 32, 70));
    animFrontStill.setRepeated(true);
   
    final Animation<Frame> animBackStill = new AnimationImpl<Frame>();
    animBackStill.addFrame(new FrameImpl(backImage, 160000000, 0, 0, 32, 66));
    animBackStill.setRepeated(true);

    final Animation<Frame> animBack = new AnimationImpl<Frame>();
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 0, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 37, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 74, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,111, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,148, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,185, 0, 36, 70));
    animBack.setRepeated(true);

    final Animation<Frame> animFire = new AnimationImpl<Frame>();
    animFire.addFrame(new FrameImpl(campfire, 120000000,1, 1, 64, 80));
    animFire.addFrame(new FrameImpl(campfire, 120000000, 66, 1, 64, 80));
    animFire.addFrame(new FrameImpl(campfire, 120000000, 131, 1, 64, 80));
    animFire.addFrame(new FrameImpl(campfire, 120000000,196, 1, 64, 80));
    animFire.setRepeated(true);

    final Color4f white = new Color4f(1,1,1,1);
    final Color4f red = new Color4f(1,0,0,1);
       
View Full Code Here

    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));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,135, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,180, 0, 44, 68));
    animLeft.addFrame(new FrameImpl(animLeftImage, 160000000,225, 0, 44, 68));
    animLeft.setRepeated(true);

    final Animation<Frame> animFront = new AnimationImpl<Frame>();
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 0, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 41, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000, 82, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,123, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,164, 0, 40, 70));
    animFront.addFrame(new FrameImpl(animFrontImage, 160000000,205, 0, 40, 70));
    animFront.setRepeated(true);


    final Animation<Frame> animLeftStill = new AnimationImpl<Frame>();
    animLeftStill.addFrame(new FrameImpl(leftImage, 160000000, 0, 0, 28, 68));
    animLeftStill.setRepeated(true);
   
    final Animation<Frame> animFrontStill = new AnimationImpl<Frame>();
    animFrontStill.addFrame(new FrameImpl(frontImage, 160000000, 0, 0, 32, 70));
    animFrontStill.setRepeated(true);
   
    final Animation<Frame> animBackStill = new AnimationImpl<Frame>();
    animBackStill.addFrame(new FrameImpl(backImage, 160000000, 0, 0, 32, 66));
    animBackStill.setRepeated(true);

    final Animation<Frame> animBack = new AnimationImpl<Frame>();
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 0, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 37, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000, 74, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,111, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,148, 0, 36, 70));
    animBack.addFrame(new FrameImpl(animBackImage, 160000000,185, 0, 36, 70));
    animBack.setRepeated(true);

    final Animation<Frame> animFire = new AnimationImpl<Frame>();
    animFire.addFrame(new FrameImpl(campfire, 120000000,1, 1, 64, 80));
    animFire.addFrame(new FrameImpl(campfire, 120000000, 66, 1, 64, 80));
    animFire.addFrame(new FrameImpl(campfire, 120000000, 131, 1, 64, 80));
    animFire.addFrame(new FrameImpl(campfire, 120000000,196, 1, 64, 80));
    animFire.setRepeated(true);

//    final Color4f red = new Color4f(1,0,0,1);
    final Color4f white = new Color4f(1,1,1,1);
       
View Full Code Here

TOP

Related Classes of ch.blackspirit.graphics.anim.FrameImpl

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.