-
-
Save kihira/26366fd94f26c7bb0868cd199c1bdbac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Header("UI")] | |
[SerializeField] private GameObject canvas; | |
private WallInteractable.LogData currLog; | |
private float playingTime = 0f; | |
public void Attach(HandModel handModel, WallInteractable.LogData log) | |
{ | |
hand = handModel; | |
detachedTime = 0f; | |
currLog = log; | |
playingTime = 0f; | |
// TODO show downloading message | |
canvas.SetActive(true); | |
GameObject.Find("Canvas/Text Panel/ScrollView/Text").GetComponent<Text>().text = log.message; | |
GameObject.Find("Canvas/Text Panel/ScrollHandle").GetComponent<DynamicScroll>().DelayedUpdate(0.1f); | |
GetComponent<AudioSource>().clip = log.audio; | |
if (log.autoPlay) GetComponent<AudioSource>().Play(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment