public void OnHotSpotShoesPressed(int index) // different approach { // for (int i = 0; i < openButtons.Length; i++) // { // GameObject openButton = openButtons[i] as GameObject; // Animator animator = openButton.GetComponent <Animator> (); // animator.SetBool("Normal", true); // } //OnCloseButtonHit (previousIndex); TurnOffAllVideosAndCloseButtons(); SetDimState(true); vcr.OnOpenVideoFileAtIndex(index); // increments and plays using _videoIndex DisplayIMGUI videoDisplay = hotSpotVideos [index] as DisplayIMGUI; //videoDisplay._mediaPlayer.Control.SetLooping (false); videoDisplay.gameObject.SetActive(true); videoDisplay._mediaPlayer.Play(); Debug.Log("On start hotspot pressed = " + index); isHotSpotDisplayed = true; }
public void DoPlayMenuVideo(DisplayIMGUI videoDisplay) { videoDisplay.gameObject.SetActive(true); videoDisplay._mediaPlayer.Rewind(false); videoDisplay._mediaPlayer.Play(); // videoDisplay._mediaPlayer.Events.AddListener(OnMenuMediaPlayer); }
public void Awake() { GraphicsSettingUtil.SetTargetFrameRate(60); GeneralLogicManager.InitOnGameStart(); Singleton <MainUIManager> .Instance.SetMainCanvas(this); this.assetbundleRetryTimes = 0; this._status = Status.Default; this._retryAssetBundleWaitTimer = 0f; this._videoPlayer = base.transform.Find("Video/VideoPlayer").GetComponent <MediaPlayer>(); this._videoPlayer.Events.AddListener(new UnityAction <MediaPlayer, MediaPlayerEvent.EventType, ErrorCode>(this.OnVideoEvent)); this._videoPlayer.gameObject.SetActive(false); this._videoDisplay = base.transform.Find("Video/VideoDisplay").GetComponent <DisplayIMGUI>(); this._videoDisplay.gameObject.SetActive(false); base.transform.Find("Video/BlackPanel").gameObject.SetActive(false); base.transform.Find("Video").gameObject.SetActive(false); }
public void OnHotSpotPressed(int index) { TurnOffAllVideosAndCloseButtons(); TurnOnButtonsExceptRequested(index); vcr.OnOpenVideoFileAtIndex(index); // increments and plays using _videoIndex DisplayIMGUI videoDisplay = hotSpotVideos [index] as DisplayIMGUI; videoDisplay._mediaPlayer.Control.SetLooping(false); videoDisplay.gameObject.SetActive(true); Debug.Log("On start hotspot pressed = " + index); isHotSpotDisplayed = true; }
public void OnPlayMenuVideo(DisplayIMGUI videoDisplay) { TurnAllSelectionsOff(); hotSpotsController.SetHotSpotButtonsToActive(false); hotSpotsController.textInvite.gameObject.SetActive(false); mainMenuController.DoPlayMenuVideo(videoDisplay); // punt switch (videoDisplay.tag) { case "HowItWorks": _appManager.currentState = AppManager.UIState.UIStateHowItWorks; break; case "WatchVideo": _appManager.currentState = AppManager.UIState.UIStateWatchVideo; break; default: return; } }
public void Init(string filePath, System.Action callback) { bFadeOK = bLoadOK = false; _filePath = filePath; cbOnFinished = callback; _mediaPlayer = GetComponentInChildren <MediaPlayer>(); _display = GetComponentInChildren <DisplayIMGUI>(); _mediaPlayer.Events.AddListener(OnMediaPlayerEvent); LoadVideo(filePath); _mediaPlayer.m_Volume = 0.3f; ThirdPersonPlayer.Instance.CanOperate = false; if (BGM.Instance) { BGM.Instance.source.mute = true; } _display.gameObject.SetActive(false); fadeLoad = FadeEffect.Play(new Color(1, 1, 1, 0), Color.white, 1, () => { bFadeOK = true; TryPlayVedio(); }); fadeLoad.AutoDestroy = false; }
// Use this for initialization public new void initialization() { base.initialization(); animator = GetComponent <Animator>(); displayIMGUI = GetComponent <DisplayIMGUI>(); }