private void UpdateModuleInfo(CModuleInterface _tempModuleInterface) { // DEBUG: Make a random sentance to describe it string desc = CUtility.LoremIpsum(6, 12, 2, 4, 1); m_SelectedModuleType = _tempModuleInterface.ModuleType; m_SelectedModuleCategory = _tempModuleInterface.ModuleCategory; m_SelectedModuleSize = _tempModuleInterface.ModuleSize; m_SelectedModuleCost = m_SelectedModuleSize == CModuleInterface.ESize.Small ? 400 : 800; // Set the name string name = CUtility.SplitCamelCase(m_SelectedModuleType.ToString()); m_ModuleNameLabel.text = name; // Set the category m_ModuleCategoryLabel.text = m_SelectedModuleCategory.ToString(); // Set the size UpdateSizeInfo(m_SelectedModuleSize, m_SmallModuleSprite, m_MediumModuleSprite, m_LargeModuleSprite); // Set the desc m_ModuleDescLabel.text = desc; // Set the cost m_ModuleCostLabel.text = m_SelectedModuleCost.ToString() + "N"; }
private void UpdateModuleInfo(CModuleInterface _tempModuleInterface) { // DEBUG: Make a random sentance to describe it string desc = CUtility.LoremIpsum(6, 12, 2, 4, 1); m_SelectedModuleType = _tempModuleInterface.ModuleType; m_SelectedModuleCategory = _tempModuleInterface.ModuleCategory; m_SelectedModuleSize = _tempModuleInterface.ModuleSize; m_SelectedModuleCost = m_SelectedModuleSize == CModuleInterface.ESize.Small ? 400 : 800; // Set the name string name = CUtility.SplitCamelCase(m_SelectedModuleType.ToString()); m_ModuleNameLabel.text = name; // Set the category m_ModuleCategoryLabel.text = m_SelectedModuleCategory.ToString(); // Set the size UpdateSizeInfo(m_SelectedModuleSize, m_SmallModuleSprite, m_MediumModuleSprite, m_LargeModuleSprite); // Set the desc m_ModuleDescLabel.text = desc; // Set the cost m_ModuleCostLabel.text = m_SelectedModuleCost.ToString() + "N"; }