public MarioModel(MarioSpriteFactory spriteFactory, Vector2 coordinates, Vector2 velocity) { //Mario states CurrentPowerupState = new MarioStandardState(this); CurrentPowerupState.Enter(null); leftFacing = false; canMoveDown = false; support = false; gravityAllowed = true; horizontalSpeed = 2; jumpSpeed = 3; heightJumped = 0; this.Position = coordinates; this.lives = 3; this.coins = 0; this.points = 0; this.time = 400; //this.powerupState = powerupState; //this.spriteFactory = spriteFactory; MarioSpriteFactory = spriteFactory; Sprite = new MarioSprite(this); Velocity = velocity; //DeadPositionFactor = powerupState.CollisionPositionFactor; //DeadPositionFactor = 1; }
public MarioEntity(Vector2 location, EventSoundEffects sounds) { Sounds = sounds; WonGame = false; Factory = new MarioFactory(); PowerState = new MarioStandardState(this); ActionState = new Idling(this); Facing = true; Sprite = Factory.MarioSprite(PowerState, ActionState, Facing, location); SpritePosition = location; SpriteVelocity = new Vector2(0, 0); EntityCollision = new MarioCollision(this); Live = 3; }