public GameScene(JabWorld world, ContentManager content) { EventManager.Get.RegisterListner(this); this.world = world; this.Content = content; RaiseFlag(Flags.ACCEPTINPUT); }
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; }
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(); }
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); }
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); }
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); }
public PhysicShape(JabWorld world, JabActor.BodyType bodytype) : base() { this.bodyType = bodytype; this.world = world; }
public PhysicAnimSprite(float radius, Vector2 pos, bool dynamic, JabWorld world, string imagedir) : base(radius, pos, dynamic, world, imagedir) { }
public PhysicAnimSprite(Vector2 dim, Vector2 pos, bool dynamic, JabWorld world, string imagedir) : base(dim, pos, dynamic, world, imagedir) { }