示例#1
0
 public LuigiPhysics(Luigi m, LuigiState s)
 {
     myLuigi = m;
     State = s;
     xVelocity = 0;
     yVelocity = Constants.luigiFallingSpeed;
     jumpCount = 0;
     verticalDirection = VerticalMovingDirection.Falling;
     horizontalDirection = HorizontalMovingDirection.None;
     bounceCounter = 0;
     hitCeiling = false;
     hitGround = true;
 }
示例#2
0
 // constructor
 public Luigi(int x, int y, Camera cam, SoundEffects s, IList<IProjectile> projectiles)
 {
     camera = cam;
     xPosition = x;
     yPosition = y;
     State = new LuigiState(this, cam);
     Physics = new LuigiPhysics(this, State);
     itemCollision = new LuigiItemCollision(this);
     enemyCollision = new LuigiEnemyCollision(this);
     blockCollision = new LuigiBlockCollision(this);
     sound = s;
     enemyKillSequence = false;
     enemyKilled = false;
     projectileList = projectiles;
 }