Exemple #1
0
        public RhythmMinigame(Vector2 position, Player owner, IRhythmWeapon item, int bPM, SoundEffect music)
        {
            Position = position;
            BPM      = bPM;

            maxTime = 60f / BPM;

            Notes      = new List <RhythmNote>();
            ComboScale = new InterpolatedFloat(0f, 0.1f, InterpolatedFloat.EaseInOut);
            BeatScale  = new InterpolatedFloat(0, 0.25f);

            Music = music.CreateInstance();

            Music.Volume   = 0;
            Music.IsLooped = true;
            Music.Play();

            MusicVolume = new InterpolatedFloat(0f, 0.25f);
            MusicVolume.Set(0.05f);

            Visibility = new InterpolatedFloat(0f, 0.5f, InterpolatedFloat.EaseInOut);
            Visibility.Set(1f);

            Main.OnTick += MinigameDisposal;

            Owner  = owner;
            Weapon = item;
        }
Exemple #2
0
 public GuitarMinigame(Vector2 position, Player owner, IRhythmWeapon item) : base(position, owner, item, 130, Guitar)
 {
     Left         = new Color(255, 46, 46);
     LeftOutline  = new Color(255, 160, 160);
     Right        = new Color(255, 219, 79);
     RightOutline = new Color(255, 253, 199);
 }