You can find the current version of the sketch that this is based on here.
sequenceDiagram
participant A as Player A (Josh)
participant S as Echo Server<br/>(Room 2728038)
participant B as Player B
participant C as Player CYou can find the current version of the sketch that this is based on here.
sequenceDiagram
participant A as Player A (Josh)
participant S as Echo Server<br/>(Room 2728038)
participant B as Player B
participant C as Player C| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/addons/p5.sound.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/p5.plotsvg@latest/lib/p5.plotSvg.js"></script> | |
| <link rel="stylesheet" type="text/css" href="style.css"> | |
| <meta charset="utf-8" /> | |
| </head> |
| -- 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" |
| if (frameCount % 30 ===0){ | |
| index = index + 1 | |
| }else if (index >= windDir.length) { | |
| index = 0 | |
| } |
| 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 |
| let angle = 0; | |
| function setup() { | |
| createCanvas(600, 600); | |
| angleMode(DEGREES); | |
| } | |
| function draw() { | |
| background(220); | |
| // Add to my angle |
| { | |
| "$schema": "https://aka.ms/codetour-schema", | |
| "title": "Custom Functions", | |
| "steps": [ | |
| { | |
| "file": "sketch.js", | |
| "selection": { | |
| "start": { | |
| "line": 27, | |
| "character": 1 |
| 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 "{}" \; |
| // 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. |
| 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; |