public Player(Texture2D texture, Vector2 c, PlayerManager pm, Effect effect,bool fromDup) { this.texture = texture; frameHeight = texture.Height; frameWidth = texture.Width; playerManager = pm; this.effect = effect; //setUpVertices(points); center = c; setVerts(c); this.fromDup = fromDup; if (fromDup) { if (AcidManager.checkCollision(this, center, size)) return; PowerUpManager.checkCollision(this, center, size); if ((isInHole = HoleManager.checkCollision(this, center, size, playerManager.getNumOfPlayers())) && GameManager.level != 3) { playerManager.changePlayerType(this, "static", center, false); } } else { isInHole = HoleManager.isStillInHole(this,center,size); } }
public Player(Texture2D texture, List<List<Vector3>> points, PlayerManager pm, Effect effect) { this.texture = texture; frameHeight = texture.Height; frameWidth = texture.Width; playerManager = pm; this.effect = effect; setUpVertices(points); }
// XXX need to recieve all the instances: bordMan, playerMan, holeMan etc. public GameManager(SpriteFont f, SpriteFont sf, HoleManager h, PlayerManager p, PowerUpManager pu, Board bo) { font = f; scoreFont = sf; holeManager = h; playerManager = p; powerupManager = pu; board = bo; gamestate = GameState.normal; folds = 0; level = 1; endLevel = 1; }
public GameManager(SpriteFont f, SpriteFont sf, HoleManager h, AcidManager a, PlayerManager p, PowerUpManager pu, Board bo,Table tab, Texture2D st, Texture2D help, Texture2D ls) { font = f; scoreFont = sf; holeManager = h; acidManager = a; playerManager = p; powerupManager = pu; board = bo; table = tab; gamestate = GameState.normal; folds = 0; level = 0; startScreen = st; helpScreen = help; levelScreen = ls; for (int i = 0; i <= endLevel; i++) { levelsPics.Add(Game1.content.Load<Texture2D>("level" + i)); levelsPicsBtn.Add(new Rectangle(300 + ((levelsPics.ElementAt(i).Width+30) * ((i<3)? i : i-3)), (i < 3) ? 220 : 400, levelsPics.ElementAt(i).Width, levelsPics.ElementAt(i ).Height)); } }
public DuplicatePlayer(Texture2D texture, Vector2 c, PlayerManager pm, Effect effect, bool fromDup) : base(texture, c, pm, effect, fromDup) { type = "duplicate"; }
public StaticPlayer(Texture2D texture, Vector2 c, PlayerManager pm, Effect effect, bool fromDup) : base(texture, c, pm, effect, fromDup) { type = "static"; }
public StaticPlayer(Texture2D texture, List<List<Vector3>> points, PlayerManager pm, Effect effect) : base(texture, points, pm, effect) { }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { device = graphics.GraphicsDevice; // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); SpriteFont font = Content.Load<SpriteFont>(@"font"); SpriteFont scoreFont = Content.Load<SpriteFont>("scoreFont"); HoleManager holeManager = new HoleManager(Content.Load<Texture2D>("hole2"), Content.Load<Effect>("effects")); AcidManager acidManager = new AcidManager(Content.Load<Texture2D>("acid"), Content.Load<Effect>("effects")); PlayerManager playerManager = new PlayerManager(Content.Load<Texture2D>("gum"), Content.Load<Effect>("effects"), Content.Load<Texture2D>("dupGum"), Content.Load<Texture2D>("staticGum")); PowerUpManager powerupManager = new PowerUpManager(Content.Load<Texture2D>("inkspot"), Content.Load<Effect>("effects")); Board board = new Board(Content.Load<Texture2D>("paper"), Content.Load<Effect>("effects")); Table table = new Table(Content.Load<Model>("Table")); camera = new Camera(this); input = new InputHandler(this); ourGame = new GameManager(font, scoreFont, holeManager, acidManager, playerManager, powerupManager, board,table, Content.Load<Texture2D>("startScreen"), Content.Load<Texture2D>("help"), Content.Load<Texture2D>("levelsScreen")); ourGame.loadCurrLevel(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { device = graphics.GraphicsDevice; // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); SpriteFont font = Content.Load<SpriteFont>("font"); SpriteFont scoreFont = Content.Load<SpriteFont>("scoreFont"); HoleManager holeManager = new HoleManager(Content.Load<Texture2D>("hole2"), Content.Load<Effect>("effects")); PlayerManager playerManager = new PlayerManager(Content.Load<Texture2D>("gummy2"), Content.Load<Effect>("effects")); PowerUpManager powerupManager = new PowerUpManager(Content.Load<Texture2D>("inkspot"), Content.Load<Effect>("effects")); Board board = new Board(Content.Load<Texture2D>("paper"), Content.Load<Effect>("effects")); camera = new Camera(this); input = new InputHandler(this); ourGame = new GameManager(font, scoreFont, holeManager, playerManager, powerupManager,board); ourGame.loadCurrLevel(); }
public NormalPlayer(Texture2D texture, Vector2 c, PlayerManager pm, Effect effect, bool fromDup) : base(texture, c, pm, effect, fromDup) { type = "normal"; }