Пример #1
0
 protected override void Initialize()
 {
     ContentManagerFacade.buildGameContentManager(this);
     manager = new SpriteManager(this, new Ryu(new Vector2(440, 150)), new Ryu(new Vector2(440, 330)));
     Components.Add(manager);
     base.Initialize();
 }
Пример #2
0
        public SpriteManager(Game game, Fighter lutador1, Fighter lutador2)
            : base(game)
        {
            this.lutador1 = lutador1;
            this.lutador2 = lutador2;
            simulador     = new PhysicsSimulator(new Vector2(0, 10));
            //simulador.Add(lutador1.Body);
            //simulador.Add(lutador1.Geometry);



            groundBody          = BodyFactory.Instance.CreateRectangleBody(800, 10, 1);
            groundGeom          = GeomFactory.Instance.CreateRectangleGeom(groundBody, 800, 10);
            groundBody.Position = new Vector2(0, 550);
            groundBody.IsStatic = true;
            groundGeom.RestitutionCoefficient = .2f;
            groundGeom.FrictionCoefficient    = .2f;

            barra = ContentManagerFacade.Load <Texture2D>("barra");
            simulador.Add(groundBody);
            simulador.Add(groundGeom);
        }