Commit 8bfa5c43 authored by wildfirecode13's avatar wildfirecode13

init

parent 39b12899
......@@ -4,6 +4,7 @@ export default class Movable extends FYGE.Sprite {
private _velocity: Vector2;
set velocity(val: Vector2) { this._velocity = val }
get velocity() { return this._velocity }
private _acceleration: Vector2;
set acceleration(val: Vector2) { this._acceleration = val }
......
......@@ -7,7 +7,7 @@ export function addGame(stage: FYGE.Stage) {
const bird = stage.addChild(new Bird());//有加速度
bird.position.set(300, 200);
bird.velocity = new Vector2(0, 2);
bird.velocity = new Vector2(0, 0);
bird.acceleration=new Vector2(0, .5);
const bird2 = stage.addChild(new Bird());//无加速度
......
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