//Constructor public Image(PyramidPanic game,Vector2 position,string pathName) { this.game = game; this.position = position; this.texture = game.Content.Load<Texture2D>(pathName); this.rectangle = new Rectangle((int)this.position.X,(int)this.position.Y,this.texture.Width,this.texture.Height); }
// Constructor van de StartScene-class krijgt een object game mee van het type PyramidPanic public StartScene(PyramidPanic game) { this.game = game; // Roep de Initialize method aan this.Initialize(); }
static void Main(string[] args) { using (PyramidPanic game = new PyramidPanic()) { game.Run(); } }
//Properties //Constructor public Scorpion(PyramidPanic game) { this.game = game; this.texture = this.game.Content.Load<Texture2D>(@"PlayScene/Scorpion"); this.sourceRectangle = new Rectangle(0, 0, 32, 32); this.destinationRectangle = new Rectangle(100, 200, this.texture.Width/4, this.texture.Height); }
//Constructor public StartScene(PyramidPanic game) { this.game = game; this.background = new Image(game, @"StartSceneAssets\Background", Vector2.Zero); this.title = new Image(game, @"StartSceneAssets\Title", new Vector2(110f, 30f)); this.menu = new MenuStartScene(this.game); }
//Constructor public Level(PyramidPanic game, int levelIndex) { this.game = game; this.levelIndex = levelIndex; /* System.IO.Stream stream = TitleContainer.OpenStream(@"Content\PlaySceneAssets\Levels\0.txt"); System.IO.StreamReader sreader = new System.IO.StreamReader(stream); // use StreamReader.ReadLine or other methods to read the file data Console.WriteLine("File Size: " + stream.Length); stream.Close(); */ this.levelPath = @"Content\PlaySceneAssets\Levels\" + levelIndex + ".txt"; this.stream = TitleContainer.OpenStream(this.levelPath); //this.levelPath = @"Content\PlaySceneAssets\Levels\0.txt"; //this.levelPath = @"Content\PlaySceneAssets\Levels\" + levelIndex + ".txt"; //eeee //IAsyncResult result = StorageDevice.BeginShowSelector( // PlayerIndex.One, null, null); //StorageDevice device = StorageDevice.EndShowSelector(result); //device.BeginOpenContainer. //eeeee this.LoadAssets(); ExplorerManager.Explorer = this.explorer; this.levelPause = new LevelPause(this); this.levelPlay = new LevelPlay(this); this.levelDoorOpen = new LevelDoorOpen(this); this.levelGameOver = new LevelGameOver(this); this.levelNextLevel = new LevelNextLevel(this); this.levelState = this.levelPlay; this.stream.Close(); }
//construction public Level(PyramidPanic game,int levelIndex) { this.game = game; this.levelPath = @"Content\PlaySceneAssets\Levels\"+levelIndex+".txt"; this.loadAssets(); Score.initialize(); }
//Maak een variabele (reference) aan van de Menu class genaamd menu // Constructor van StartScene-class krijgt een object game mee van het type PyramidPanic public ScoreScene(PyramidPanic game) { this.game = game; //roep de initialize method aan this.initialize(); }
// constructor public StartScene(PyramidPanic game) { this.game = game; this.background = new Image(game, Vector2.Zero, "StartMenu//background"); this.title = new Image(game, new Vector2(100f, 30f), "StartMenu//Title"); this.menu = new MenuStartScene(this.game); PlayScene.LevelNumber = 0; }
//Constructors public Explorder(PyramidPanic game) : base(game) { this.game = game; this.texture = game.Content.Load<Texture2D>(@"Explorder\Explorer"); this.destinationRectangle.X = 0; this.destinationRectangle.X = 150; }
//Constuctor public Block(PyramidPanic game, string blockName, Vector2 position, BlockCollision blockCollision, Char charItem) { this.game = game; this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Block\" + blockName); this.rectangle = new Rectangle((int)position.X, (int)position.Y, this.texture.Width, this.texture.Height); this.position = position; this.charItem = charItem; }
//Constructor public Scorpion(PyramidPanic game, string pathName, Vector2 position, float speed) { this.game = game; this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Scorpion\Scorpion"); 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 WalkLeft(this); }
//constructor public Scorpion(PyramidPanic game, Vector2 position) { this.game = game; this.position = position; this.texture = game.Content.Load<Texture2D>(@"Scorpion/Scorpion"); this.walkLeft = new WalkLeft(this); this.walkRight = new WalkRight(this); this.state = walkLeft; }
//constructor public Image(PyramidPanic game, String pathnameAsset, Vector2 position) { this.game = game; this.texture = game.Content.Load<Texture2D>(pathnameAsset); this.rectangle = new Rectangle((int)position.X, (int)position.Y, this.texture.Width, this.texture.Height); }
// Constructor public Level(PyramidPanic game, int levelIndex) { this.game = game; this.levelIndex = levelIndex; //Laad het textbestand met behulp van een stream object this.stream = TitleContainer.OpenStream(@"Content\Level\0.txt"); this.LoadAssets(); }
//Constructor public Beetle(PyramidPanic game, Vector2 position, float speed) { this.game = game; this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\Beetles\Beetle"); this.speed = speed; this.position = position; this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width/4, this.texture.Height); this.state = new WalkUp(this); }
//Constructor public Beetle(PyramidPanic game, Vector2 position) { this.game = game; this.position = position; this.texture = game.Content.Load<Texture2D>(@"Beetle\Beetle"); this.walkUp = new WalkUp(this); this.walkDown = new WalkDown(this); this.state = this.walkUp; }
//Constructor public PlayScene(PyramidPanic game) { this.game = game; if (levelNumber == 0 || Score.isDead()) { levelNumber = 0; Score.Initialize(); } this.Initialize(); }
/* Dit is de constructor van de Image class. Hij is meestal public, heeft * dezelfde naam als de class en heeft geen returntype. */ public Image(PyramidPanic game, string pathNameAsset, Vector2 position) { // Geef de het game object mee aan het field this.game this.game = game; this.texture = game.Content.Load<Texture2D>(pathNameAsset); this.rectangle = new Rectangle((int)position.X, (int)position.Y, this.texture.Width, this.texture.Height); }
//Constructor public HelpScene(PyramidPanic game) { this.game = game; this.background = new Image(this.game, @"PlaySceneAssets/background/Background2", Vector2.Zero); this.text = game.Content.Load<Texture2D>(@"PlaySceneAssets/Helper/help"); this.rectangle1 = new Rectangle(300, 0, 40, 40); this.rectangle2 = new Rectangle(295, 420, 40, 40); this.position = Vector2.Zero; this.Initialize(); }
public Tile(PyramidPanic game,string tileName ,Vector2 position,TileCollision tileCollision,char charItem) { this.game = game; this.tileCollision = tileCollision; this.texture = game.Content.Load<Texture2D>(@"PlaySceneAssets\tiles\"+tileName); this.position = position; this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, texture.Width, texture.Height); this.charItem = charItem; }
// Maak de constructor public Scorpion(PyramidPanic game, Vector2 position, int speed) { this.position = position; this.game = game; this.speed = speed; this.texture = this.game.Content.Load<Texture2D>(@"PlayScene\Scorpion"); this.walkRight = new WalkRight(this); this.walkLeft = new WalkLeft(this); this.state = this.walkRight; }
//Constructor public MovingBlock(PyramidPanic game, string blockName, Vector2 location, TileCollision blockCollision, char charItem ) { this.game = game; this.texture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\pushable\" + blockName); //this.colText = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Explorer\CollisionText"); this.startLocation = location; this.Location = location; this.state = new MovingBlockIdle(this); }
// Maak de constructor public Beetle(PyramidPanic game, Vector2 position, int speed) { this.position = position; this.game = game; this.speed = speed; this.texture = this.game.Content.Load<Texture2D>(@"PlayScene\Beetle"); this.walkDown = new WalkDown(this); this.walkUp = new WalkUp(this); this.state = this.walkDown; }
//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.color = Color.White; this.state = new WalkDown(this); }
// Maak de constructor public Explorer(PyramidPanic game, Vector2 position, int speed) { this.position = position; this.game = game; this.speed = speed; this.texture = this.game.Content.Load<Texture2D>(@"PlayScene\Explorer"); this.idle = new ExplorerIdle(this); this.walkRight = new ExplorerWalkRight(this); this.walkLeft = new ExplorerWalkLeft(this); this.walkDown = new ExplorerWalkDown(this); this.state = this.idle; }
//constructor public Scorpion(PyramidPanic game, Vector2 position, float speed) { this.game = game; this.position = position; this.texture = game.Content.Load<Texture2D>(@"PlayScene\Badguys\Scorpion"); this.rectangle = new Rectangle((int)this.position.X + 16, (int)this.position.Y + 16, this.texture.Width / 4, this.texture.Height); this.collisionrec = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width / 4, this.texture.Height); this.speed = speed; this.walkLeft = new WalkLeft(this); this.walkRight = new WalkRight(this); this.state = this.walkRight; }
//constructor public Beetle(PyramidPanic game, Vector2 position, float speed) { this.game = game; this.position = position; this.texture = game.Content.Load<Texture2D>(@"PlayScene\Badguys\Beetle"); this.rectangle = new Rectangle((int)this.position.X + 16,(int)this.position.Y + 16,this.texture.Width/4,this.texture.Height); this.collisionrec = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width / 4, this.texture.Height); this.speed = speed; this.walkUp = new WalkUp(this); this.walkDown = new WalkDown(this); this.state = new WalkDown(this); }
//constructor public Explorer(PyramidPanic game, Vector2 position) { this.game = game; this.position = position; this.texture = game.Content.Load<Texture2D>(@"explorer/Explorer"); this.walkUp = new ExplorerWalkUp(this); this.walkDown = new ExplorerWalkDown(this); this.walkRight = new ExplorerWalkRight(this); this.walkLeft = new ExplorerWalkLeft(this); this.idle = new ExplorerIdle(this); this.state = this.idle; }
//constructor public Explorer(PyramidPanic game,Vector2 position,float speed) { this.initialize(); this.game = game; this.startpos = position; this.texture = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Player\Explorer"); this.CollisionText = this.game.Content.Load<Texture2D>(@"PlaySceneAssets\Player\blokje"); this.position = position; this.rectangle = new Rectangle((int)this.position.X + 16, (int)this.position.Y + 16, texture.Width/4, texture.Height); this.CollisionRect = new Rectangle((int)this.position.X, (int)this.position.Y, texture.Width/4, texture.Height); this.speed = speed; this.state = new Idle(this); }
//Constructor public MenuStartScene(PyramidPanic game) { this.game = game; this.Initialize(); }
//constructor public LevelEditorScene(PyramidPanic game) { this.game = game; }
//constructor public HelpScene(PyramidPanic game) { this.game = game; }
//constructor public Level(PyramidPanic game, int levelIndex) { this.game = game; this.levelPath = @"Content\PlaySceneAssets\levels\1.txt"; this.LoadAssets(); }
//constructor public LoadScene(PyramidPanic game) { this.game = game; }
//constructor public QuitScene(PyramidPanic game) { this.game = game; }
//Constructor public LevelEditorScene(PyramidPanic game) { this.game = game; this.Initialize(); }
//Constructor public Panel(PyramidPanic game, Vector2 position) { this.game = game; this.position = position; this.Initialize(); }
//constructor public PlayScene(PyramidPanic game) { this.game = game; this.Initialize(); }
//constructor public ScoreScene(PyramidPanic game) { this.game = game; }