Esempio n. 1
0
 private void InitSprites()
 {
     _updaterFrame = new Sprite3D
     {
         Texture = TextureManager.Textures("UpdaterFrame"),
     };
 }
Esempio n. 2
0
        private void InitSprites()
        {
            _meterSprite = new SpriteMap3D
            {
                Columns = 1,
                Rows    = BpmLevels.Count(),
                Texture = TextureManager.Textures("BpmMeterOverlay")
            };
            _baseSprite = new Sprite3D
            {
                Texture = TextureManager.Textures("BpmMeterBase")
            };
            _songLengthBase = new Sprite3D
            {
                Texture = TextureManager.Textures("LengthDisplayBase")
            };

            _songTitleBase = new Sprite3D {
                Texture = TextureManager.Textures("SongTitleBase")
            };


            _baseBlinkSprite = new Sprite3D
            {
                Texture = TextureManager.Textures("BpmMeterBlink"),
            };

            _warningSprite = new Sprite3D
            {
                Texture = TextureManager.Textures("RestrictionIcon"),
                Size    = new Vector2(64, 64)
            };
            RepositionSprites();
        }
Esempio n. 3
0
 private void InitSprites()
 {
     _partsSpriteMap = new SpriteMap3D
     {
         Texture = TextureManager.Textures("PerformanceBarParts"),
         Columns = 1,
         Rows    = 6
     };
     _leftSpriteMap = new SpriteMap3D
     {
         Texture = TextureManager.Textures("PerformanceBarLeft"),
         Columns = 1,
         Rows    = 6
     };
     _middleSprite = new Sprite3D {
         Texture = TextureManager.Textures("PerformanceBarMiddle")
     };
     _rightSprite = new Sprite3D {
         Texture = TextureManager.Textures("PerformanceBarRight")
     };
     _headerSprite = new Sprite3D
     {
         Texture = TextureManager.Textures("PerformanceBarHeader"),
         Size    = Metrics["PerformanceBarHeader.Size", 0]
     };
 }
Esempio n. 4
0
        private void Initialize()
        {
            _mySprite = new Sprite3D
            {
                Texture      = TextureManager.BlankTexture(),
                Height       = this.Height,
                Width        = this.Width,
                ColorShading = Colour,
            };
            _spectrumDrawer = new SpectrumDrawer
            {
                Position     = new Vector2(0, GameCore.INTERNAL_HEIGHT),
                Size         = new Vector2(BAR_WIDTH, -BAR_HEIGHT),
                ColorShading = Colour,
                LevelsCount  = WAVEFORM_POINTS
            };
            _spectrumDrawerTop = new SpectrumDrawer
            {
                Position     = new Vector2(0, 0),
                Size         = new Vector2(BAR_WIDTH, BAR_HEIGHT),
                ColorShading = Colour,
                LevelsCount  = WAVEFORM_POINTS
            };

            _waveformDrawer = new WaveformDrawer
            {
                ColorShading = Colour,
                Size         = new Vector2(GameCore.INTERNAL_WIDTH, GameCore.INTERNAL_HEIGHT / 4),
                Position     = new Vector2(0, GameCore.INTERNAL_HEIGHT / 2),
            };
            _waveformDrawer.Init();
            _spectrumDrawer.Init();
        }
Esempio n. 5
0
 private void InitSprites()
 {
     _background = new Sprite3D
     {
         Texture = TextureManager.Textures("PlayerOptionsFrame")
     };
     _speedBlocks = new Sprite3D
     {
         Texture = TextureManager.Textures("PlayerOptionsSpeedBlocks")
     };
     _difficultyIcons = new SpriteMap3D
     {
         Columns = 1,
         Rows    = (int)Difficulty.Count + 1,
         Texture = TextureManager.Textures("PlayerDifficulties")
     };
     _indicatorArrows = new SpriteMap3D
     {
         Columns = 4,
         Rows    = 1,
         Texture = TextureManager.Textures("IndicatorArrows")
     };
     _playerIdentifiers = new SpriteMap3D
     {
         Columns = 1,
         Rows    = 5,
         Texture = TextureManager.Textures("PlayerIdentifiers")
     };
     _nameBackground = new Sprite3D {
         Texture = TextureManager.BlankTexture()
     };
 }
Esempio n. 6
0
 private void InitSprites()
 {
     _backgroundSprite = new Sprite3D {
         Texture = TextureManager.Textures("ActionBindingBase")
     };
     _controllerNumberSpriteMap = new SpriteMap3D
     {
         Columns = 4,
         Rows    = 1,
         Texture = TextureManager.Textures("KeyOptionControllerPlayerIcons")
     };
     _controllerButtonsSpriteMap = new SpriteMap3D
     {
         Columns = 5,
         Rows    = 5,
         Texture =
             TextureManager.Textures("KeyOptionControllerButtonIcons")
     };
     _keyboardIcon = new Sprite3D
     {
         Texture = TextureManager.Textures("KeyOptionKeyboardIcon"),
         Width   = 35,
         Height  = 30
     };
 }
Esempio n. 7
0
        private void InitSprites()
        {
            _partsSpriteMap = new SpriteMap3D
            {
                Texture = TextureManager.Textures("PerformanceBarParts"),
                Columns = 1,
                Rows    = 6
            };
            _leftSpriteMap = new SpriteMap3D
            {
                Texture = TextureManager.Textures("PerformanceBarLeft"),
                Columns = 1,
                Rows    = 6
            };

            _middleSprite = new Sprite3D {
                Texture = TextureManager.Textures("RecordReplayBarMiddle")
            };
            _rightSprite = new Sprite3D {
                Texture = TextureManager.Textures("PerformanceBarRight")
            };
            _headerSprite = new Sprite3D
            {
                Texture = TextureManager.Textures("RecordReplayBarHeader"),
                Size    = new Vector2(290, 30)
            };
        }
Esempio n. 8
0
        private void InitSprites()
        {
            _basePart = new Sprite3D
            {
                Height  = this.Height,
                Width   = this.Width,
                Texture = TextureManager.Textures("CoopLifeBarBase")
            };

            _gridPart = new Sprite3D
            {
                X       = this.X + 2,
                Y       = this.Y + 3,
                Texture = TextureManager.Textures("LifeBarGridBase")
            };

            _sidePart = new Sprite3D
            {
                Texture = TextureManager.Textures("LifeBarBaseCoop"),
                Size    = SideSize,
            };

            _middlePart = new Sprite3D {
                Texture = TextureManager.Textures("CoopLifeBarMiddle"), Position = MiddlePosition, Size = MiddleSize
            };

            _frontPart = new SpriteMap3D {
                Columns = 1, Rows = 4, Texture = TextureManager.Textures("LifeBarFront")
            };

            _overchargePart = new Sprite3D
            {
                Texture = TextureManager.Textures("LifeBarOvercharge2"),
                Height  = this.Height - 6,
                Y       = this.Y + 3
            };

            _blazingPart = new Sprite3D
            {
                Texture  = TextureManager.Textures("LifeBarBlazingCoop"),
                Position = this.Position,
                Size     = this.Size
            };
            _blazingSidePart = new Sprite3D
            {
                Texture = TextureManager.CreateWhiteMask("LifeBarBaseCoop"),
                Size    = SideSize
            };

            _blazingMiddlePart = new Sprite3D
            {
                Texture  = TextureManager.Textures("CoopLifebarMiddleBlazing"),
                Position = _middlePart.Position,
                Size     = _middlePart.Size
            };
            _overchargeOffsetClip = _overchargePart.Texture.Width;
        }
Esempio n. 9
0
 private void InitSprites()
 {
     _levelBaseSprite = new Sprite3D
     {
         Texture = TextureManager.Textures("PlayerLevelBarBase"),
     };
     _levelFrontSprite = new Sprite3D
     {
         Texture = TextureManager.Textures("PlayerLevelBarFront"),
     };
 }
Esempio n. 10
0
        private void InitDefaults()
        {
            SegmentIndex = 0;

            Particle = new Sprite3D() //temp
            {
                Texture = TextureManager.Textures("Particle_1")
            };

            Wrap         = true;
            PathPosition = 0.0;
            StepSize     = 0.001;
            Points       = new List <Vector2>(4);
        }
Esempio n. 11
0
        private void InitSprites()
        {
            _markerSprite = new SpriteMap3D
            {
                Columns = 1,
                Rows    = 6,
                Texture = TextureManager.Textures("BeatMarkers"),
            };

            _pulseFront = new SpriteMap3D
            {
                Texture = TextureManager.Textures("BeatMeterPulseFront"),
                Rows    = 5,
                Columns = 1,
            };

            _pulseBack = new SpriteMap3D
            {
                Texture = TextureManager.Textures("BeatMeterPulseBack"),
                Rows    = 5,
                Columns = 1,
            };
            _baseSprite = new Sprite3D
            {
                Texture  = TextureManager.Textures("BeatMeter"),
                Position = this.Position,
                Size     = this.Size
            };

            _beatlineEffects = new SpriteMap3D
            {
                Texture = TextureManager.Textures("BeatlineEffectIcons"),
                Columns = 1,
                Rows    = 4
            };
            _playerIdentifiers = new SpriteMap3D
            {
                Texture = TextureManager.Textures("BeatlinePlayerIdentifiers"),
                Columns = 1,
                Rows    = 5
            };
            _speedScaleSprite = new Sprite3D
            {
                Texture = TextureManager.Textures("BeatlineSpeedScale"),
                Size    = new Vector2(this.Width - LEFT_SIDE - 25, 5),
                X       = (float)(this.Position.X + (LEFT_SIDE + IMPACT_WIDTH) * WidthRatio),
                Y       = (this.Position.Y + (this.Height / 2.0f) - 2)
            };
        }
Esempio n. 12
0
 private void InitSprites()
 {
     _barSpriteBack = new Sprite3D
     {
         Texture  = TextureManager.Textures("GrooveMomentumBarBack"),
         Position = this.Position,
         Size     = this.Size
     };
     _barSpriteFront = new Sprite3D
     {
         Texture  = TextureManager.Textures("GrooveMomentumBarFront"),
         Position = this.Position + this.BarOffset,
         Size     = this.Size - this.BarOffset
     };
 }
Esempio n. 13
0
 public void InitSprites()
 {
     _teamBaseSprite = new Sprite3D {
         Texture = TextureManager.Textures("ScoreBaseTeam")
     };
     _teamGridSprite = new Sprite3D {
         Texture = TextureManager.Textures("ScoreGridTeam")
     };
     _tugBlueSprite = new Sprite3D {
         Texture = TextureManager.Textures("TugOfWarBlue")
     };
     _tugRedSprite = new Sprite3D {
         Texture = TextureManager.Textures("TugOfWarRed")
     };
 }
Esempio n. 14
0
 private void InitSprites()
 {
     _barParts = new SpriteMap3D
     {
         Columns = 1, Rows = 5, Texture = TextureManager.Textures("SongTimeLineParts")
     };
     _barEdges = new SpriteMap3D {
         Columns = 2, Rows = 1, Texture = TextureManager.Textures("SongTimeLineEdges")
     };
     _currentPosition = new Sprite3D
     {
         Texture = TextureManager.Textures("SongTimeLineCurrentPosition"),
         Width   = 6
     };
 }
Esempio n. 15
0
 private void InitSprites()
 {
     _specialChars = new SpriteMap3D
     {
         Columns = 3, Rows = 1, Texture = TextureManager.Textures("KeyboardIcons")
     };
     _barSideSpriteMap = new SpriteMap3D
     {
         Texture = TextureManager.Textures("TextEntryBarSide"),
         Rows    = 2,
         Columns = 1
     };
     _barMiddleSprite = new Sprite3D {
         Texture = TextureManager.Textures("TextEntryBarMiddle")
     };
 }
Esempio n. 16
0
 private void InitSprites()
 {
     _edgeSpriteMap = new SpriteMap3D {
         Columns = 1, Rows = 2, Texture = TextureManager.Textures("MenuEdge")
     };
     _arrowSpriteMap = new SpriteMap3D
     {
         Columns = 4, Rows = 1, Texture = TextureManager.Textures("IndicatorArrows")
     };
     _sideSpriteMap = new SpriteMap3D {
         Columns = 1, Rows = 1, Texture = TextureManager.Textures("MenuSide")
     };
     _selectedItemSprite = new Sprite3D {
         Texture = TextureManager.Textures("MenuSelectedItem")
     };
 }
Esempio n. 17
0
 public void InitSprites()
 {
     _backgroundSprite = new Sprite3D {
         Texture = TextureManager.Textures("SongSortBackground")
     };
     _arrowSprites = new SpriteMap3D {
         Texture = TextureManager.Textures("IndicatorArrows"), Columns = 4, Rows = 1
     };
     _listBackgroundSprite = new Sprite3D
     {
         Texture = TextureManager.Textures("SongSortListBackground"),
         X       = (this.X + this.Width - 75),
         Y       = this.Y + this.Height,
         Width   = 75
     };
     _textPosition = new Vector2();
 }
Esempio n. 18
0
 public void InitSprites()
 {
     _difficultySpriteMap = new SpriteMap3D
     {
         Columns = 1,
         Rows    = (int)Difficulty.Count + 1,
         Texture = TextureManager.Textures("PlayerDifficulties")
     };
     _gradeSpriteMap = new SpriteMap3D
     {
         Columns = 1,
         Rows    = NUM_EVALUATIONS,
         Texture = TextureManager.Textures("EvaluationGrades")
     };
     _baseSprite = new Sprite3D {
         Texture = TextureManager.Textures("HighScoreFrame")
     };
 }
Esempio n. 19
0
 private void InitSprites()
 {
     _capsLockSprite = new Sprite3D {
         Texture = TextureManager.Textures("TextEntryCaps")
     };
     _shiftSprite = new Sprite3D {
         Texture = TextureManager.Textures("TextEntryShift")
     };
     _barSideSpriteMap = new SpriteMap3D
     {
         Texture = TextureManager.Textures("TextEntryBarSide"),
         Rows    = 2,
         Columns = 1
     };
     _barMiddleSprite = new Sprite3D {
         Texture = TextureManager.Textures("TextEntryBarMiddle")
     };
 }
Esempio n. 20
0
        public void Draw(float[] levels)
        {
            if (!_spritesInit)
            {
                _spritesInit = true;
                _barSprite   = new Sprite3D {
                    Texture = TextureManager.Textures("SpectrumBar")
                };
                Init();
            }
            if (levels.Length > LevelsCount)
            {
                throw new ArgumentException(
                          "Levels array size is too large. Set the LevelsCount property to match its length first.");
            }

            float posX = 0;

            for (int x = 0; x < levels.Count(); x++)
            {
                _maxLevels[x] = Math.Max(_maxLevels[x], levels[x]);
                levels[x]    /= _maxLevels[x];

                if (levels[x] >= _lineLevels[x])
                {
                    _dropSpeed[x]  = 0.0f;
                    _lineLevels[x] = levels[x];
                }
                else
                {
                    _dropSpeed[x]  += 1.5f * (float)TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds;
                    _lineLevels[x] -= _dropSpeed[x] * (float)TextureManager.LastGameTime.ElapsedRealTime.TotalSeconds;
                }

                _barSprite.ColorShading = this.ColorShading;
                _barSprite.Position     = new Vector2(this.X + posX, this.Y);
                _barSprite.Size         = new Vector2(this.Width, this.Height * levels[x]);
                _barSprite.DrawTiled(0, 0, _barSprite.Texture.Width, _barSprite.Height * 2);
                posX += this.Width;
            }


            DrawLineLevels();
        }
Esempio n. 21
0
        private void InitSprites()
        {
            _basePart = new Sprite3D
            {
                Texture  = TextureManager.Textures("LifeBarBase"),
                Position = this.Position,
                Size     = this.Size
            };
            _frontPart = new SpriteMap3D
            {
                Texture = TextureManager.Textures("LifeBarFront"),
                Columns = 1,
                Rows    = 4
            };

            _overchargePart = new Sprite3D
            {
                Texture  = TextureManager.Textures("LifeBarOvercharge"),
                Position = new Vector2(this.X + BAR_X_OFFSET, this.Y - 3),
                Height   = this.Height + 6,
            };

            _2ndOverchargePart = new Sprite3D
            {
                Texture  = TextureManager.Textures("LifeBarOvercharge2"),
                Position = new Vector2(this.X + BAR_X_OFFSET, this.Y - 3),
                Height   = this.Height + 6
            };
            _gridPart = new Sprite3D
            {
                Texture  = TextureManager.Textures("LifeBarGridBase"),
                Position = new Vector2(this.X + BAR_X_OFFSET, this.Y + 3),
                Size     = new Vector2(this.Width - BAR_X_OFFSET, this.Height - 6),
            };
            _blazingPart = new Sprite3D
            {
                Texture  = TextureManager.Textures("LifeBarBlazing"),
                Position = this.Position,
                Size     = this.Size
            };
            _overchargeOffsetClip = _overchargePart.Texture.Width;
            _textPosition         = this.Position.Clone();
            _textPosition.X      += 25;
        }
Esempio n. 22
0
        public void DrawVertices(VertexPositionColorTexture[] vertices)
        {
            if (vertices.Length % 3 != 0)
            {
                throw new ArgumentException("Wrong number of vertices supplied. Should be divisible by 3.");
            }
            Device.RenderState.CullMode      = CullMode.None;
            Device.SamplerStates[0].AddressU = TextureAddressMode.Clamp;
            Device.SamplerStates[0].AddressV = TextureAddressMode.Clamp;
            var effect = Sprite3D.GetEffect();

            Device.VertexDeclaration = Sprite3D.VertexDeclaration;
            effect.Texture           = this.Texture;
            effect.Begin();
            foreach (var pass in effect.CurrentTechnique.Passes)
            {
                pass.Begin();
                Device.DrawUserPrimitives(PrimitiveType.TriangleList, vertices, 0, vertices.Length / 3);
                pass.End();
            }
            effect.End();
        }
Esempio n. 23
0
 private void InitSprites()
 {
     _baseSprite = new Sprite3D
     {
         Texture  = TextureManager.Textures("NoteBarProgressBase" + TextureSuffix),
         Position = this.Position.Clone(),
         Height   = this.Height,
         Width    = this.Width
     };
     _frontSprite = new Sprite3D
     {
         Texture  = TextureManager.Textures("NoteBarProgressFront" + TextureSuffix),
         Position = this.Position.Clone(),
         Height   = this.Height,
         Width    = this.Width
     };
     _readySprite = new Sprite3D
     {
         Texture  = TextureManager.Textures("NoteBarProgressReady" + TextureSuffix),
         Position = this.Position.Clone(),
         Height   = this.Height,
         Width    = this.Width
     };
 }
Esempio n. 24
0
        private void InitSprites()
        {
            _maxBarWidth = this.Width - 52;
            _barPosition = new Vector2(this.X + 4, this.Y + 3);
            _baseSprite  = new Sprite3D
            {
                Texture  = TextureManager.Textures("LevelBarBase"),
                Position = this.Position,
                Size     = this.Size
            };

            _maxBaseSprite = new Sprite3D
            {
                Texture  = TextureManager.Textures("LevelBarMaxBase"),
                Position = this.Position,
                Size     = new Vector2(this.Width, this.Height)
            };

            _barSprite = new SpriteMap3D
            {
                Columns = 1,
                Rows    = 12,
                Texture = TextureManager.Textures("LevelBarFronts")
            };

            _maxFrontSprite = new Sprite3D
            {
                Texture  = TextureManager.Textures("LevelBarMaxFront"),
                Position = _barPosition,
                Size     = new Vector2(_maxBarWidth, this.Height - 6)
            };

            _textPosition = new Vector2(this.X + this.Width - 25, this.Y + 3);

            _spritesInit = true;
        }