public AlertScreen(bGame game, bGameState nextWorld, Func<GameTime, SpriteBatch, Matrix, int> renderAlert) : base() { this.game = game; this.renderAlert = renderAlert; this.nextWorld = nextWorld; }
public Title(bGame game, bGameState nextWorld = null) : base() { this.game = game; if (nextWorld == null) nextWorld = new Ring(game); this.nextWorld = nextWorld; }
public PlayerWeapon(bGame game) { this.game = game; hotspots = new Dictionary<string, List<Point>>(); string weaponName = "mace"; // Read file Queue<string> lines = readFile("Assets/" + weaponName + ".cfg"); // Begin actual parsing // Fetch sheet general info int animationsCount, width, height; string[] lineValues = lines.Dequeue().Split(new char[]{' '}); if (lineValues.Length < 3) throw new Exception("Couldn't parse sheet general info line"); animationsCount = int.Parse(lineValues[0]); width = int.Parse(lineValues[1]); height = int.Parse(lineValues[2]); // Create graphic with read parameters graphic = new bSpritemap(game.Content.Load<Texture2D>(weaponName), width, height); // Fetch and create animations for (int i = 0; i < animationsCount; i++) { Pair<bAnim, List<Point>> parseResult = parseAnimation(lines); bAnim anim = parseResult.first; if (anim == null) throw new Exception("Could't parse animation " + i + " of " + animationsCount); else { hotspots[anim.name] = parseResult.second; graphic.add(anim); } } }
public override void render(SpriteBatch sb, bGame game, Color color) { if (connected) base.render(sb, game, color); foreach (bMask mask in masks) { // lazy (x,y) update updateSubmask(mask); mask.render(sb, game, color); } }
public Ring(bGame game) { this.game = game; }
public virtual void render(SpriteBatch sb, bGame game, Color color) { Texture2D rect = bDummyRect.sharedDummyRect(game); sb.Draw(rect, this.rect, color); }