Package dwlab.shapes.sprites.shape_types

Examples of dwlab.shapes.sprites.shape_types.SpriteTemplate


public class WedgingOffSpriteWithSpriteTemplate extends WedgingOffSprites {
  public static WedgingOffSpriteWithSpriteTemplate instance = new WedgingOffSpriteWithSpriteTemplate();

  @Override
  public void calculateVector( Sprite spriteTemplateSprite, Sprite sprite, Vector vector ) {
    SpriteTemplate spriteTemplate = (SpriteTemplate) spriteTemplateSprite.shapeType;
    for( Sprite templateSprite : spriteTemplate.sprites ) {
      spriteTemplate.setShape( spriteTemplateSprite, templateSprite, serviceSprite );
      serviceSprite.shapeType = templateSprite.shapeType;
      handlers[ serviceSprite.shapeType.getNum() ][ sprite.shapeType.getNum() ].calculateVector( serviceSprite, sprite, vector );
    }
  }
View Full Code Here


public class SpriteWithSpriteTemplateCollision extends SpritesCollision {
  public static SpriteWithSpriteTemplateCollision instance = new SpriteWithSpriteTemplateCollision();

  @Override
  public boolean check( Sprite sprite1, Sprite sprite2 ) {
    SpriteTemplate spriteTemplate = (SpriteTemplate) sprite1.shapeType;
    for( Sprite templateSprite : spriteTemplate.sprites ) {
      spriteTemplate.setShape( sprite1, templateSprite, serviceSprite );
      serviceSprite.shapeType = templateSprite.shapeType;
      if( SpritesCollision.handlers[ serviceSprite.shapeType.getNum() ][ sprite2.shapeType.getNum() ].check( serviceSprite, sprite2 ) ) return true;
    }
    return false;
  }
View Full Code Here

  public static DrawingSpriteTemplateShape instance = new DrawingSpriteTemplateShape();
 
 
  @Override
  public void perform( Sprite sprite, Color drawingColor, boolean empty ) {
    SpriteTemplate spriteTemplate = (SpriteTemplate) sprite.shapeType;
    for( Sprite templateSprite : spriteTemplate.sprites ) {
      spriteTemplate.setShape( sprite, templateSprite, serviceSprite );
      handlers[ templateSprite.shapeType.getNum() ].perform( serviceSprite, drawingColor, empty );
    }
  }
View Full Code Here

  public static SpriteTemplateWithLineSegmentCollision instance = new SpriteTemplateWithLineSegmentCollision();

 
  @Override
  public boolean check( Sprite sprite, Sprite lSPivot1, Sprite lSPivot2 ) {
    SpriteTemplate spriteTemplate = (SpriteTemplate) sprite.shapeType;
    for( Sprite templateSprite : spriteTemplate.sprites ) {
      spriteTemplate.setShape( sprite, templateSprite, serviceSprite );
      if( CollisionWithLineSegment.handlers[ sprite.shapeType.getNum() ].check( sprite, lSPivot1, lSPivot2 ) ) return true;
    }
    return false;
  }
View Full Code Here

  public static DrawingSpriteTemplate instance = new DrawingSpriteTemplate();
 
 
  @Override
  public void perform( Visualizer visualizer, Sprite sprite, Sprite spriteShape, Color drawingColor ) {
    SpriteTemplate spriteTemplate = (SpriteTemplate) sprite.shapeType;
    for( Sprite templateSprite : spriteTemplate.sprites ) {
      spriteTemplate.setShape( sprite, templateSprite, serviceSprite );
      handlers[ templateSprite.shapeType.getNum() ].perform( visualizer, templateSprite, serviceSprite, drawingColor );
    }
  }
View Full Code Here

TOP

Related Classes of dwlab.shapes.sprites.shape_types.SpriteTemplate

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.