Esempio n. 1
0
 public EditorPanel(PyramidPanic game, EditorScene editorScene, Vector2 location)
 {
     this.game = game;
     this.editorScene = editorScene;
     this.location = location;
     this.LoadContent();
 }
Esempio n. 2
0
 //Constructor
 public Level(PyramidPanic game, int levelIndex)
 {
     this.game = game;
     this.levelPath = String.Format(@"PlaySceneAssets\Levels\{0}.txt", levelIndex);
     this.levelPath = Path.Combine(@"Content\", this.levelPath);
     this.beetles = new List<Beetle>();
     this.scorpions = new List<Scorpion>();
     this.mummies = new List<Mummy>();
     this.treasures = new List<Image>();
     this.movingBlocks = new List<MovingBlock>();
     if (levelIndex == 0)
         Score.Reset();
     MovingBlockManager.Level = this;
     this.LoadAssets();
     ScorpionManager.Level = this;
     ScorpionManager.CollisionGridRight();
     ScorpionManager.CollisionGridLeft();
     BeetleManager.Level = this;
     BeetleManager.CollisionGridDown();
     BeetleManager.CollisionGridUp();
     ExplorerManager.Level = this;
     MummyManager.Level = this;
     MovingBlockManager.CollisionGridDown();
     MovingBlockManager.CollisionGridUp();
 }
Esempio n. 3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (PyramidPanic game = new PyramidPanic())
     {
         game.Run();
     }
 }
Esempio n. 4
0
 //Properties
 //Constructor
 public MenuStartScene(PyramidPanic game)
 {
     this.game = game;
     this.position = new Vector2(650f, 10f);
     this.left = 4;
     this.top = 430;
     this.space = 106;
     this.LoadContent();
 }
Esempio n. 5
0
 //Constructor
 public MovingBlock(PyramidPanic game, string blockName, Vector2 location,
                 BlockCollision blockCollision, char charItem )
 {
     this.game = game;
     this.texture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Blocks\" + blockName);
     this.collisionTexture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\CollisionText");
     this.startLocation = location;
     this.Location = location;
     this.state = new MovingBlockIdle(this);
 }
Esempio n. 6
0
 //Constructor
 public Image(PyramidPanic game, string imageName, Vector2 position, Char? identifier)
 {
     this.game= game;
     this.texture = this.game.Content.Load<Texture2D>(imageName);
     this.position = position;
     this.identifier = identifier;
     this.rectangle = new Rectangle((int)this.position.X,
                                    (int)this.position.Y,
                                    this.texture.Width,
                                    this.texture.Height);
 }
Esempio n. 7
0
 //Constructor
 public Block(PyramidPanic game, string blockName, Vector2 location,
                 BlockCollision blockCollision, char charItem )
 {
     this.game = game;
     this.blockName = blockName;
     this.texture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Blocks\" + blockName);
     this.location = new Vector2(location.X, location.Y);
     this.blockCollision = blockCollision;
     this.charItem = charItem;
     this.rectangle = new Rectangle((int)this.location.X, (int)this.location.Y, this.texture.Width, this.texture.Height);
 }
Esempio n. 8
0
 //Constructor
 public Mummy(PyramidPanic game, Vector2 location, int columns, int rows, float frameLength, int speed)
 {
     this.game = game;
     this.location = location;
     this.columns = columns;
     this.rows = rows;
     this.frameLength = frameLength;
     this.speed = speed;
     this.texture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Mummy\Mummy");
     this.collisionText = game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\CollisionText");
     this.collisionRect = new Rectangle((int)this.location.X, (int)this.location.Y, this.collisionText.Width, this.collisionText.Height);
     this.iState = new MummyWander(this, 1);
 }
Esempio n. 9
0
 //Constructor
 public Explorer(PyramidPanic game, Vector2 location, int columns, int rows, float framelength,
     float speed)
 {
     this.game = game;
     this.location = location;
     this.startLocation = location;
     this.columns = columns;
     this.rows = rows;
     this.framelength = framelength;
     this.speed = speed;
     this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\Explorer_down");
     this.collisionText = game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\CollisionText");
     this.collisionRect = new Rectangle((int)this.location.X, (int)this.location.Y, this.collisionText.Width, this.collisionText.Height);
     this.iState = new Idle(this, "Right");
 }
Esempio n. 10
0
 //Properties
 //Constructor
 public LoadScene(PyramidPanic game)
 {
     this.game = game;
     this.Initialize();
 }
Esempio n. 11
0
 //Properties
 //Constructor
 public ScoresScene(PyramidPanic game)
 {
     this.game = game;
     this.Initialize();
 }
Esempio n. 12
0
 //Constructor
 public Panel(PyramidPanic game, Vector2 location)
 {
     this.game = game;
     this.location = location;
     this.Initialize();
 }