Ejemplo n.º 1
0
        public override void Init()
        {
            bgColor = Color.CornflowerBlue;

            player = new Player();
            Add(player);

            //Enemies.Add(new Enemy(player));
            //Add(Enemies);

            OE.UserData.Add(this);
            OE.Debug.Enabled = true;

            text = new Text("Lives: " + player.Lives, new Vector2(10, 10));
            Add(text);
            score = new Text("Score: " + player.Points, new Vector2(200, 10));
            Add(score);

            emitter = new Emitter(new Vector2(200, 200), new Action<Particle>(TestStage.UpdateParticle));
            emitter.LoadImages(new Texture2D[] { Utils.MakeGraphic(4, 4, Color.White) });
            emitter.GenerateOrigins();
            //emitter.
            Add(emitter);

            emitter.LockTo(player, Vector2.Zero);
            OE.Camera.Follow(player);

            base.Init();
        }
Ejemplo n.º 2
0
 public Debug()
 {
     FPS = new Text("FPS: ", new Vector2(OE.ScreenWidth - 200, 10));
 }