public void SetAttributes(Mission mission) { MissionAttributes missionAttributes = Database.FindMissionAttributes(mission.Name); missionName.text = mission.Name; description.text = missionAttributes.description; reward.text = missionAttributes.reward.ToString(); progress.text = string.Format("{0}/{1}", mission.progress, missionAttributes.requirement); }
private void FindAttributes() { //WriteDirectories(); ReadDirectories(); foreach (string type in loadType) { foreach (string folder in directories[type]) { if (type == "Standard Piece") { PieceAttributes attributes = LoadPieceAttributes(folder); standardAttributes.Add(attributes.Name, attributes); } else if (type == "Piece") { PieceAttributes attributes = LoadPieceAttributes(folder); pieces.Add(attributes.Name, attributes); pieceList.Add(attributes.Name); pieceListDict[attributes.type].Add(attributes.Name); } else if (type == "Tactic") { TacticAttributes attributes = LoadTacticAttributes(folder); tactics.Add(attributes.Name, attributes); tacticList.Add(attributes.Name); } else if (type == "Board") { BoardAttributes attributes = LoadBoardAttributes(folder); boards.Add(attributes.Name, attributes); boardList.Add(attributes.Name); } else if (type == "Trap") { TrapAttributes attributes = LoadTrapAttributes(folder); traps.Add(attributes.Name, attributes); trapList.Add(attributes.Name); } else if (type == "Contract") { ContractAttributes attributes = LoadContractAttributes(folder); contracts.Add(attributes.Name, attributes); contractList.Add(attributes.Name); } else if (type == "Mission") { MissionAttributes attributes = LoadMissionAttributes(folder); missions.Add(attributes.Name, attributes); missionList.Add(attributes.Name); } } } }