public InventoryState(Player Player, GameManager manager) : base(manager) { player = Player; mnu_actions = new Menu(); mnu_actions.AddItem("Inventory", "inventory"); mnu_actions.AddItem("Equip", "equip"); mnu_actions.AddItem("Use", "use"); mnu_actions.AddItem("Drop", "drop"); mnu_actions.AddItem("Read", "read"); onSecondaryList = false; }
/// <summary> /// Sets the player for the game to use /// </summary> public void SetPlayer(Player ThePlayer) { player = ThePlayer; player.SetMap(this); }
// Runs when the game state starts for the first time public override void Start() { player = new Player(cam); map = new Map(1, MapType.dungeon, this); raycaster.SetMap(map); cam.SetPosition(map.GetStairUpLoc()); player.CreateStartingItems(); AddMessage("You step down into the musty air of the dungeon."); }
/// <summary> /// Generates a map based on the dungeon level and type /// </summary> public Map(int Level, MapType type, PlayState theState) { gamestate = theState; player = gamestate.Player; if(player != null) player.SetMap(this); level = Level; generator = new MapGenerator(type, this); }