//----------- SELECTED OBJECT STUFF. public void selectObject(SimObject obj) { if (obj != null) { //do the generic stuff. hudView.setObjectName(obj.getName()); hudView.setObjectDescription(obj.getDesc()); hud.setSelectedObject(obj); //get other object set up stuff. if (obj.GetType() == typeof(PlugLoadController)) { PlugLoadController pl = (PlugLoadController)obj; hudView.plugLoad_setListOfEnergyUsingObjects(pl.getEuoList(), pl); } else if (obj.GetType() == typeof(EnergyUsingObject)) { EnergyUsingObject euo = (EnergyUsingObject)obj; hudView.setListOfSelectablePlugLoads(euo); } } }
//----------- SELECTED OBJECT STUFF. public void selectObject(SimObject obj) { if (obj != null) { //do the generic stuff. hudView.setObjectName(obj.getName()); hudView.setObjectDescription(obj.getDesc()); hud.setSelectedObject(obj); } }