Exemplo n.º 1
0
 public virtual void LoadContent(ContentPool Content, ObjectPool Objects)
 {
     this.Content = Content;
     Content.AddTexture2D("Bullets\\bullet", this.name + "_bullet");
     Content.AddTexture2D("Weapons\\debug", this.name + "_gun");
     this.ObjWeapon = (ObjectWeapon)Objects.AddObject(ObjectPool.ObjectTypes.Weapon, "Player" + this.name, this.name + "_gun");
 }
Exemplo n.º 2
0
 public SplashScreen(GraphicsDevice graphicsDevice, ObjectPool Objects, ContentPool Content)
 {
     this.Objects = Objects;
     this.Content = Content;
     this.ScreenName = "Menu";
     this.GraphicsDevice = graphicsDevice;
     this.Batch = new SpriteBatch(GraphicsDevice);
 }
Exemplo n.º 3
0
 public ObjectBullet(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.Position = new Vector2(0, 0);
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
 }
Exemplo n.º 4
0
 public ObjectGround(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
     this.BoundingRectangle = new Rectangle(Convert.ToInt32(this.Position.X), Convert.ToInt32(this.Position.Y), Texture.Width, Texture.Height);
 }
Exemplo n.º 5
0
 public WeaponEngine(ContentPool Content, ObjectPool Objects)
 {
     this.Content = Content;
     this.Objects = Objects;
     this.availableWeapons = new List<WeaponBase>();
     this.currentWeapon = null;
     GameStats.CreateStat("FiredBullets", 0);
 }
 public ObjectEnemySpawner(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
     timeSinceLastSpawn = DateTime.Now;
 }
 public ObjectAchivementShelf(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
     this.Position = new Vector2(GameData.ScreenSize.Width - Texture.Width, GameData.ScreenSize.Height);
 }
 public ObjectDebugPoint(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
     this.Position = new Vector2(0 - (Texture.Width / 2), 0 - (Texture.Height / 2));
 }
Exemplo n.º 9
0
 public ObjectButton(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.Position = new Vector2(0, 0);
     this.contentKey = ContentKey;
     this.contentKeySel = ContentKey + "_Selected";
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
 }
Exemplo n.º 10
0
 public ObjectEnemy(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.Position = new Vector2(50, 50);
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
     this.BoundingRectangle = new Rectangle(Convert.ToInt32(this.Position.X - ((Texture.Width * scale) / 2)), Convert.ToInt32(this.Position.Y - ((Texture.Height * scale) / 2)), Convert.ToInt32((Texture.Width * scale) - ((Texture.Width * scale) / 2)), Convert.ToInt32((Texture.Height * scale) - ((Texture.Height * scale) / 2)));
 }
Exemplo n.º 11
0
 public GameCore(int width, int height, ContentPool content, ObjectPool objects, GraphicsDeviceManager graphics, Game game)
 {
     Game = game;
     Graphics = graphics;
     Width = width;
     Height = height;
     Content = content;
     Objects = objects;
 }
Exemplo n.º 12
0
 public ObjectPlayer(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.Position = new Vector2(0, 0);
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
     GameStats.CreateStat("DeadCount", 0);
 }
Exemplo n.º 13
0
 public MapTest(SpriteBatch batch, ContentPool Content, ObjectPool Objects)
 {
     this.ObjectPool = Objects;
     this.Content = Content;
     this.Batch = batch;
     this.Width = 1000;
     this.Height = 1000;
     Initializer();
 }
Exemplo n.º 14
0
 public ObjectWeapon(string Key, ObjectPool.ObjectTypes Type, string ContentKey, ContentPool contentPool)
 {
     this.FixedOffset = new Vector2(25, 0);
     this.Position = new Vector2(0, 0);
     this.contentKey = ContentKey;
     this.Key = Key;
     this.Type = Type;
     this.Content = contentPool;
 }
Exemplo n.º 15
0
 public void LoadContent(ObjectPool Objects, ContentPool Content)
 {
     foreach (string key in achivementTable.Keys)
     {
         AchivementBase b = (AchivementBase)achivementTable[key];
         b.LoadContent(Content);
     }
     Content.AddTexture2D("Misc\\achivementShelf", "achivementShelf");
     shelf = (ObjectAchivementShelf)Objects.AddObject(ObjectPool.ObjectTypes.AchivementShelf, "achivementShelf", "achivementShelf");
     shelf.OnMessageFinished += new ObjectAchivementShelf.OnMessageFinishedDelegate(shelf_OnMessageFinished);
 }
Exemplo n.º 16
0
 public Main()
 {
     gamerServices = new GamerServicesComponent(this);
     graphics = new GraphicsDeviceManager(this);
     //graphics.IsFullScreen = true;
     graphics.PreferredBackBufferWidth = 800;
     graphics.PreferredBackBufferHeight = 600;
     Content.RootDirectory = "Content";
     contentPool = new ContentPool(Content);
     objectPool = new ObjectPool(contentPool);
     gameCore = new GameCore(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight, contentPool, objectPool, graphics, this);
 }
Exemplo n.º 17
0
 public GameScreen(GraphicsDevice graphicsDevice, ObjectPool Objects, ContentPool Content, GameCore gameCore)
 {
     this.Objects = Objects;
     this.Content = Content;
     this.ScreenName = "Game";
     this.GraphicsDevice = graphicsDevice;
     this.Batch = new SpriteBatch(GraphicsDevice);
     testmap = new MapTest(Batch, Content, Objects);
     weaponEngine = new WeaponEngine.WeaponEngine(Content, Objects);
     this.gameCore = gameCore;
     GameStats.CreateStat("KilledEnemies", 0);
 }
Exemplo n.º 18
0
 public DebugVar(string FontContentKey, ContentPool content)
 {
     Content = content;
     vars = new Hashtable();
     font = content.GetSpriteFont(FontContentKey).SpriteFont;
 }
Exemplo n.º 19
0
        public virtual void LoadContent(ContentPool Content)
        {

        }
Exemplo n.º 20
0
 public override void LoadContent(ContentPool Content, ObjectPool Objects)
 {
     base.LoadContent(Content, Objects);
 }
Exemplo n.º 21
0
 public ObjectPool(ContentPool content)
 {
     Content = content;
     objectTable = new Hashtable();
 }