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(); }
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 void render(AsRenderSupport support, float alpha) { throw new AsAbstractMethodError("Method needs to be implemented in subclass"); }
public override void render(AsRenderSupport support, float alpha) { }
public override void render(AsRenderSupport support, float alpha) { alpha = alpha * this.getAlpha(); int childsCount = getNumChildren(); int i = 0; for (; i < childsCount; ++i) { AsDisplayObject child = mChildren[i]; if(child.getAlpha() != 0.0f && child.getVisible() && child.getScaleX() != 0.0f && child.getScaleY() != 0.0f) { support.pushMatrix(); support.transform(child.getTransform().getMatrix()); child.render(support, alpha); support.popMatrix(); } } }
public override void render(AsRenderSupport support, float alpha) { if (mBitmapData != null && mBitmapData.Texture != null) { BcRenderSupport.DrawImage(mBitmapData.Texture, 0, 0); } }
public override void render(AsRenderSupport support, float alpha) { alpha = (alpha * this.getAlpha()); int numChildren = (int)(mChildren.getLength()); int i = 0; for (; (i < numChildren); ++i) { AsDisplayObject child = mChildren[i]; if(((((child.getAlpha() != 0.0f) && child.getVisible()) && (child.getScaleX() != 0.0f)) && (child.getScaleY() != 0.0f))) { support.pushMatrix(); support.transform(child.getTransform().getMatrix()); child.render(support, alpha); support.popMatrix(); } } }