Exemplo n.º 1
0
 //Constructor.
 public Beetle(PyramidPanic game, string pathName, Vector2 position, float speed)
 {
     this.game = game;
     this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Beetle\Beetle");
     this.position = position;
     this.speed = speed;
     this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width / 4, this.texture.Height);
     this.state = new WalkUp(this);
 }
Exemplo n.º 2
0
 //Constructor.
 public Beetle(PyramidPanic game, string pathName, Vector2 position, float speed)
 {
     this.game      = game;
     this.texture   = game.Content.Load <Texture2D>(@"PlaySceneAssets\Beetle\Beetle");
     this.position  = position;
     this.speed     = speed;
     this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width / 4, this.texture.Height);
     this.state     = new WalkUp(this);
 }
Exemplo n.º 3
0
 //De constructor
 public Beetle(PyramidPanic game, Vector2 position, float speed)
 {
     this.game = game;
     this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Beetles\Beetle");
     this.collisionTexture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\collisionTexture");
     this.position = position;
     this.speed = speed;
     this.rectangle = new Rectangle((int)this.position.X + 16, (int)this.position.Y + 16, this.texture.Width/4, this.texture.Height);
     this.collisionRectangle = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width / 4, this.texture.Height);
     this.state = new WalkDown(this);
 }