コード例 #1
0
        protected BaseInputter(HitBarDisplay hitBar, HitObjectHolder hitObjectHolder)
        {
            this.hitBar          = hitBar;
            this.hitObjectHolder = hitObjectHolder;

            hitBarCursor = CreateCursor();
            hitBar.LinkCursor(hitBarCursor);

            keyRecycler = new ManagedRecycler <BeatsKey>(CreateKey);
            keyRecycler.Precook(3);
        }
コード例 #2
0
        /// <summary>
        /// Event called on game session hard disposal.
        /// </summary>
        protected virtual void OnHardDispose()
        {
            GameSession.OnSoftInit    -= OnSoftInit;
            GameSession.OnSoftDispose -= OnSoftDispose;
            GameSession.OnHardDispose -= OnHardDispose;

            hitBar.UnlinkCursor();

            hitBar          = null;
            hitObjectHolder = null;
            hitBarCursor    = null;
            keyRecycler     = null;
            pointerEvent    = null;
            raycastResults  = null;
        }
コード例 #3
0
        private void Init()
        {
            Dependencies.Cache(this);

            GameSession.OnHardInit    += OnHardInit;
            GameSession.OnHardDispose += OnHardDispose;

            bgSprite = CreateChild <UguiSprite>("bg", 0);
            {
                bgSprite.Anchor     = AnchorType.Fill;
                bgSprite.Offset     = Offset.Zero;
                bgSprite.SpriteName = "gradation-bottom";
                bgSprite.Color      = new Color(0f, 0f, 0f, 0.75f);

                var shadow = bgSprite.CreateChild <UguiSprite>("shadow", 1);
                {
                    shadow.Anchor     = AnchorType.Fill;
                    shadow.Offset     = new Offset(-30f);
                    shadow.SpriteName = "glow-square-32-x2";
                    shadow.ImageType  = Image.Type.Sliced;

                    var gradient = shadow.AddEffect(new GradientEffect()).Component;
                    gradient.direction = UIGradient.Direction.Vertical;
                    gradient.color1    = new Color(0f, 0f, 0f, 0f);
                    gradient.color2    = Color.black;
                }
            }
            hitBarDisplay = CreateChild <HitBarDisplay>("hit-bar", 1);
            {
                hitBarDisplay.Anchor = AnchorType.BottomStretch;
                hitBarDisplay.SetOffsetHorizontal(0f);
                hitBarDisplay.Y      = HitPosition;
                hitBarDisplay.Height = HitPosition * 2f;
            }
            hitObjectHolder = CreateChild <HitObjectHolder>("obj-holder", 2);
            {
                hitObjectHolder.Anchor = AnchorType.Bottom;
                hitObjectHolder.Y      = 0f;
            }
            playAreaFader = CreateChild <PlayAreaFader>("fader", 3);
            {
                playAreaFader.Anchor = AnchorType.BottomStretch;
                playAreaFader.Pivot  = PivotType.Bottom;
                playAreaFader.SetOffsetHorizontal(0f);
                playAreaFader.Y      = FadeStartPos;
                playAreaFader.Height = 10000f;
            }
        }
コード例 #4
0
 public ReplayInputter(FileInfo replayFile, HitBarDisplay hitBar, HitObjectHolder hitObjectHolder) : base(hitBar, hitObjectHolder)
 {
     base.replayFile = replayFile;
 }
コード例 #5
0
 public LocalPlayerInputter(HitBarDisplay hitBar, HitObjectHolder hitObjectHolder) : base(hitBar, hitObjectHolder)
 { }