Exemple #1
0
 public Explosion(Camera camera, float size, Vector2 position, int numOfFrames )
 {
     this.position = position;
     this.size = size * 3;
     this.camera = camera;
     this.numOfFrames = numOfFrames;
 }
Exemple #2
0
 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);
 }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
 public MouseAim(Viewport port)
 {
     camera = new Camera(port);
 }
Exemple #6
0
 public BallView(Viewport port)
 {
     m_port = port;
     camera = new Camera(port);
 }