Ejemplo n.º 1
0
        public static void save(Emitter rfbase, string filename)
        {
            XmlSerializer xs = new XmlSerializer(rfbase.GetType());// typeof( RFBase ) );

            StreamWriter writer = File.CreateText(filename);
            xs.Serialize(writer, rfbase);
            writer.Close();
        }
Ejemplo n.º 2
0
        public void HelperInit(ContentManager content, int amount, GraphicsDeviceManager graphics)
        {
            emitter = new Emitter();
            emitter.Init(amount);
            emitter.Start();

            Images = new List<Texture2D>();
            Images.Add(content.Load<Texture2D>("star"));
            Images.Add(content.Load<Texture2D>("lazer"));

            Font = content.Load<SpriteFont>("Pericles8");

            Rotation_Center = new Vector2(Images[emitter.Image].Width/2, Images[emitter.Image].Height/2);
            Size_Rectangle = new Rectangle(emitter.Size_X, emitter.Size_Y, emitter.Width, emitter.Height);
            pixel = content.Load<Texture2D>("pixel");

            this.graphics = graphics;
            updateEmitterPosition(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);
        }