public Explosion(Camera camera, float size, Vector2 position, int numOfFrames ) { this.position = position; this.size = size * 3; this.camera = camera; this.numOfFrames = numOfFrames; }
public Splitter(int seed, Camera camera, float size, Vector2 position) { this.camera = camera; this.seed = seed; this.size = size * 0.1f; this.maxSpeed = 1f; this.position = position; this.acceleration = new Vector2(0, 0.5f); }
public Smoke(Random rand, Camera camera, float size, Vector2 position) { this.rand = rand; this.camera = camera; this.minSize = size * 0.5f; this.maxSize = size * 3f; this.position = position ; this.maxLifeTime = 3; this.maxSpeed = 0.1f; this.acceleration = new Vector2(0, -0.1f); }
public ExplosionView(Viewport port, Vector2 startPosition, SoundEffect blast) { this.size = 0.08f; this.spawnTime = 0.1f; blast.Play(); camera = new Camera(port); this.startPosition = camera.getClickModelCoords(startPosition); splitterParticles = new Splitter[MAX_SPLITTER_PARTICLES]; for (int i = 0; i < MAX_SPLITTER_PARTICLES; i++) { splitterParticles[i] = new Splitter(i, camera, size, this.startPosition); splitterParticles[i].spawn(); } explosion = new Explosion(camera, size, this.startPosition, NUM_OF_FRAMES); }
public MouseAim(Viewport port) { camera = new Camera(port); }
public BallView(Viewport port) { m_port = port; camera = new Camera(port); }