image upload
This commit is contained in:
parent
2fc0d2eba4
commit
ebfa850e7c
|
@ -1,3 +1,10 @@
|
||||||
# 🚀 p5.js-templates
|
# 🚀 p5.js-templates
|
||||||
|
|
||||||
p5.js templates for ID311 Software Prototyping.
|
p5.js templates for ID311 Software Prototyping.
|
||||||
|
|
||||||
|
This is pangame of nintendo chracters.
|
||||||
|
|
||||||
|
all sprites came from https://www.spriters-resource.com/nintendo_switch/K.html
|
||||||
|
|
||||||
|
and I cut the sprite in https://www.piskelapp.com/p/create/sprite
|
||||||
|
|
||||||
|
|
BIN
assets/Mario-Background.png
Normal file
BIN
assets/Mario-Background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
BIN
assets/Mario-Character+Item.png
Normal file
BIN
assets/Mario-Character+Item.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 270 KiB |
BIN
assets/Mario-Enemy.png
Normal file
BIN
assets/Mario-Enemy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
assets/Mario-Tileset.png
Normal file
BIN
assets/Mario-Tileset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
35
sketch.js
35
sketch.js
|
@ -1,13 +1,30 @@
|
||||||
// Single-sketch example
|
let player;
|
||||||
|
let gravity = 0.8;
|
||||||
|
let projectiles = [];
|
||||||
|
let bombs = [];
|
||||||
|
let groundY = 500;
|
||||||
|
let keys = {};
|
||||||
|
let powerUps = [];
|
||||||
|
let deathZoneY = 600;
|
||||||
|
|
||||||
function setup (){
|
let spriteSheets = {};
|
||||||
createCanvas (800, 600);
|
|
||||||
|
function preload() {
|
||||||
|
// 여기에 sprite들을 preload (ex: mario = loadImage("..."))
|
||||||
|
spriteSheets.backgorunds= loadImage("assets/Mario-Background.png");
|
||||||
|
spriteSheets.characters = loadImage("assets/Mario-Character+Item.png");
|
||||||
|
spriteSheets.specialweapon = loadImage("assets/Mario-Enemy.png");
|
||||||
|
spriteSheets.tileset = loadImage("assets/Mario-Tileset.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw(){
|
function setup() {
|
||||||
background(100);
|
createCanvas(800, 600);
|
||||||
fill(255);
|
}
|
||||||
noStroke();
|
|
||||||
rectMode(CENTER);
|
function draw() {
|
||||||
rect(mouseX, mouseY, 50, 50);
|
background(135, 206, 235); // sky blue
|
||||||
|
|
||||||
|
// 임시 바닥
|
||||||
|
fill(100);
|
||||||
|
rect(0, groundY, width, 100);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user