public NativeApplication(int width, int height, ContentManager content)
        {
            resFactory = new BcResFactory(content);

            renderSupport = new AsRenderSupport();

            input = new NativeInput();
            input.AddGamePadListener(this);
            input.AddKeyboardListener(this);
            input.AddTouchListener(this);
            running = true;

            stage = new AsStage(width, height);

            // TODO: remove the shit
            new AsBcResLoaderFactory();
            AsBcDevice.initialize(stage);

            AsBcAsset.loadPath("../asset/preloader.xml", null);
            AsBcData.load(new AsVector<String>("data"));

            new AsBcGameUI();
            AsBcAsset.loadPath("../asset/game.xml", null);

            new AsBcGame();
        }
Exemplo n.º 2
0
 public AsStage(int width, int height, uint color)
 {
     mWidth = width;
     mHeight = height;
     mColor = color;
     mCurrentStage = this;
 }
Exemplo n.º 3
0
 public AsStage(int width, int height, uint color)
 {
     mWidth        = width;
     mHeight       = height;
     mColor        = color;
     mCurrentStage = this;
 }
 public AsTouchProcessor(AsStage stage)
 {
     mStage = stage;
     mElapsedTime = mOffsetTime = 0.0f;
     mCurrentTouches = new AsVector<AsTouch>();
     mQueue = new AsVector<AsArray>();
     mLastTaps = new AsVector<AsTouch>();
     mStage.addEventListener(AsKeyboardEvent.KEY_DOWN, onKey);
     mStage.addEventListener(AsKeyboardEvent.KEY_UP, onKey);
 }
        public NativeApplication(int width, int height, ContentManager content)
        {
            resFactory = new BcResFactory(content);

            renderSupport = new AsRenderSupport();

            input = new NativeInput();
            input.AddGamePadListener(this);
            input.AddKeyboardListener(this);
            input.AddTouchListener(this);
            running = true;

            stage = new AsStage(width, height);
        }
 public virtual AsStage getStage()
 {
     return(AsStage.getInstance());
 }