Commit eab99095 authored by a.guest's avatar a.guest

Initial Commit

parents
Pipeline #322 failed with stages
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="core.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Hello Processing</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
File added
import processing.core.PApplet;
public class UsingProcessing extends PApplet {
public static void main(String[] args) {
// Launch this class as a processing application
PApplet.main("UsingProcessing");
}
public void settings() {
// initialise the window size
size(300,300);
}
public void setup() {
// set the background colour of the window
fill(120,50,240);
}
public void gameLoop()
{
// gameLoop is a standard structure in games
// this method gets called over and over again
// A game loop has three main responsibilities
// 1. it should handle any input
// 2. it should update the state of the game
// 3. it should render the game to the screen
processInput();
update();
render();
}
public void processInput()
{
// does nothing, will eventually handle mouse and keyboard input
}
public void update()
{
// does nothing, will eventually update the game state
}
public void render()
{
// renders (draws) the game to the screen
ellipse(width/2, height/2, second(), second());
}
public void draw() {
// Processing calls the method draw repeatedly.
// This draw() simply calls the gameLoop() method for a more useful method name
gameLoop();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment