public HUDModel Clone() { HUDModel h = new HUDModel(); h.HUDRotation = this.HUDRotation; h.centerTextPosition = this.centerTextPosition; h.leftTextPosition = this.leftTextPosition; h.rightTextPosition = this.rightTextPosition; h.topTextPosition = this.topTextPosition; h.bottomTextPosition = this.bottomTextPosition; h.leftText = this.leftText; h.rightText = this.rightText; h.topText = this.topText; h.centerText = this.centerText; h.bottomText = this.bottomText; h.centerText = this.centerText; h.centerCharSize = this.centerCharSize; h.leftCharSize = this.leftCharSize; h.rightCharSize = this.rightCharSize; h.topCharSize = this.topCharSize; h.bottomCharSize = this.bottomCharSize; h.centerFontSize = this.centerFontSize; h.leftFontSize = this.leftFontSize; h.rightFontSize = this.rightFontSize; h.topFontSize = this.topFontSize; h.bottomFontSize = this.bottomFontSize; h.isCenterTextEnabled = this.isCenterTextEnabled; h.isLeftTextEnabled = this.isLeftTextEnabled; h.isRightTextEnabled = this.isRightTextEnabled; h.isTopTextEnabled = this.isTopTextEnabled; h.isBottomTextEnabled = this.isBottomTextEnabled; h.centerImagePosition = this.centerImagePosition; h.centerImageScale = this.centerImageScale; h.isCenterImageEnabled = this.isCenterImageEnabled; h.centerBackingMaterial = this.centerBackingMaterial; h.rightImagePosition = this.rightImagePosition; h.rightImageScale = this.rightImageScale; h.isRightImageEnabled = this.isRightImageEnabled; h.rightBackingMaterial = this.rightBackingMaterial; h.leftImagePosition = this.leftImagePosition; h.leftImageScale = this.leftImageScale; h.isLeftImageEnabled = this.isLeftImageEnabled; h.leftBackingMaterial = this.leftBackingMaterial; return(h); }
// Use this for initialization void Awake() { /* Example use case for your code (should be in the scenario class or somewhere) * * MyScenarioClass { * HUDModel myHud = new MyHUDModel(); //<- a HUD model initialized w/ your HUD strings, images * // this model should extend HUDModel_Upright (for upright angles) * // it must extend HUDModel * * HUDController.model = myHud; * * // to change hud models * * HUDController.model = newModel; * * //or do * * myHud.centerText = "new center text"; //to change text * myHud.centerBackingMaterial = myImageMaterial; //to change images * myHud.isCenterImageEnabled = true; //to enable/disable image or text fields * * * */ model = new HUDVRAVE_Default(); //This is the layout that we decided we liked best. The other ones still exist //just in case we want to use them. transform.eulerAngles = model.HUDRotation; centerImageField = transform.Find("HUDImage_Center"); leftImageField = transform.Find("HUDImage_Left"); rightImageField = transform.Find("HUDImage_Right"); centerTextField = transform.Find("HUDText_Center"); leftTextField = transform.Find("HUDText_Left"); rightTextField = transform.Find("HUDText_Right"); topTextField = transform.Find("HUDText_Top"); bottomTextField = transform.Find("HUDText_Bottom"); centerText = centerTextField.GetComponent<TextMesh>(); leftText = leftTextField.GetComponent<TextMesh>(); rightText = rightTextField.GetComponent<TextMesh>(); topText = topTextField.GetComponent<TextMesh>(); bottomText = bottomTextField.GetComponent<TextMesh>(); }
// Use this for initialization void Awake() { /* Example use case for your code (should be in the scenario class or somewhere) * * MyScenarioClass { * HUDModel myHud = new MyHUDModel(); //<- a HUD model initialized w/ your HUD strings, images * // this model should extend HUDModel_Upright (for upright angles) * // it must extend HUDModel * * HUDController.model = myHud; * * // to change hud models * * HUDController.model = newModel; * * //or do * * myHud.centerText = "new center text"; //to change text * myHud.centerBackingMaterial = myImageMaterial; //to change images * myHud.isCenterImageEnabled = true; //to enable/disable image or text fields * * * */ model = new HUDVRAVE_Default(); //This is the layout that we decided we liked best. The other ones still exist //just in case we want to use them. transform.eulerAngles = model.HUDRotation; centerImageField = transform.Find("HUDImage_Center"); leftImageField = transform.Find("HUDImage_Left"); rightImageField = transform.Find("HUDImage_Right"); centerTextField = transform.Find("HUDText_Center"); leftTextField = transform.Find("HUDText_Left"); rightTextField = transform.Find("HUDText_Right"); topTextField = transform.Find("HUDText_Top"); bottomTextField = transform.Find("HUDText_Bottom"); centerText = centerTextField.GetComponent <TextMesh>(); leftText = leftTextField.GetComponent <TextMesh>(); rightText = rightTextField.GetComponent <TextMesh>(); topText = topTextField.GetComponent <TextMesh>(); bottomText = bottomTextField.GetComponent <TextMesh>(); }
public HUDModel Clone() { HUDModel h = new HUDModel (); h.HUDRotation = this.HUDRotation; h.centerTextPosition = this.centerTextPosition; h.leftTextPosition = this.leftTextPosition; h.rightTextPosition = this.rightTextPosition; h.topTextPosition = this.topTextPosition; h.bottomTextPosition = this.bottomTextPosition; h.leftText = this.leftText; h.rightText = this.rightText; h.topText = this.topText; h.centerText = this.centerText; h.bottomText = this.bottomText; h.centerText = this.centerText; h.centerCharSize = this.centerCharSize; h.leftCharSize = this.leftCharSize; h.rightCharSize = this.rightCharSize; h.topCharSize = this.topCharSize; h.bottomCharSize = this.bottomCharSize; h.centerFontSize = this.centerFontSize; h.leftFontSize = this.leftFontSize; h.rightFontSize = this.rightFontSize; h.topFontSize = this.topFontSize; h.bottomFontSize = this.bottomFontSize; h.isCenterTextEnabled = this.isCenterTextEnabled; h.isLeftTextEnabled = this.isLeftTextEnabled; h.isRightTextEnabled = this.isRightTextEnabled; h.isTopTextEnabled = this.isTopTextEnabled; h.isBottomTextEnabled = this.isBottomTextEnabled; h.centerImagePosition = this.centerImagePosition; h.centerImageScale = this.centerImageScale; h.isCenterImageEnabled = this.isCenterImageEnabled; h.centerBackingMaterial = this.centerBackingMaterial; h.rightImagePosition = this.rightImagePosition; h.rightImageScale = this.rightImageScale; h.isRightImageEnabled = this.isRightImageEnabled; h.rightBackingMaterial = this.rightBackingMaterial; h.leftImagePosition = this.leftImagePosition; h.leftImageScale = this.leftImageScale; h.isLeftImageEnabled = this.isLeftImageEnabled; h.leftBackingMaterial = this.leftBackingMaterial; return h; }