Beispiel #1
0
 public RoboCop(PhysicsComponent2D phys, MovementAIComponent2D move, DrawComponent draw)
 {
     detectRadius = 400;
     movement = move;
     physics = phys;
     this.draw = draw;
     state = RoboCopState.STATIC;
     this.BoundingRectangle = new COMP476Proj.BoundingRectangle(phys.Position, 16, 6);
     draw.Play();
 }
Beispiel #2
0
 public SmartCop(PhysicsComponent2D phys, MovementAIComponent2D move, DrawComponent draw, SmartCopState pState)
 {
     detectRadius = 400;
     movement = move;
     physics = phys;
     this.draw = draw;
     behavior = SmartCopBehavior.DEFAULT;
     state = defaultState = pState;
     this.BoundingRectangle = new COMP476Proj.BoundingRectangle(phys.Position, 16, 6);
     draw.Play();
 }
Beispiel #3
0
 public DumbCop(PhysicsComponent2D phys, MovementAIComponent2D move, DrawComponent draw, DumbCopState pState,
     float radius)
 {
     movement = move;
     physics = phys;
     this.draw = draw;
     state = defaultState = pState;
     detectRadius = radius;
     this.BoundingRectangle = new COMP476Proj.BoundingRectangle(phys.Position, 16, 6);
     draw.Play();
 }
Beispiel #4
0
 public Pedestrian(PhysicsComponent2D phys, MovementAIComponent2D move, DrawComponent draw, PedestrianState pState)
 {
     movement = move;
     physics = phys;
     this.draw = draw;
     state = pState;
     behavior = PedestrianBehavior.DEFAULT;
     studentType = draw.animation.animationId.Substring(0, 8);
     this.BoundingRectangle = new COMP476Proj.BoundingRectangle(phys.Position, 16, 6);
     draw.Play();
 }
Beispiel #5
0
        public Streaker(PhysicsComponent2D phys, DrawComponent draw)
        {
            physics = phys;
            this.draw = draw;
            //Initialize Components using Entitybuilder!

            this.BoundingRectangle = new COMP476Proj.BoundingRectangle(phys.Position, 16, 6);

            inputTimer = 0;
            recoverTimer = 0;
            inputDelay = 100;
            superFlashTimer = 0;
            superFlashDelay = 20000;

            superFlashParticles = new ParticleSpewer(
                phys.Position.X + draw.animation.FrameWidth / 2, phys.Position.Y + draw.animation.FrameHeight / 2,
                10000, 100, 0, MathHelper.TwoPi,
                500, 1000, 2, 600, 30, 60, 0.1f, 0.1f, 1, 1, true, 0.75f);

            danceParticles = new ParticleSpewer(
                phys.Position.X + draw.animation.FrameWidth / 2, phys.Position.Y + draw.animation.FrameHeight / 2,
                10000, 100, 0, MathHelper.TwoPi,
                50, 300, 2, 350, 180, 200, 0.25f, 0.5f, 1, 1, true, 0f);

            powerParticles = new ParticleSpewer(
                phys.Position.X + draw.animation.FrameWidth / 2, phys.Position.Y + draw.animation.FrameHeight / 2,
                10000, 10, 0, MathHelper.TwoPi,
                50, 300, 3, 350, 180, 200, 0.5f, 1f, 0.5f, 1, true, 0f);
            powerParticles.Start();
        }