void CargoBody::Init() { m_hitpoints = 1.0f; SetLabel(Equip::types[m_type].name); SetMassDistributionFromModel(); std::vector<Color> colors; //metallic blue-orangeish color scheme colors.push_back(Color(255, 198, 64)); colors.push_back(Color(0, 222, 255)); colors.push_back(Color(255, 255, 255)); SceneGraph::ModelSkin skin; skin.SetColors(colors); skin.SetDecal("pioneer"); skin.Apply(GetModel()); GetModel()->SetColors(colors); Properties().Set("type", EnumStrings::GetString("EquipType", m_type)); }
void CargoBody::Init() { m_hitpoints = 1.0f; SetLabel(ScopedTable(m_cargo).CallMethod<std::string>("GetName")); SetMassDistributionFromModel(); m_hasSelfdestruct = true; std::vector<Color> colors; //metallic blue-orangeish color scheme colors.push_back(Color(255, 198, 64)); colors.push_back(Color(0, 222, 255)); colors.push_back(Color(255, 255, 255)); SceneGraph::ModelSkin skin; skin.SetColors(colors); skin.SetDecal("pioneer"); skin.Apply(GetModel()); GetModel()->SetColors(colors); Properties().Set("type", ScopedTable(m_cargo).CallMethod<std::string>("GetName")); }