Exemplo n.º 1
0
 public GameObject(World world, Vector2 position, Vector2 initialVelocity, Vector2 size, Texture2D texture,
     bool shouldCollide, bool gravitable, int health)
     : this(world, position, initialVelocity, size, new List<AnimationSet> 
     {
         new AnimationSet("_", texture, 1, texture.Width, 1, false, 0)
     }, "_", shouldCollide, gravitable, health)
 {
 }
Exemplo n.º 2
0
 public GameObject(World world, Vector2 position, Vector2 initialVelocity, Vector2 size, List<AnimationSet> animations,
     String initialAnimation, bool shouldCollide, bool gravitable, int health)
 {
     this.World = world;
     this.Position = position;
     this.Velocity = initialVelocity;
     this.Size = size;
     this.Animations = animations;
     this.CurAnimation = FindAnimationByName(initialAnimation);
     this.ShouldCollide = shouldCollide;
     this.Health = health;
     this.Color = Color.White;
     this.gravitable = gravitable;
 }
Exemplo n.º 3
0
 public Player(World world, Vector2 position)
     : base(world, position, Vector2.Zero, new Vector2(SIZE_X, SIZE_Y), ResourceManager.GetTexture("Pixel"), true, true, HEALTH)
 {
 }
Exemplo n.º 4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            ScreenResolution = new Vector2(graphics.PreferredBackBufferHeight, graphics.PreferredBackBufferWidth);
            ResourceManager.LoadContent(Content);

            world = new World((int)ScreenResolution.X, (int)ScreenResolution.Y);
        }
Exemplo n.º 5
0
 public Alien(World world, Vector2 position, Vector2 initialSpeed)
     : base(world, position, initialSpeed, new Vector2(SIZE_X, SIZE_Y), ResourceManager.GetTexture("Pixel"), true, true, BASE_HEALTH)
 {
 }
Exemplo n.º 6
0
 public Projectile(World world, Vector2 position, Vector2 direction, Vector2 speed)
     : base(world, position, speed, new Vector2(SIZE_X, SIZE_Y), ResourceManager.GetTexture("Pixel"), true, false, 1)
 {
 }