Set up intro message and player in detail scene
This commit is contained in:
parent
40d4a2364e
commit
18850e9fb8
3 changed files with 34 additions and 1 deletions
|
|
@ -11,6 +11,24 @@
|
||||||
"path": "packages/client",
|
"path": "packages/client",
|
||||||
"size": 5600,
|
"size": 5600,
|
||||||
"contents": {}
|
"contents": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "blockchain",
|
||||||
|
"path": "packages/blockchain",
|
||||||
|
"size": 4000,
|
||||||
|
"contents": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ethash",
|
||||||
|
"path": "packages/ethash",
|
||||||
|
"size": 3600,
|
||||||
|
"contents": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "common",
|
||||||
|
"path": "packages/common",
|
||||||
|
"size": 1000,
|
||||||
|
"contents": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,19 @@
|
||||||
import { mp5 } from '../../main';
|
import { mp5 } from '../../main';
|
||||||
|
import { Player } from '../sketchObjects/Player';
|
||||||
import store from '../store';
|
import store from '../store';
|
||||||
import { Scenes } from './scenes';
|
import { Scenes } from './scenes';
|
||||||
|
|
||||||
export class DetailScene {
|
export class DetailScene {
|
||||||
constructor() {}
|
player: Player;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.player = new Player();
|
||||||
|
}
|
||||||
|
|
||||||
draw() {
|
draw() {
|
||||||
mp5.background(100);
|
mp5.background(100);
|
||||||
|
this.player.follow();
|
||||||
|
this.player.move();
|
||||||
}
|
}
|
||||||
|
|
||||||
onSceneClick() {
|
onSceneClick() {
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,14 @@ export class OverviewScene {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.edges = generateEdges(projectMetadata.subprojects);
|
this.edges = generateEdges(projectMetadata.subprojects);
|
||||||
this.player = new Player();
|
this.player = new Player();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
store.getState().addUserMessage({
|
||||||
|
text: "Hello there 👋 Let's start exploring the ethereumjs open source project",
|
||||||
|
inputWanted: false,
|
||||||
|
timestamp: Date.now(),
|
||||||
|
});
|
||||||
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public draw() {
|
public draw() {
|
||||||
|
|
|
||||||
Reference in a new issue