Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DodgeUpProject/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions DodgeUpProject/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions DodgeUpProject/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions DodgeUpProject/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions DodgeUpProject/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions DodgeUpProject/.idea/libraries/core.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions DodgeUpProject/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added DodgeUpProject/data/broken-heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/character-crushed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/character.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/game-background1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/game-background2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/game-background3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/main-background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DodgeUpProject/data/music.mp3
Binary file not shown.
17 changes: 17 additions & 0 deletions DodgeUpProject/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>DodgeUpProject</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

</project>
86 changes: 86 additions & 0 deletions DodgeUpProject/src/main/java/Block.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import processing.core.PApplet;

public class Block implements Interface{


private static PApplet pApplet=Main.processing;
public static int speedY=-80;
public static int BlockHeight=50;
public static int BlockWidth=30;
private int BlockX;
private int blockX;
private int BlockY;
private int BlockColorR;
private int BlockColorG;
private int BlockColorB;
public Block(int blockX,int blockY,int blockColorR,int blockColorG,int blockColorB) {
BlockX=blockX;
BlockY=blockY;
BlockColorR=blockColorR;
BlockColorG=blockColorG;
BlockColorB=blockColorB;

}
@Override
public void makeObjects() {
for (int i=0;i<50;i++)
{
Main.blocks.add(new Block(blockX+10,speedY,BlockColorR,BlockColorG,BlockColorB));
speedY-=30;
Main.blocks.add(new Block(blockX+90,speedY+80,BlockColorR,BlockColorG,BlockColorB));
speedY-=40;
Main.blocks.add(new Block(blockX+180,speedY+40,BlockColorR,BlockColorG,BlockColorB));
speedY-=90;
Main.blocks.add(new Block(blockX+260,speedY+80,BlockColorR,BlockColorG,BlockColorB));
speedY-=10;
Main.blocks.add(new Block(blockX+320,speedY+150,BlockColorR,BlockColorG,BlockColorB));
if(i%2==0)
blockX+=40;
else blockX-=40;
}

}

public int getBlockY() {
return BlockY;
}

public void setBlockY(int blockY) {
BlockY = blockY;
}

public int getBlockX() {
return BlockX;
}

public void setBlockX(int blockX) {
BlockX = blockX;
}

public int getBlockColorR() {
return BlockColorR;
}

public void setBlockColorR(int blockColorR) {
BlockColorR = blockColorR;
}

public int getBlockColorG() {
return BlockColorG;
}

public void setBlockColorG(int blockColorG) {
BlockColorG = blockColorG;
}

public int getBlockColorB() {
return BlockColorB;
}

public void setBlockColorB(int blockColorB) {
BlockColorB = blockColorB;
}



}
3 changes: 3 additions & 0 deletions DodgeUpProject/src/main/java/Interface.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public interface Interface {
void makeObjects();
}
Loading