public AvatarToPlayerNotifications GetPlayerNotifications() { var notifications = new AvatarToPlayerNotifications(); notifications.player = new Player(); notifications.player.playerInteraction = new PlayerInteraction(); return(notifications); }
public void PlayScene(AvatarToPlayerNotifications notifications) { Debug.Log($"PlayScene! {name} resuming: {isResuming} {Time.time}"); DebugUtilities.Assert(notifications != null, "Player notifications can not be null"); playerNotifications = notifications; if (fadeAtStart) { fadeInOut.FadeOut(fadeOutTime); fadeOutDoneAt = Time.time + fadeOutTime; } else { fadeOutDoneAt = Time.time; } }
public void PlayMovie(AvatarToPlayerNotifications playerNotification, VideoClip videoClip, MovieEnd function) { if (fadeListener == null) { fadeListener = GameObject.FindGameObjectWithTag("Listener").GetComponent <FadeListener>(); } fadeListener.SetTargetVolume(0); fadeListener.OnFadeListener(0); playerNotifications = playerNotification; listenerHandle = playerNotifications.AttachListener(transform); videoPlayer = gameObject.AddComponent <VideoPlayer>(); videoPlayer.clip = videoClip; videoPlayer.targetTexture = renderTexture; videoPlayer.Play(); Debug.Log("Play Movie:" + videoPlayer.name); endFunction = function; waitingForPlay = true; Time.timeScale = 0; fadeInFadeOut.SetToBlack(); }