Basic
package;
import gecko.Screen;
import gecko.components.draw.SpriteComponent;
import gecko.Gecko;
import gecko.Assets;
import gecko.systems.draw.DrawSystem;
class Game {
public function new(){
Gecko.currentScene.addSystem(DrawSystem.create());
Assets.load([
"shipYellow_manned.png"
], _onAssetsLoaded).start();
}
private function _onAssetsLoaded() {
var entity = Gecko.currentScene.createEntity();
entity.transform.position.set(Screen.centerX, Screen.centerY);
entity.addComponent(SpriteComponent.create("shipYellow_manned.png"));
}
}
Source Code