public override void update() { // restrict the hero's movement to the boundary bool holdVisibility = invisible; invisible = false; foreach (Obstacle b in boundaries) { b.checkCollisions(); } // update base character object (collisions, etc.) base.update(); invisible = holdVisibility; // update hero's weapons selectWeapon(); if (KeyboardDevice.isKeyTapped(Microsoft.Xna.Framework.Input.Keys.F)) { weapon.fire(); } foreach (Weapon w in weaponRack) { w.update(); } }