//Character attributes public BasicGroundEnemy(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, //GameObject attributes WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons, //PhysicalObject attributes double runSpeed, double maxSpeed) : base(game, position, velocity, sprites, defaultSprite, controller, worldPhysics, objectPhysics, boundingPolygons, runSpeed, maxSpeed) { Stompable = true; }
//Just pass on the constructor stuff to base public Character(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons, double runSpeed, double maxSpeed) : base(game, position, velocity, sprites, defaultSprite, controller, worldPhysics, objectPhysics, boundingPolygons) { CurrentSprite.PlayAnimation("stand", true); MaxSpeed = maxSpeed; RunSpeed = runSpeed; }
public PhysicalObject(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons) : base(game, position, velocity, sprites, defaultSprite, controller, boundingPolygons) { this.worldPhysics = worldPhysics; this.objectPhysics = objectPhysics; this.friction = objectPhysics.Friction*worldPhysics.GroundFrictionFactor; inAirTimer.Start(); }
public Player(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, //GameObject attributes WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons, //PhysicalObject attributes double runSpeed, double maxSpeed, //Character attributes PlayerState state) : base(game, position, velocity, sprites, defaultSprite, controller, worldPhysics, objectPhysics, boundingPolygons, runSpeed, maxSpeed) { oldFriction = objectPhysics.Friction; PlayerState = state; invincibleTimer.Start(); }
public Mushroom(Game game, Vector position, Dictionary<string, Sprite> sprites, string defaultSprite, WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> polygons, ItemType itemType) : base(game, position, new Vector(0,0), sprites, defaultSprite, new DumbGroundAI(), worldPhysics, objectPhysics, polygons) { CurrentSprite.PlayAnimation(Sprite.DEFAULT_ANIMATION, true); MushroomType = itemType; }