public override void FinishedLaunching(UIApplication app) { // all images are found in the Images directory, // so all images can now be loaded by just their name, not "Images\foo.png" TextureMgr.Instance.ImageRoot = "Images"; window.BackgroundColor = UIColor.Red; window.UserInteractionEnabled = true; window.MultipleTouchEnabled = false; window.Bounds = new System.Drawing.RectangleF(0, 0, 768, 1024); Director.Instance.DeviceOrientation = DeviceOrientation.Portrait; Director.Instance.AnimationInterval = 1.0 / 60.0; Director.Instance.IsDisplayFPS = true; Director.Instance.AttachInView(window); window.MakeKeyAndVisible(); // To run a different test, instantiate a different class here // SpriteTest -- SpriteManual // ParallaxTest -- Parallax1 // ParticleTest -- DemoFirework // PrimitivesTest -- HorizontalDrawPrimitives Scene scene = new Scene(new DemoFirework()); Director.Instance.RunScene(scene); }
protected TransitionScene(float duration, Scene inScene) { if (duration < 0) { throw new ArgumentException("duration must be positive", "duration"); } if (inScene == null) { throw new ArgumentNullException("inScene"); } _inScene = inScene; _inScene.Visible = true; _outScene = Director.Instance.RunningScene; if (ReferenceEquals(_inScene, _outScene)) { throw new InvalidOperationException("TransitionScene: the in and out scenes must be different"); } TouchDispatcher.Instance.DispatchEvents = false; SetSceneOrder(); }
public void PushScene(Scene scene) { if (scene == null) { throw new ArgumentNullException("scene"); } _sceneStack.Push(scene); _nextScene.Target = scene; }
public void RunScene(Scene scene) { if (scene == null) { throw new ArgumentNullException("scene"); } if (RunningScene != null) { throw new InvalidOperationException("You can't run a scene if another Scene is running. Use ReplaceScene or PushScene instead"); } PushScene(scene); StartAnimation(); }
public MoveInLeftTransition(float duration, Scene inScene) : base(duration, inScene) { }