public CursorModel(ContentManager content, World world, GamepadController pad, SmashBros.Controllers.GamepadController.NavigationKey navigationMethod, OnCollisionEventHandler col, OnSeparationEventHandler sep,bool enabled = false) { Cursor = new Sprite(content, "Cursors/Player" + pad.PlayerIndex, 70, 70, 280 * pad.PlayerIndex + 100, 680); Cursor.BoundRect(world, 5, 5, BodyType.Dynamic); Cursor.StaticPosition = true; Cursor.Category = Category.Cat4; Cursor.CollidesWith = Category.Cat5; Cursor.Layer = 1002; Cursor.Mass = 1; Cursor.UserData = pad.PlayerIndex; Cursor.BoundBox.IgnoreGravity = true; Cursor.Origin = new Vector2(50, 20); this.Pad = pad; this.Navigation = navigationMethod; this.OnCollision = col; this.OnSeparation = sep; this.Enabled = enabled; }
public CursorModel(ContentManager content, World world, GamepadController pad, SmashBros.Controllers.GamepadController.NavigationKey navigationMethod, OnCollisionEventHandler col, OnSeparationEventHandler sep, bool enabled = false) { Cursor = new Sprite(content, "Cursors/Player" + pad.PlayerIndex, 70, 70, 280 * pad.PlayerIndex + 100, 680); Cursor.BoundRect(world, 5, 5, BodyType.Dynamic); Cursor.StaticPosition = true; Cursor.Category = Category.Cat4; Cursor.CollidesWith = Category.Cat5; Cursor.Layer = 1002; Cursor.Mass = 1; Cursor.UserData = pad.PlayerIndex; Cursor.BoundBox.IgnoreGravity = true; Cursor.Origin = new Vector2(50, 20); this.Pad = pad; this.Navigation = navigationMethod; this.OnCollision = col; this.OnSeparation = sep; this.Enabled = enabled; }