| | 1 | | using System; |
| | 2 | | using TMPro; |
| | 3 | | using UnityEngine; |
| | 4 | | using UnityEngine.UI; |
| | 5 | |
|
| | 6 | | [Serializable] |
| | 7 | | public class BuilderInWorldLoadingTipModel |
| | 8 | | { |
| | 9 | | public string tipMessage; |
| | 10 | | public Sprite tipImage; |
| | 11 | | } |
| | 12 | |
|
| | 13 | | /// <summary> |
| | 14 | | /// Represents a tip for the BIW loading. |
| | 15 | | /// </summary> |
| | 16 | | public class BuilderInWorldLoadingTip : MonoBehaviour |
| | 17 | | { |
| | 18 | | [SerializeField] internal TMP_Text tipText; |
| | 19 | | [SerializeField] internal Image tipImage; |
| | 20 | |
|
| | 21 | | /// <summary> |
| | 22 | | /// Configures the tip with a message and an image. |
| | 23 | | /// </summary> |
| | 24 | | /// <param name="tipModel">Model with the needed tip info.</param> |
| | 25 | | public void Configure(BuilderInWorldLoadingTipModel tipModel) |
| | 26 | | { |
| 32 | 27 | | tipText.text = tipModel.tipMessage; |
| 32 | 28 | | tipImage.sprite = tipModel.tipImage; |
| 32 | 29 | | } |
| | 30 | | } |