updated StartScene into Animation
|
@ -1,20 +1,17 @@
|
||||||
import { GameScene } from './GameScene.js';
|
import { startPageAni } from './sketch.js';
|
||||||
import { startPageImage } from './sketch.js';
|
|
||||||
|
|
||||||
export function StartScene() {
|
export function StartScene() {
|
||||||
this.enter = function() {
|
this.enter = function() {
|
||||||
select('#controlPanel').hide();
|
const self = this;
|
||||||
|
|
||||||
|
select('#upperContainer').hide();
|
||||||
select('#menuButton').hide();
|
select('#menuButton').hide();
|
||||||
|
select('#startButton').show();
|
||||||
const startButton = select('#startButton');
|
|
||||||
startButton.show();
|
|
||||||
|
|
||||||
startButton.mousePressed(() => {
|
|
||||||
this.sceneManager.showScene(GameScene);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.draw = function() {
|
this.draw = function() {
|
||||||
console.log(`StartScene width: ${width} and length: ${height}`)
|
clear();
|
||||||
image(startPageImage, 0, 0, width, height);
|
let ratio = width / 1440;
|
||||||
|
animation(startPageAni, width / 2, height / 2, 0, ratio, ratio);
|
||||||
}
|
}
|
||||||
}
|
}
|
BIN
assets/.DS_Store
vendored
BIN
assets/catsLabel.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/cheese.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/cheeseLabel.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/chef_cat.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
assets/double_yarn_cat_ani.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
assets/double_yarn_cat_icon.png
Normal file
After Width: | Height: | Size: 335 KiB |
BIN
assets/gamebg3.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
assets/ice_cat_ani.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
assets/ice_cat_icon.png
Normal file
After Width: | Height: | Size: 301 KiB |
BIN
assets/petCage.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 164 KiB |
BIN
assets/single_yarn_cat.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/single_yarn_cat_ani.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
assets/single_yarn_cat_icon.png
Normal file
After Width: | Height: | Size: 315 KiB |
BIN
assets/sleepy_cat_icon.png
Normal file
After Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 159 KiB |
BIN
assets/start_page_ani.png
Normal file
After Width: | Height: | Size: 1.2 MiB |