public void Draw(FinishZone finishZone) { GL.BindTexture(TextureTarget.Texture2D, _textures[finishZone.Texture]); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); new RectangleDrawer().Draw(finishZone.Form); GL.Disable(EnableCap.Blend); }
public void Draw(FinishZone finishZone) { GL.BindTexture(TextureTarget.Texture2D, _textures[finishZone.Texture]); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); new RectangleDrawer().Draw(finishZone.Form); GL.Disable(EnableCap.Blend); }
public Room(RectangleF form, int texture) { _form = form; _texture = texture; //_obstacles.Add(new Obstacle(new RectangleF(form.Left + 0.84f, form.Bottom + 1.13f, 0.32f, // -0.26f), 1)); _border = new RoomBorder(0.15f, 0.15f, 0); _finishZone = new FinishZone(new RectangleF(form.Left + 0.85f, form.Bottom + 0.7f, 0.3f, -0.3f), 8); //_enemies.Add(new Enemy(form.Left + 0.5f, form.Bottom + 0.5f, 630.0f/2000, 371.0f/2000, 0.15f/60, 1000, 4)); }
public BossRoom(RectangleF form, int texture, Boss boss) : base(form, texture) { _boss = boss; _enemies.Add(_boss); _finishZone = new FinishZone(new RectangleF(_form.X + 0.7f, _form.Bottom + 0.9f, 0.2f, -0.2f), 8); }
public bool IsCollided(Player player, FinishZone finishZone) { var intersectionDeter = new IntersectionDeterminant(); return(intersectionDeter.IsIntersected(player.Form, finishZone.Form)); }
private void PlayerFinishZoneHandle(Player player, FinishZone finishZone) { if (_game.Mode == "SuperHero") { Console.WriteLine("You won! Your code phrase is 'Dog, dog never changes'"); } else { Console.WriteLine("You won! But it was too easy"); } _game.Exit(); }
public bool IsCollided(Player player, FinishZone finishZone) { var intersectionDeter = new IntersectionDeterminant(); return intersectionDeter.IsIntersected(player.Form, finishZone.Form); }