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. }
public Player(WormsGame parent) : base(parent) { this._position = new Vector2(100, 100); this._velocity = new Vector2(0.0f, 0.0f); this._speed = 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; }
//Variables //Constructor public InputComponent(WormsGame parent, GameObject container) : base(parent, container) { }
static void Main() { using (var game = new WormsGame()) game.Run(); }
public TerrainRendering(WormsGame parent, GameObject container) : base(parent, container) { this.AddTexture("TestTerrain", "Default"); this._activeTexture = this._textures["Default"]; }
public PlayerPhysics(WormsGame parent, GameObject container) : base(parent, container) { }
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; }
//Constructor public PlayerInput(WormsGame parent, GameObject container) : base(parent, container) { }
public PlayerTransform(WormsGame parent, GameObject container) : base(parent, container) { }
//Constructor public TransformComponent(WormsGame parent, GameObject container) : base(parent, container) { }
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>(); }
//Constructor public PhysicsComponent(WormsGame parent, GameObject container) : base(parent, container) { this._collision = false; }