Beispiel #1
0
 public Mario(int x = 0, int y = 0)
 {
     Name             = "MARIO";
     Lives            = HotDAMN.INITIAL_LIVES_COUNT;
     Position         = new Vector2(x, y);
     Velocity         = Vector2.Zero;
     Acceleration     = Physics.GRAVITY;
     Hitbox           = new Hitbox(Hitboxes.SMALL_MARIO_IDLE_OFFSET_X, Hitboxes.SMALL_MARIO_IDLE_OFFSET_Y);
     State            = HUD.MarioState(this, HUD.setting);
     Sprite           = new MarioAnimation(HUD.currentPlayer == 0 ? Textures.mario0 : Textures.luigi0, Textures.smallRightIdle);
     IsActive         = true;
     Decorator        = new PlainPlayer(this);
     CollisionHandler = new PlayerCollisionHandler(this);
     IsRunning        = false;
 }
Beispiel #2
0
 public InvinciblePlayerCollisionHandler(IPlayer player)
 {
     this.subject = player;
     this.normal  = new PlayerCollisionHandler(subject);
 }