public SpecialEnemy(SpecialScreen parent, int row, int x, int y, int shootingrate, int behavior, int speed, int amplitude, int time, bool track)
        {
            this.parent = parent;
            graphicsRow = row;
            location = new Vector2(x, y);
            next_loc = location;

            shootingRate = shootingrate;
            currentBehavior = (Behaviors)behavior;
            this.speed = speed;
            this.amplitude = amplitude;
            this.time = time;
            this.track = track;
        }
Example #2
0
 public SpecialEnemy getEnemy(SpecialScreen parent)
 {
     return new SpecialEnemy(parent, row, x, 0, shootingrate, behavior, speed, amplitude, time, track);
 }
        public SpecialProjectile(SpecialScreen parent, Vector2 location, Vector2 direction, 
            bool friendly = false, bool tracking = false, bool fiery = false, bool ghostly = false)
        {
            this.location = location; next_loc = location;
            if (!tracking)
                this.direction = direction;
            else
            {
                int del_x = (int)(parent.playerloc.X - location.X);
                int del_y = (int)(parent.playerloc.Y - location.Y);
                float norm = (float)Math.Sqrt(Math.Pow(del_x, 2) + Math.Pow(del_y, 2));

                this.direction = new Vector2(4 * del_x / norm, 4 * del_y / norm);
            }
            this.friendly = friendly;
            this.fiery = fiery;
            this.ghostly = ghostly;
        }
 public SpecialPlayer(SpecialScreen parent)
 {
     this.parent = parent;
     graphicsRow = 0;
     height = 48;
     location = new Vector2(SpecialScreen.width / 2, SpecialScreen.height - 48);
     next_loc = location;
 }