} /* link_is_pipe() */ /*********************************************************** * * Method: * set_destination * * Description: * Sets mario's location to the destination pipe. * ***********************************************************/ public void set_destination(mario_type m) { int viewx = 0; int viewy = 0; if (link_v != null) { m.physics.position.x = link_v.x << 12; m.physics.position.y = link_v.y << 12; viewx = m.physics.position.x - ((4 * Blocks.size.Width) << 12); } else if (link_p != null) { m.physics.position.x = (link_p.x << 16) + (10 << 12); m.physics.position.y = (link_p.y << 16) - ((m.physics.hit_box.Height - 1) << 12); viewx = (link_p.x - 3) << 16; } m.physics.acceleration.x = 0; m.physics.acceleration.y = 0; m.physics.velocity.x = 0; m.physics.velocity.y = 0; viewy = 0; ViewDims.set_view_location(viewx, viewy); } /* set_destination() */
/*-------------------------------------------------------------------- * METHODS * --------------------------------------------------------------------*/ /*********************************************************** * * Method: * level_type * * Description: * Constructor. * ***********************************************************/ public level_type() { enemies = new List <character_type>(); mario = new mario_type(); } /* level_type() */