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
// A basic sketch of a class to parse and manage/hold color schemes | |
// from Adobe's Kuler (or any other list of hex value formatted colors) | |
// starting with a string of comma-separate hex color values | |
class Kuler | |
{ | |
String colors = ""; // Put the sequence of comma-separated Kuler hex values here | |
String[] colorList; | |
int[] cList; | |
int numColors; |
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
String toString(CircleShape circle) | |
{ | |
StringBuffer buff = new StringBuffer(); | |
Field[] fields = circle.getClass().getDeclaredFields(); | |
for (int i = 0; i < fields.length; i++) | |
{ | |
//println("Field " + i + " is " + fields[i].getName()); | |
} |
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
var y = 0; | |
//Column Two | |
for (i=63; i<128; i+=1){ //i variable stands for alpha value | |
//the loop adds one to the alpha value until it equals 176 | |
//for (var y=0; y<=630; y+=10){ //y variable stands for the y coordinate of rectangle | |
//the loop adds 10 to the y coordinate until it equals 630 | |
fill(255, 0, 0, i); | |
rect(30, y, 20, 5); //I added 30 to the x coordinate of the rectangle to | |
//add space between the columns | |
y+=10; |
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
// Column 2. Draws 64 rectangles in descending order of transparency in a second column. | |
var y = 0; | |
for (i = 65; i < 128; i += 1) { | |
//for (y = 0; y <= 640; y += 10) { | |
fill(0, 255, 0, i += 1); | |
rect(50, y, 40, 5); | |
y += 10; | |
} | |
} | |
// Column 3. Draws 64 rectangles in descending order of transparency in a third column. |
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
cd "$1" | |
find -E . -regex "./[Ll]ibrary|./[Tt]emp|./[Oo]bj|./[Bb]uilds*|./[Ll]ogs|./[Uu]ser[Ss]ettings|./\.vs.*|./.*.sln|./.*.csproj|./.*mono_crash.*|./.*.DS_Store" -prune -exec rm -rf "{}" \; |
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
{ | |
"$schema": "https://aka.ms/codetour-schema", | |
"title": "Custom Functions", | |
"steps": [ | |
{ | |
"file": "sketch.js", | |
"selection": { | |
"start": { | |
"line": 27, | |
"character": 1 |
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 angle = 0; | |
function setup() { | |
createCanvas(600, 600); | |
angleMode(DEGREES); | |
} | |
function draw() { | |
background(220); | |
// Add to my angle |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// 3rd-person movement that picks direction relative to target (usually the camera) | |
// commented lines demonstrate snap to direction and without ground raycast | |
// | |
// To setup animated character create an animation controller with states for idle, running, jumping | |
// transition between idle and running based on added Speed float, set those not atomic so that they can be overridden by... | |
// transition both idle and running to jump based on added Jumping boolean, transition back to idle |
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
if (frameCount % 30 ===0){ | |
index = index + 1 | |
}else if (index >= windDir.length) { | |
index = 0 | |
} |
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
-- Name this file `main.lua`. Your game can use multiple source files if you wish | |
-- (use the `import "myFilename"` command), but the simplest games can be written | |
-- with just `main.lua`. | |
-- You'll want to import these in just about every project you'll work on. | |
import "CoreLibs/object" | |
import "CoreLibs/graphics" | |
import "CoreLibs/sprites" | |
import "CoreLibs/timer" |