Пример #1
0
 public GameScene(JabWorld world, ContentManager content)
 {
     EventManager.Get.RegisterListner(this);
     this.world   = world;
     this.Content = content;
     RaiseFlag(Flags.ACCEPTINPUT);
 }
Пример #2
0
 public PhysicSprite(Vector2 dim, Vector2 pos, bool dynamic, JabWorld world, string imagedir)
     : base()
 {
     TextureDir = imagedir;
     Width      = dim.X;
     Height     = dim.Y;
     JabActor.BodyType type = JabActor.BodyType.DYNAMIC;
     if (!dynamic)
     {
         type = JabActor.BodyType.STATIC;
     }
     body          = world.CreateBox(dim, pos, type);
     body.UserData = this;
     this.world    = world;
     DoDimensions  = true;
     DoHandle      = true;
 }
Пример #3
0
        public PhysicSprite(float radius, Vector2 pos, bool dynamic, JabWorld world, string imagedir)
            : base()
        {
            TextureDir = imagedir;
            Width      = radius;
            Height     = radius;
            JabActor.BodyType type = JabActor.BodyType.DYNAMIC;
            if (!dynamic)
            {
                type = JabActor.BodyType.STATIC;
            }
            body          = world.CreateSphere(radius / 2.0f, pos, type);
            body.UserData = this;
            this.world    = world;

            // Initialize();
        }
Пример #4
0
        public ThisGamesScene(GameplayScreen screen, JabWorld world,
                              ChicksScene chicksScene, ContentManager content)
            : base(world, content)
        {
            this.screen      = screen;
            this.chicksScene = chicksScene;


            AddSpriteLoadInterceptor("textures\\fan", LoadFan);
            AddSpriteLoadInterceptor("textures\\donut", LoadDonut);
            AddSpriteLoadInterceptor("textures\\donutcase", LoadDonutCase);

            AddSpriteLoadInterceptor("textures\\basketball", LoadBasketBall);
            AddSpriteLoadInterceptor("textures\\Physical\\basketball", LoadBasketBall);

            AddSpriteLoadInterceptor("textures\\tyre", LoadTyre);
            AddSpriteLoadInterceptor("textures\\Physical\\tyre", LoadTyre);
        }
Пример #5
0
        public Fan(JabWorld world)
            : base("misc")
        {
            this.world = world;

            Rot   = 0.24f * JabMath.PI;
            Layer = SpriteLayer.LAYER8;

            world.MakeEntityGroup(FanEntitySpaceGroup);
            EventManager.Get.RegisterListner(this);

            //++NumFans;
            //  if (FanSound == null)
            {
                FanSound        = AudioManager.CreateSound("Sounds/Fan_Blowing_2", true);
                FanSound.Volume = 0.0f;
            }
            FanSound.Play(1.0f);
        }
Пример #6
0
        public Explosion(float initialRadius, float radius, float maxRadiusScale, float power, JabWorld world, Vector2 pos)
            : base("chickens")
        {
            this.maxRadiusScale = maxRadiusScale;
            maxPower            = power;
            Position            = pos;
            this.World          = world;
            maxRadius           = radius;
            this.initialRadius  = initialRadius;

            Rot = RandomFloatInRange(0, 2.0f * JabMath.PI);
        }
Пример #7
0
 public PhysicShape(JabWorld world, JabActor.BodyType bodytype)
     : base()
 {
     this.bodyType = bodytype;
     this.world    = world;
 }
Пример #8
0
 public PhysicAnimSprite(float radius, Vector2 pos, bool dynamic, JabWorld world, string imagedir)
     : base(radius, pos, dynamic, world, imagedir)
 {
 }
Пример #9
0
 public PhysicAnimSprite(Vector2 dim, Vector2 pos, bool dynamic, JabWorld world, string imagedir)
     : base(dim, pos, dynamic, world, imagedir)
 {
 }