示例#1
0
 //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);
 }
示例#2
0
        // 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();
        }
示例#3
0
 static void Main(string[] args)
 {
     using (PyramidPanic game = new PyramidPanic())
     {
         game.Run();
     }
 }
示例#4
0
 //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);
 }
示例#5
0
 //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);
 }
示例#6
0
        //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();
        }
示例#7
0
 //construction
 public Level(PyramidPanic game,int levelIndex)
 {
     this.game = game;
     this.levelPath = @"Content\PlaySceneAssets\Levels\"+levelIndex+".txt";
     this.loadAssets();
     Score.initialize();
 }
示例#8
0
        //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();
        }
示例#9
0
 // 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;
 }
示例#10
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;
 }
示例#11
0
 //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;
 }
示例#12
0
 //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);
 }
示例#13
0
 //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;
 }
示例#14
0
 //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);
 }
示例#15
0
        // 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();
        }
示例#16
0
 //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);
 }
示例#17
0
 //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;
 }
示例#18
0
 //Constructor
 public PlayScene(PyramidPanic game)
 {
     this.game = game;
     if (levelNumber == 0 || Score.isDead())
     {
         levelNumber = 0;
         Score.Initialize();
     }
     this.Initialize();
 }
示例#19
0
 /* 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);
 }
示例#20
0
 //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();
 }
示例#21
0
 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;
 }
示例#22
0
文件: Scorpion.cs 项目: rutger438/PP
 // 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;
 }
示例#23
0
 //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);
 }
示例#24
0
文件: Beetle.cs 项目: rutger438/PP
 // 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;
 }
示例#25
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.color = Color.White;
     this.state = new WalkDown(this);
 }
示例#26
0
 // 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;
 }
示例#27
0
 //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;
 }
示例#28
0
 //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);
 }
示例#29
0
 //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;
 }
示例#30
0
 //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);
 }
示例#31
0
 //Constructor
 public MenuStartScene(PyramidPanic game)
 {
     this.game = game;
     this.Initialize();
 }
示例#32
0
 //constructor
 public LevelEditorScene(PyramidPanic game)
 {
     this.game = game;
 }
示例#33
0
 //constructor
 public HelpScene(PyramidPanic game)
 {
     this.game = game;
 }
示例#34
0
 //constructor
 public Level(PyramidPanic game, int levelIndex)
 {
     this.game      = game;
     this.levelPath = @"Content\PlaySceneAssets\levels\1.txt";
     this.LoadAssets();
 }
示例#35
0
 //constructor
 public LoadScene(PyramidPanic game)
 {
     this.game = game;
 }
示例#36
0
 //constructor
 public QuitScene(PyramidPanic game)
 {
     this.game = game;
 }
示例#37
0
 //Constructor
 public LevelEditorScene(PyramidPanic game)
 {
     this.game = game;
     this.Initialize();
 }
示例#38
0
 //Constructor
 public Panel(PyramidPanic game, Vector2 position)
 {
     this.game     = game;
     this.position = position;
     this.Initialize();
 }
示例#39
0
 //constructor
 public PlayScene(PyramidPanic game)
 {
     this.game = game;
     this.Initialize();
 }
示例#40
0
 //constructor
 public ScoreScene(PyramidPanic game)
 {
     this.game = game;
 }