Commit d87b0f18 authored by wildfirecode13's avatar wildfirecode13

init

parent b1c1c5bc
export function addGame(stage:FYGE.Stage) {
export function addGame(stage: FYGE.Stage) {
const INITIAL_POSITION = { x: 0, y: 1000 };//初始位置
const plane = stage.addChild(FYGE.Sprite.fromUrl('//yun.duiba.com.cn/spark/assets/hero_fly1.f292cb1c04589c6ee395fe29538d5385540755f7.png'));
plane.position.set(INITIAL_POSITION.x,INITIAL_POSITION.y);
const SPEED = 2;
function onEnterFrame() { plane.y -= SPEED; }
plane.addEventListener(FYGE.Event.ENTER_FRAME, onEnterFrame);
}
\ 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