private void AddedToStageHandler(DisplayObject target, DisplayObject currentTarget) { Stage.Touch += touch => Debug.WriteLine("touch " + touch); //Stage.StageWidth = 480; //Stage.StageHeight = 320; _started = true; _waitFrames = 3; SparrowSharp.ShowStats(HAlign.Right, VAlign.Bottom, 2f); AddTestObjects(16); TestScale9Grid(); TestRenderTexture(); TestFilters(); TestQuad(); TestMovieClip(); TestTextField(); TestMask(); TestButton(); TestCustomStyle(); TestBorders(); Stage.Touch += Benchmark_Touch; }
public SampleApp() { SparrowSharp.Stage.Color = 0x343434; //SparrowSharp.EnableErrorChecking(); SparrowSharp.SkipUnchangedFrames = false; SparrowSharp.ShowStats(HAlign.Right); SparrowRenderer.Init(1, 35000); EnterFrame += SampleApp_EnterFrame; _renderTexture = new RenderTexture(500, 500, false); var q = new Quad(500, 500); q.X = 100; q.Y = 100; q.Texture = _renderTexture; AddChild(q); _simContainer = new Sprite(); _simContainer.X = _simContainer.Y = 250; }