// constructor public Player(Vector3 velocity, Animation[] animations, string[] names, Vector3 location, Rectangle rectangle, int life, int moneyGoal) : base(velocity, animations, names, location, rectangle) { startLoc = location; // not currently used for anything, but will be implemented by next milestone. lives = life; moneyNeeded = moneyGoal; moneyCollected = 0; attackLength = 0; currentWeapon = null; currentDisguise = null; }
// creates a disguise of the given type (chef, mechanic, box) and sets it's animation to be facing down. public static Disguise GenerateDisguise(Vector3 position, string type) { Disguise disguise = new Disguise( GameVariables.GetDisguiseAnimations(type), GameVariables.playerAnimationNames, position, new Rectangle( (int)position.X, (int)position.Y, GameVariables.tileWidth, GameVariables.tileHeight), type); disguise.CurrentAnimation = "StandDown"; return disguise; }