Example #1
0
 public Terrain(WormsGame parent)
     : base(parent)
 {
     this._position = new Vector2(0, 0);
     this._velocity = new Vector2(0, 0);  //Terrain does not need a velocity.
     this._speed = 0;     //Terrain does need a speed.
 }
Example #2
0
 public Player(WormsGame parent)
     : base(parent)
 {
     this._position = new Vector2(100, 100);
     this._velocity = new Vector2(0.0f, 0.0f);
     this._speed = 0;
 }
Example #3
0
 public PlayerRendering(WormsGame parent, GameObject container)
     : base(parent, container)
 {
     this.AddTexture("RedPlayerWithShotgun", "Default");
     this._activeTexture = _textures["Default"];
 }
            protected Dictionary<string, Texture2D> _textures; //Dictionary to organize textures by name. TODO: SpriteSheets & XML

            #endregion Fields

            #region Constructors

            //CONSTRUCTOR
            public RenderingComponent(WormsGame parent, GameObject container)
                : base(parent, container)
            {
                _textures = new Dictionary<string, Texture2D>();
                _sourceBatch = _parent._spriteBatch;
            }
Example #5
0
 //Variables
 //Constructor
 public InputComponent(WormsGame parent, GameObject container)
     : base(parent, container)
 {
 }
Example #6
0
 static void Main()
 {
     using (var game = new WormsGame())
         game.Run();
 }
Example #7
0
 public TerrainRendering(WormsGame parent, GameObject container)
     : base(parent, container)
 {
     this.AddTexture("TestTerrain", "Default");
     this._activeTexture = this._textures["Default"];
 }
Example #8
0
 public PlayerPhysics(WormsGame parent, GameObject container)
     : base(parent, container)
 {
 }
Example #9
0
            public WormsGame _parent; //Parent should always be the single "WormGame"

            #endregion Fields

            #region Constructors

            //CONSTRUCTOR
            public Component(WormsGame parent, GameObject container)
            {
                _parent = parent;
                _container = container;
            }
Example #10
0
 //Constructor
 public PlayerInput(WormsGame parent, GameObject container)
     : base(parent, container)
 {
 }
Example #11
0
 public PlayerTransform(WormsGame parent, GameObject container)
     : base(parent, container)
 {
 }
 //Constructor
 public TransformComponent(WormsGame parent, GameObject container)
     : base(parent, container)
 {
 }
Example #13
0
            protected Vector2 _velocity; //The objects current velocity.

            #endregion Fields

            #region Constructors

            //CONSTRUCTOR
            public GameObject(WormsGame parent)
            {
                this._parent = parent;
                this._components = new Dictionary<string, Component>();
            }
Example #14
0
 //Constructor
 public PhysicsComponent(WormsGame parent, GameObject container)
     : base(parent, container)
 {
     this._collision = false;
 }