forked from ec-idds/hackathon-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsketch.js
More file actions
29 lines (23 loc) · 788 Bytes
/
sketch.js
File metadata and controls
29 lines (23 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
let pages = [Quad, JYC, dorm, Library, wilkens];
let campus_bg;
let lobby_bg;
let trashcan;
let player;
function preload () {
campus_bg = loadImage('PH.png');
lobby_bg = loadImage('ECQ.png');
trashcan = loadImage('game_designs/universal/trashcan.jpg');
}
function setup () {
createCanvas(400, 600);
player = new Sprite(trashcan, 100, 100, 30, 30, true);
var mgr = new SceneManager();
// mgr.bkImage = bkImage; // inject bkImage property
mgr.wire();
mgr.showScene( StartScreen );
}
// create an array of all the pages
// then create a variable to keep track of what page you're on
// identify what areas on the map are 'transporation zones'
// when the sprite enters a transporation zone,
// alter the 'current' variable to match the corresponding map/page