Beispiel #1
0
 public BeatRow(Game game, RowCompassLocation location, int numLanes) : base(game)
 {
     laneCount       = numLanes;
     compassLocation = location;
     BarsNeedFlipped = false;
     rowRectangle    = new Rectangle();
 }
Beispiel #2
0
        public BeatManager(Game game, BarManager barManager, Rectangle region, int laneCount, RowCompassLocation compassLocation) : base(game)
        {
            bM              = barManager;
            beatsToRemove   = new List <Beat>();
            wrongbeats      = new List <Beat>();
            beatsRowID      = new Dictionary <Beat, int>();
            LaneSpawnPoints = new List <Vector2>();
            Vector2 SpawnPointOffSet = new Vector2(0, 0);

            switch (compassLocation)
            {
            case RowCompassLocation.North:
                speed            = 30f;
                SpawnPointOffSet = new Vector2(0, -region.Height);
                break;

            case RowCompassLocation.South:
                speed            = 30f;
                SpawnPointOffSet = new Vector2(0, region.Height);
                break;

            case RowCompassLocation.East:
                speed            = 50f;
                SpawnPointOffSet = new Vector2(region.Width, 0);
                break;

            case RowCompassLocation.West:
                speed            = 50f;
                SpawnPointOffSet = new Vector2(-region.Width, 0);
                break;
            }
            progressionDirection = -SpawnPointOffSet;
            progressionDirection.Normalize();
            for (int i = 0; i < laneCount; i++)
            {
                Vector2 point = barManager.getBarMidPointByIndex(i) + SpawnPointOffSet;
                LaneSpawnPoints.Add(point);
            }
        }