This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Our Ship Shooter Game. | |
let ship; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background("black"); | |
// Build the ship and store it in our ship variable. | |
ship = new Ship(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Illustrates the basics of object oriented programming. | |
A class defines a blueprint to create something. The `new` operator builds an objects from that class. | |
*/ | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background("blue"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background("red"); | |
let pe = new ParticleEmitter(); | |
pe.draw(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let xpos = 0; | |
let ypos = 0; | |
let xdir = 10; | |
let ydir = 10; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background("black"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PGM PARM(&LIB &MEMBER) | |
DCL VAR(&LIB) TYPE(*CHAR) LEN(20) | |
DCL VAR(&MEMBER) TYPE(*CHAR) LEN(20) | |
DCL VAR(&IPATH) TYPE(*CHAR) LEN(150) + | |
VALUE("/QSYS.LIB/") | |
/* You will want to change this to your required path */ | |
DCL VAR(&SPATH) TYPE(*CHAR) LEN(150) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ship; | |
let enemies = []; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background("black"); | |
ship = new Ship(windowWidth / 2, windowHeight / 2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ship; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background("black"); | |
ship = new Ship(windowWidth / 2, windowHeight / 2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Class that defines an object that can play a simple sound given a frequency. | |
class Pad { | |
constructor(x, y, freq) { | |
this.x = x; | |
this.y = y; | |
this.width = 100; | |
this.height = 100; | |
this.freq = freq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Flexbox layouts</title> | |
<link href="https://fonts.googleapis.com/css?family=Dancing+Script&display=swap" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href='css/styles.css'/> | |
<link rel="stylesheet" type="text/css" href='css/layout.css'/> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: AliceBlue; | |
margin: 0; | |
padding: 0; | |
font-family: 'Roboto', sans-serif; | |
} | |
a { | |
color: #FF0000; | |
font-size: 2rem; |