public BigMouth(Level level, Vector2 startPosition, int highestPosY) { intializeData(level); this.position = startPosition; //this.highestPosY = highestPosY; this.FloatingPosY = highestPosY; }
public Vestigial(Level level, string assetName, Vector2 position, Vector2 speed) { this.level = level; texture = level.Content.Load<Texture2D>(assetName); this.position = position; this.speed = speed; }
public ArtFont(Level level, string assetName, Vector2 position, Vector2 speed, bool isScaleEnabled, bool isDisposable) : this(level, assetName, position, speed) { this.isScaleEnabled = isScaleEnabled; this.isDisposable = isDisposable; if (isScaleEnabled) scale = .1f; }
public SkelectonAmmo(Level level, string assetName, Vector2 position, Vector2 speed) { this.level = level; this.position = position; this.speed = speed; texture = level.Content.Load<Texture2D>(assetName); origin = new Vector2(texture.Width / 2.0f, texture.Height / 2.0f); score = 10; }
public Player(Level manage, Vector2 position) { level = manage; initeData(manage); this.position = position; accelerometer = new Accelerometer(); accelerometer.ReadingChanged += new EventHandler<AccelerometerReadingEventArgs>( AccelerometerDataChanged); accelerometer.Start(); }
public Octopuscs(Level level, Vector2 position, Vector2 speed) { this.level = level; this.position = position; this.speed = new Vector2(Math.Abs(speed.X), Math.Abs(speed.Y)); direction = new Vector2(speed.X / this.speed.X, speed.Y / this.speed.Y); textures = new Texture2D[1]; textures[0] = level.Content.Load<Texture2D>(@"Enemies\Octopus 1"); frameSizes = new Point[1]; frameSizes[0] = new Point(150, 150); currentFrame = new Point(0, 0); sheetSizes = new Point[1]; sheetSizes[0] = new Point(2, 1); frameDurationMilliseconds = new int[1]; frameDurationMilliseconds[0] = 200; scale = 1f; collisionSound = null; score = 10; }
public Devourer(Level level, Vector2 position, Vector2 speed) { this.level = level; this.position = position; this.speed = new Vector2(Math.Abs(speed.X), Math.Abs(speed.Y)); direction = new Vector2(0, -1); textures = new Texture2D[2]; textures[0] = level.Content.Load<Texture2D>(@"Enemies\Devourer 1"); textures[1] = level.Content.Load<Texture2D>(@"Enemies\Devourer 2"); frameSizes = new Point[2]; frameSizes[0] = new Point(640, 630); frameSizes[1] = new Point(640, 630); currentFrame = new Point(0, 0); sheetSizes = new Point[2]; sheetSizes[0] = new Point(1, 1); sheetSizes[1] = new Point(1, 1); frameDurationMilliseconds = new int[2]; frameDurationMilliseconds[0] = frameDurationMilliseconds[1] = 200; scale = 1f; collisionSound = null; score = 100; }
public ArtFont(Level level, string assetName, Vector2 position, Vector2 speed) { this.level = level; name = assetName; switch (assetName) { case @"Art Font\Plus One": case @"Art Font\Turbo": textures = new Texture2D[1]; textures[0] = level.Content.Load<Texture2D>(assetName); this.origin = new Vector2(textures[0].Width / 2.0f, textures[0].Height / 2.0f); break; case @"Art Font\fail": textures = new Texture2D[3]; for (int i = 0; i < textures.Length; ++i) textures[i] = level.Content.Load<Texture2D>(assetName + (i + 1).ToString()); this.origin = new Vector2(textures[0].Width * .5f, textures[0].Height * .4f); break; } this.position = position; this.speed = speed; }
public PowerUp( Level spriteManager, Vector2 startPosition , PowerUpType powerUpType) { level = spriteManager; intializeData(spriteManager); this.isConsumed = false; this.position = startPosition; this.position.X += (Math.Abs(speed.X) / speed.X) * 70; this.powerUpType = powerUpType; switch (powerUpType) { case PowerUpType.Heart: textureIndex = 0; break; case PowerUpType.DogFood: textureIndex = 2; break; default: textureIndex = 1; break; } }
public BloodSquirter(Level level, Vector2 initPosition, Vector2 initSpeed, Vector2 initDirection, int residenceTime, Vector2 floatingSpeed, Vector2 vibrateSpeed) { this.level = level; position = initPosition; speed = initSpeed; direction = initDirection; residenceInterval = residenceTime; if (initDirection.X > 0) orientation = "right"; else orientation = "left"; this.floatingSpeed = floatingSpeed * initDirection; this.vibrateSpeed = vibrateSpeed; screenWidth = Level.PreferredBackBufferWidth; LoadContent(level); score = 20;// }
public Skelecton(Level level, Vector2 position, Vector2 speed) { this.level = level; this.position = position; this.speed = new Vector2(Math.Abs(speed.X), Math.Abs(speed.Y)); direction = new Vector2(speed.X / this.speed.X, speed.Y / this.speed.Y); textures = new Texture2D[2]; frameSizes = new Point[2]; sheetSizes = new Point[2]; frameDurationMilliseconds = new int[2]; textures[0] = level.Content.Load<Texture2D>(@"Enemies\Skelecton 1"); frameSizes[0] = new Point(150, 150); sheetSizes[0] = new Point(2, 1); frameDurationMilliseconds[0] = 200; textures[1] = level.Content.Load<Texture2D>(@"Enemies\Skelecton 2"); frameSizes[1] = new Point(150, 150); sheetSizes[1] = new Point(3, 1); frameDurationMilliseconds[1] = 200; currentFrame = new Point(0, 0); scale = 1f; collisionSound = null; score = 20; defaultSpeedY = level.RandomNum.Next(2, 10); }
public void LoadContent(Level level) { frameDurationMilliseconds = new int[2]; frameDurationMilliseconds[0] = 200; frameDurationMilliseconds[1] = 40; textures = new Texture2D[2]; textures[0] = level.Content.Load<Texture2D>(@"BloodSquirter/floating"); textures[1] = level.Content.Load<Texture2D>(@"BloodSquirter/attack"); frameSizes = new Point[2]; frameSizes[0] = new Point(125, 150); frameSizes[1] = new Point(125, 150); sheetSizes = new Point[2]; sheetSizes[0] = new Point(1, 1); sheetSizes[1] = new Point(5, 1); }
private int surgingSpeedY = 16; // ���������ij��ٶ� #endregion Fields #region Constructors public BigMouth(Level level, Vector2 startPosition) { intializeData(level); this.position = startPosition; }
private void intializeData(Level level) { this.level = level; this.textures = new Texture2D[4]; textures[0] = level.Content.Load<Texture2D>(@"Monster/BigMouth/Normal"); textures[1] = level.Content.Load<Texture2D>(@"Monster/BigMouth/Charging"); textures[2] = level.Content.Load<Texture2D>(@"Monster/BigMouth/Attacking"); textures[3] = level.Content.Load<Texture2D>(@"Monster/BigMouth/Dying"); this.textureIndex = 0; this.currentFrame = new Point(0, 0); this.frameSizes = new Point[4]; frameSizes[0] = new Point(150, 150); frameSizes[1] = new Point(150, 150); frameSizes[2] = new Point(150, 150); frameSizes[3] = new Point(150, 150); this.sheetSizes = new Point[4]; // It seems with no use sheetSizes[0] = new Point(150, 150); sheetSizes[1] = new Point(300, 150); sheetSizes[2] = new Point(150, 150); sheetSizes[3] = new Point(150, 150); this.frameDurationMilliseconds = new int[4]; frameDurationMilliseconds[0] = 400; frameDurationMilliseconds[1] = 400; frameDurationMilliseconds[2] = 400; frameDurationMilliseconds[3] = 400; this.speed.Y = surgingSpeedY; this.speed.X = (rnd.NextDouble() < 0.5) ? 3 : (-3); // random direction of x coordinate axis scale = 1f; collisionSound = null; score = 20; }
private void initeData(Level manage) { millisecondsPerFrame = new int[10]; millisecondsPerFrame[0] = 200; millisecondsPerFrame[1] = defaultMillisecondsPerFrame; millisecondsPerFrame[2] = defaultMillisecondsPerFrame; millisecondsPerFrame[3] = defaultMillisecondsPerFrame; millisecondsPerFrame[4] = defaultMillisecondsPerFrame; millisecondsPerFrame[5] = defaultMillisecondsPerFrame; millisecondsPerFrame[6] = defaultMillisecondsPerFrame; millisecondsPerFrame[7] = defaultMillisecondsPerFrame; millisecondsPerFrame[8] = defaultMillisecondsPerFrame; millisecondsPerFrame[9] = defaultMillisecondsPerFrame; textureImages = new Texture2D[10]; textureImages[0] = manage.Content.Load<Texture2D>(@"UpPlayer\rocket"); textureImages[1] = manage.Content.Load<Texture2D>(@"UpPlayer\rocketOver"); textureImages[2] = manage.Content.Load<Texture2D>(@"UpPlayer\ready"); textureImages[3] = manage.Content.Load<Texture2D>(@"UpPlayer\down"); textureImages[4] = manage.Content.Load<Texture2D>(@"UpPlayer\hit"); textureImages[5] = manage.Content.Load<Texture2D>(@"UpPlayer\plane"); textureImages[6] = manage.Content.Load<Texture2D>(@"UpPlayer\readyTransparent"); textureImages[7] = manage.Content.Load<Texture2D>(@"UpPlayer\downTransparent"); textureImages[8] = manage.Content.Load<Texture2D>(@"UpPlayer\hitTransparent"); textureImages[9] = manage.Content.Load<Texture2D>(@"UpPlayer\withgirl"); sheetSizes = new Point[10]; sheetSizes[0] = new Point(2, 1); sheetSizes[1] = new Point(1, 1); sheetSizes[2] = new Point(1, 1); sheetSizes[3] = new Point(1, 1); sheetSizes[4] = new Point(1, 1); sheetSizes[5] = new Point(2, 1); sheetSizes[6] = new Point(2, 1); sheetSizes[7] = new Point(2, 1); sheetSizes[8] = new Point(2, 1); sheetSizes[9] = new Point(2, 1); frameSizes = new Point[10]; for (int i = 0; i < 10; ++i) { frameSizes[i] = new Point(150, 150); } }
private void intializeData( Level spriteManager ) { textureImages = new Texture2D[3]; textureImages[0] = spriteManager.Content.Load<Texture2D>(@"PowerUp/Heart"); textureImages[1] = spriteManager.Content.Load<Texture2D>(@"PowerUp/LifePlus1"); textureImages[2] = spriteManager.Content.Load<Texture2D>(@"PowerUp/DogFood"); this.frameSizes = new Point[3]; this.frameSizes[0] = new Point(150, 150); this.frameSizes[1] = new Point(150, 150); this.frameSizes[2] = new Point(150, 150); rnd = new Random(); this.speed.Y = 0; this.speed.X = speedOfMove * ( (rnd.NextDouble() < 0.5)?1:(-1) ); this.currentState = State.moving; this.movingTime = 1300; this.floatingTime = 3000; this.consumingTime = 1000; this.noCollideTime = 1000; this.canCollide = false; this.collisionSound = null; }