Ejemplo n.º 1
0
 public GameScene(JabWorld world, ContentManager content)
 {
     EventManager.Get.RegisterListner(this);
     this.world = world;
     this.Content = content;
     RaiseFlag(Flags.ACCEPTINPUT);
 }
Ejemplo n.º 2
0
 public CharacterController(JabWorld world, Vector2 pos, Vector2 dim)
 {
     this.world = world;
     this.dim = dim;
     body = world.CreateBox(dim, pos, JabActor.BodyType.STATIC);
     float xpos = body.PosX;
 }
Ejemplo n.º 3
0
 public CharacterController(JabWorld world, Vector2 pos, Vector2 dim)
 {
     this.world = world;
     this.dim   = dim;
     body       = world.CreateBox(dim, pos, JabActor.BodyType.STATIC);
     float xpos = body.PosX;
 }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
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;
 }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
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();
        }
Ejemplo n.º 9
0
 public PhysicAnimSprite(float radius, Vector2 pos, bool dynamic, JabWorld world, string imagedir)
     : base(radius, pos, dynamic, world, imagedir)
 {
 }
Ejemplo n.º 10
0
 public PhysicAnimSprite(Vector2 dim, Vector2 pos, bool dynamic, JabWorld world, string imagedir)
     : base(dim, pos, dynamic, world, imagedir)
 {
 }
Ejemplo n.º 11
0
 public PhysicShape(JabWorld world, JabActor.BodyType bodytype)
     : base()
 {
     this.bodyType = bodytype;
     this.world = world;
 }