Skip to content
Snippets Groups Projects
Select Git revision
  • 2d99e3581a6ca0af76d8328431fe5f970c6c8c3c
  • master default protected
  • hai
  • isaac
  • CheHao
  • Eldar
  • mpriymak
  • master-before-merging-with-hai
  • master-before-merging-with-isaac
  • rmi-working-before-merging-with-isaac
  • all-code-merged-by-hai-v1
11 results

ChatScreen.java

Blame
  • Forked from Ho Dac Hai / COMP90015-DSAss2-InfinityMonkeys-remaster
    Source project has a limited visibility.
    Pipe.java 790 B
    import bagel.*;
    
    public class Pipe {
        private final double velocity = -5;
        private double pos = Window.getWidth(); /* x-coord at spawn */
        private final int pixelGap = 168;
    
        /* the higher this value the higher the pipe gap spawns, vice versa */
        private final int initialY = 50; /* y-value of pipe at spawn */
    
        private Image pipeImage = new Image("res/pipe.png");
    
        public void Pipe() {
    
        }
    
        public void Render() {
            /* upside down pipe */
            this.pipeImage.draw(this.pos, -this.initialY);
    
            /* straight up pipe */
            DrawOptions options = new DrawOptions();
            this.pipeImage.draw(this.pos, Window.getHeight() -this.initialY +this.pixelGap,
                    options.setRotation(Math.PI));
    
            this.pos += this.velocity;
        }
    }