예제 #1
0
 public void RingPlacedEvent(VideoItemModel curVideoItem)
 {
     if (OnRingPlacedEvent != null)
     {
         OnRingPlacedEvent(curVideoItem);
     }
 }
    IEnumerator DisplayClue(VideoItemModel curVideoItemModel, bool isClue)
    {
        float animSpeed = 0.4f;

        GameObject  clueGameObj = curVideoItemModel.ClueObj;
        CanvasGroup clueCanvas  = clueGameObj.GetComponent <CanvasGroup>();

        if (clueCanvas != null)
        {
            clueCanvas.alpha = 0;
        }
        clueCanvas.DOFade(1.0f, animSpeed);
        clueGameObj.transform.DOLocalMoveY(-200f, 0f);
        clueGameObj.transform.DOLocalRotate(new Vector3(0f, 50f, 0f), 0f);
        clueGameObj.transform.DOLocalRotate(new Vector3(0f, 0f, 0f), animSpeed).SetDelay(0.1f);
        clueGameObj.transform.DOLocalMoveY(0, animSpeed).SetDelay(0.1f).SetEase(Ease.OutBack);
        DOTween.To(() => CameraVideoPlayer.targetCameraAlpha, x => CameraVideoPlayer.targetCameraAlpha = x, 0f, animSpeed);
        clueGameObj.SetActive(true);
        yield return(new WaitForSeconds(_CluePauseTime));

        clueGameObj.SetActive(false);
        //if we're a clue we get a random video clip instead of the assigned one
        if (isClue)
        {
            //determine the video clip to use
            VideoClip videoClip = MainClueController.GetVideoById(curVideoItemModel.KeyIDStr);
            curVideoItemModel.VideoSource = videoClip;
        }

        EventManager.Instance.VideoStartEvent(curVideoItemModel);
    }
예제 #3
0
 public void VideoStartEvent(VideoItemModel curVideoItem)
 {
     if (OnVideoStartEvent != null)
     {
         OnVideoStartEvent(curVideoItem);
     }
 }
예제 #4
0
        public VideoItemViewModel()
        {
            _Model = new VideoItemModel();

            //よくわからない modelに通知できていない
            var modelListener = new PropertyChangedEventListener(_Model, (sender, e) => RaisePropertyChanged(() => this.Text));

            base.CompositeDisposable.Add(modelListener);
        }
 /// <summary>
 /// We know our final keyed in value, check against our keys to see what we should do
 /// </summary>
 void CheckFinalCode()
 {
     for (int i = 0; i < VideoItemsList.Count; i++)
     {
         VideoItemModel curVideoItem = VideoItemsList[i];
         if (_CurInputStr == curVideoItem.KeyIDStr)
         {
             curVideoItem.MethodToFire.Invoke();
             //EventManager.Instance.SauronVideoStart();
         }
     }
 }
예제 #6
0
    void EventManager_OnVideoStartEvent(VideoItemModel curVideoItem)
    {
        Color curColor = curVideoItem.LightRGB;

        int     maxVal        = 255;
        int     rVal          = Mathf.RoundToInt(curColor.r * maxVal);
        int     gVal          = Mathf.RoundToInt(curColor.g * maxVal);
        int     bVal          = Mathf.RoundToInt(curColor.b * maxVal);
        Vector2 newLightColor = Utils.Instance.RGBToXY(rVal, gVal, bVal);

        SetLightColor(newLightColor);
    }
 public void OnRingPlaced(VideoItemModel curVideoItemModel)
 {
     EventManager.Instance.RingPlacedEvent(curVideoItemModel);
     if (curVideoItemModel.ClueObj != null)
     {
         StartCoroutine(DisplayClue(curVideoItemModel, curVideoItemModel.IsClue));
     }
     else
     {
         _IsOneRingFound = curVideoItemModel.IsOneRing;
         EventManager.Instance.VideoStartEvent(curVideoItemModel);
     }
 }
 void EventManager_OnVideoStartEvent(VideoItemModel curVideoItem)
 {
     PlayExternalClip(curVideoItem.VideoSource);
 }
 public VideoItemViewModel(VideoItemModel model) : base(model)
 {
     this.Model = model;
 }