Package testing

Source Code of testing.Square

package testing;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;

import org.newdawn.slick.geom.Vector2f;

import framework.collision.CollisionComponent;
import framework.collision.PointCollisionMask;
import framework.component.ParentComponent;
import framework.io.CustomInputStream;
import framework.rendering.SpriteComponent;
import framework.spacial.PositionComponent;
import framework.spacial.translational.VelocityComponent;

public class Square extends ParentComponent{

  public Square(int x, int y) {
    super();
    addComponent(new PositionComponent(x,y));
    addComponent(new SpriteComponent("img/square.png"));
    addComponent(new VelocityComponent(new Vector2f(0.01f, 0.1f)));
    addComponent(new CollisionComponent(new PointCollisionMask()));
  }

  public Square(CustomInputStream in, int baseID, byte formatVersion) throws IOException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {
    super(in, baseID, formatVersion);
  }
}
TOP

Related Classes of testing.Square

TOP
Copyright © 2018 www.massapi.com. 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.