Commit 986c1c4e authored by wildfirecode13's avatar wildfirecode13

init

parent 8bfa5c43
...@@ -8,12 +8,12 @@ export function addGame(stage: FYGE.Stage) { ...@@ -8,12 +8,12 @@ export function addGame(stage: FYGE.Stage) {
const bird = stage.addChild(new Bird());//有加速度 const bird = stage.addChild(new Bird());//有加速度
bird.position.set(300, 200); bird.position.set(300, 200);
bird.velocity = new Vector2(0, 0); bird.velocity = new Vector2(0, 0);
bird.acceleration=new Vector2(0, .5); bird.acceleration=new Vector2(0, 1);
const bird2 = stage.addChild(new Bird());//无加速度
bird2.position.set(500, 200);
bird2.velocity = new Vector2(0, 6);
movableManager.add(bird); movableManager.add(bird);
movableManager.add(bird2);
stage.addEventListener(FYGE.MouseEvent.CLICK,onclick);
function onclick() {
bird.velocity.y = -20;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment