Example #1
0
 public void Draw(Lever lever)
 {
     GL.BindTexture(TextureTarget.Texture2D, _textures[lever.Textures[lever.CurrentState]]);
     GL.Enable(EnableCap.Blend);
     GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
     new RectangleDrawer().Draw(lever.Form);
     //GL.BindTexture(TextureTarget.Texture2D, _textures[3]);
     //new RectangleDrawer().Draw(lever.InteractionForm);
     GL.Disable(EnableCap.Blend);
 }
Example #2
0
        public bool IsCollided(Player player, Lever lever)
        {
            var intersectionDeter = new IntersectionDeterminant();

            return(intersectionDeter.IsIntersected(player.Form, lever.Form));
        }