public PoolingSystem(CavemanRunner game, int initialSize) { for (int i = 0; i < initialSize; i++) { //availableList.Add(new GameObject(game)); } }
public PoolingSystem(CavemanRunner game, int initialSize) { for (int i = 0; i < initialSize; i++) { //availableList.Add(new GameObject(game)); } }
public void InitializeObjects(CavemanRunner game, Texture2D texture, Renderer.AnchorPoint anchor) { foreach (T o in reservedObjects) { o.Initialize(game, texture, anchor); o.collider.SetSize(texture.Bounds.Width, texture.Bounds.Height); } }
public void Initialize(CavemanRunner game, Texture2D texture, Vector2 velocity, int mass, bool isStatic = false, Renderer.AnchorPoint anchor = Renderer.AnchorPoint.Center) { physics = new Physics(mass, isStatic, velocity); physics.Initialize(this); this.Initialize(game, texture, anchor); }
public void Initialize(CavemanRunner game, Texture2D texture, Vector2 velocity, int mass, bool isStatic = false, Renderer.AnchorPoint anchor = Renderer.AnchorPoint.Center) { physics = new Physics(mass, isStatic, velocity); physics.Initialize(this); this.Initialize(game, texture, anchor); }
public void InitializeObjects(CavemanRunner game, Texture2D texture, Vector2 velocity, int mass, bool isStatic = false, Renderer.AnchorPoint anchor = Renderer.AnchorPoint.Center, float colliderScaleRatio = 1f) { foreach (T o in reservedObjects) { o.Initialize(game, texture, velocity, mass, isStatic, anchor); o.collider.SetSize((int)(texture.Bounds.Width * colliderScaleRatio), (int)(texture.Bounds.Height * colliderScaleRatio)); } }
private void InitializeGameObject() { if (_game == null) { _game = XamlGame <CavemanRunner> .Create("", this); _game.EndGameEvent += new CavemanRunner.EndGameHandler(EndGame); LoadPattern(new Uri("Patterns/pattern1.txt", UriKind.Relative)); LoadPattern(new Uri("Patterns/pattern2.txt", UriKind.Relative)); LoadPattern(new Uri("Patterns/pattern3.txt", UriKind.Relative)); LoadPattern(new Uri("Patterns/pattern4.txt", UriKind.Relative)); } }
public void Initialize(CavemanRunner game, Texture2D texture, Renderer.AnchorPoint anchor) { this.game = game; collider = new Collider(); collider.Bounds = texture.Bounds; renderer = new Renderer(); renderer.Texture = texture; renderer.Initialize(this, anchor); collider.Initialize(this); if(physics == null) { physics = new Physics(); physics.Initialize(this); } transform = new Transform(this); spriteBatch = game.spriteBatch; }
public void Initialize(CavemanRunner game, Texture2D texture, Renderer.AnchorPoint anchor) { this.game = game; collider = new Collider(); collider.Bounds = texture.Bounds; renderer = new Renderer(); renderer.Texture = texture; renderer.Initialize(this, anchor); collider.Initialize(this); if (physics == null) { physics = new Physics(); physics.Initialize(this); } transform = new Transform(this); spriteBatch = game.spriteBatch; }
public void Draw(CavemanRunner game) { game.spriteBatch.Draw(game.halfScreen, bounds, Color.White); }
private void InitializeGameObject() { if (_game == null) { _game = XamlGame<CavemanRunner>.Create("", this); _game.EndGameEvent += new CavemanRunner.EndGameHandler(EndGame); LoadPattern(new Uri("Patterns/pattern1.txt", UriKind.Relative)); LoadPattern(new Uri("Patterns/pattern2.txt", UriKind.Relative)); LoadPattern(new Uri("Patterns/pattern3.txt", UriKind.Relative)); LoadPattern(new Uri("Patterns/pattern4.txt", UriKind.Relative)); } }
public void Initialize(CavemanRunner game, Texture2D[] textureArray, Vector2 velocity, int mass, bool isStatic = false, Renderer.AnchorPoint anchor = Renderer.AnchorPoint.Center) { textures = new Texture2D[textureArray.Length]; this.Initialize(game, textures[0], anchor); }
public void Initialize(CavemanRunner game, Texture2D texture, Renderer.AnchorPoint anchor) { base.Initialize(game, texture, anchor); }
public void Draw(CavemanRunner game) { game.spriteBatch.Draw(game.halfScreen, bounds, Color.White); }
public void Initialize(CavemanRunner game, Texture2D[] textureArray, Vector2 velocity, int mass, bool isStatic = false, Renderer.AnchorPoint anchor = Renderer.AnchorPoint.Center) { textures = new Texture2D[textureArray.Length]; this.Initialize(game, textures[0], anchor); }
public void Initialize(CavemanRunner game, Texture2D texture, Renderer.AnchorPoint anchor) { base.Initialize(game, texture, anchor); }