Esempio n. 1
0
 /// <summary>
 /// Loads game HUD UI.
 /// </summary>
 private void LoadHUD()
 {
     scoreSystem.InitialiseScoreSystem(levelData.ConvertToScoreData());
     playerHUD.InitialiseHud(scoreSystem.GetComponent <IScoreEventAssigner>(), levelData, this);
     scoreSystem.IncrementScoreAmount(100);
     scoreSystem.ForceLabelUpdate();
     markerManager = locationManagerObject.GetComponent <IMarkerManager>();
     markerManager.InitialiseMarkerManager();
 }
Esempio n. 2
0
 void captionManager_MarkerLeft(IMarkerManager <CaptionRegion> markerManager, CaptionRegion region)
 {
     if (regions.ContainsKey(region))
     {
         var presenter = regions[region];
         CaptionsPresenterElement.Children.Remove(presenter);
         VisibleCaptions.Remove(region);
         regions.Remove(region);
         presenter.CaptionManager = null;
     }
     OnCaptionRegionLeft(region);
 }
        public TimedTextCaptions(IMarkerManager<CaptionRegion> CaptionManager = null, Func<MediaMarkerCollection<TimedTextElement>, IMarkerManager<TimedTextElement>> RegionManagerFactory = null)
        {
            DefaultStyleKey = typeof(TimedTextCaptions);

            factory.NewMarkers += NewMarkers;
            factory.MarkersRemoved += MarkersRemoved;

            this.SizeChanged += this_SizeChanged;

            captionManager = CaptionManager ?? new MediaMarkerManager<CaptionRegion>();
            regionManagerFactory = RegionManagerFactory ?? (m => new MediaMarkerManager<TimedTextElement>() { Markers = m });

            Captions = new MediaMarkerCollection<CaptionRegion>();

            captionManager.MarkerLeft += captionManager_MarkerLeft;
            captionManager.MarkerReached += captionManager_MarkerReached;
        }
Esempio n. 4
0
        public TimedTextCaptions(IMarkerManager <CaptionRegion> CaptionManager = null, Func <MediaMarkerCollection <TimedTextElement>, IMarkerManager <TimedTextElement> > RegionManagerFactory = null)
        {
            DefaultStyleKey = typeof(TimedTextCaptions);

            factory.NewMarkers     += NewMarkers;
            factory.MarkersRemoved += MarkersRemoved;

            this.SizeChanged += this_SizeChanged;

            captionManager       = CaptionManager ?? new MediaMarkerManager <CaptionRegion>();
            regionManagerFactory = RegionManagerFactory ?? (m => new MediaMarkerManager <TimedTextElement>()
            {
                Markers = m
            });

            Captions = new MediaMarkerCollection <CaptionRegion>();

            captionManager.MarkerLeft    += captionManager_MarkerLeft;
            captionManager.MarkerReached += captionManager_MarkerReached;
        }
Esempio n. 5
0
        void captionManager_MarkerReached(IMarkerManager <CaptionRegion> markerManager, CaptionRegion region)
        {
            OnCaptionRegionReached(region);
            if (!regions.ContainsKey(region))
            {
#if HACK_XAMLTYPEINFO
                var children = region.Children as MediaMarkerCollection <TimedTextElement>;
#else
                var children = region.Children;
#endif
                var regionBlock = new CaptionBlockRegion();
                if (CaptionBlockRegionStyle != null)
                {
                    regionBlock.Style = CaptionBlockRegionStyle;
                }
                regionBlock.CaptionRegion  = region;
                regionBlock.CaptionManager = regionManagerFactory(children);
                regions.Add(region, regionBlock);
                CaptionsPresenterElement.Children.Add(regionBlock);
                regionBlock.ApplyTemplate();
                VisibleCaptions.Add(region);
            }
        }
 void captionManager_MarkerLeft(IMarkerManager<CaptionRegion> markerManager, CaptionRegion region)
 {
     if (regions.ContainsKey(region))
     {
         var presenter = regions[region];
         CaptionsPresenterElement.Children.Remove(presenter);
         VisibleCaptions.Remove(region);
         regions.Remove(region);
         presenter.CaptionManager = null;
     }
     OnCaptionRegionLeft(region);
 }
        void captionManager_MarkerReached(IMarkerManager<CaptionRegion> markerManager, CaptionRegion region)
        {
            OnCaptionRegionReached(region);
            if (!regions.ContainsKey(region))
            {
#if HACK_XAMLTYPEINFO
                var children = region.Children as MediaMarkerCollection<TimedTextElement>;
#else
                var children = region.Children;
#endif
                var regionBlock = new CaptionBlockRegion();
                if (CaptionBlockRegionStyle != null) regionBlock.Style = CaptionBlockRegionStyle;
                regionBlock.CaptionRegion = region;
                regionBlock.CaptionManager = regionManagerFactory(children);
                regions.Add(region, regionBlock);
                CaptionsPresenterElement.Children.Add(regionBlock);
                regionBlock.ApplyTemplate();
                VisibleCaptions.Add(region);
            }
        }
 void _captionManager_MarkerReached(IMarkerManager<TimedTextElement> sender, TimedTextElement marker)
 {
     _mediaPosition = marker.Begin;
     ShowCaption(marker);
 }
 void _captionManager_MarkerLeft(IMarkerManager<TimedTextElement> sender, TimedTextElement marker)
 {
     _mediaPosition = marker.End;
     HideCaption(marker);
 }
Esempio n. 10
0
 void _captionManager_MarkerReached(IMarkerManager <TimedTextElement> sender, TimedTextElement marker)
 {
     _mediaPosition = marker.Begin;
     ShowCaption(marker);
 }
Esempio n. 11
0
 void _captionManager_MarkerLeft(IMarkerManager <TimedTextElement> sender, TimedTextElement marker)
 {
     _mediaPosition = marker.End;
     HideCaption(marker);
 }