private IDisplayObject showVideo() { GameObject newObj = Instantiate(VideoPrefab, Root, false); displayObject = newObj.GetComponent <IDisplayObject>(); displayObject.Show(youtubeUrl); return(displayObject); }
private IDisplayObject showPresent() { GameObject newObj = Instantiate(PresentPrefab, Root, false); displayObject = newObj.GetComponent <IDisplayObject>(); displayObject.Show(); return(displayObject); }
public void Close() { if (displayObject != null) { Destroy(displayObject.gameObject); displayObject = null; } }
private IDisplayObject showVideo() { GameObject newObj = Instantiate(VideoPrefab, Root, false); displayObject = newObj.GetComponent <IDisplayObject>(); Debug.LogFormat("{0}", pandoBoxInfo.videoUrl); displayObject.Show(pandoBoxInfo.urlLink, gameObject, "onVideoPlayedCompleted"); return(displayObject); }
public void Show() { if (displayObject != null) { Close(); } switch (Type) { case InteractiveObjectType.Present: displayObject = showPresent(); break; case InteractiveObjectType.VideoPlayer: displayObject = showVideo(); break; } }