Exemplo n.º 1
0
    // this is old
    public override TrickResults CalculateResults(GnoteBar bar, GnoteSequence cSequence, PlayerHistory history)
    {
        Gnote gPrev = bar.PreviousNote ();
        Gnote g = bar.LastNote ();
        if (gPrev != null) {
            if (g.GetKey () == gPrev.GetKey ()) {
                return new WasSameKeyResult();
            }
        }

        if (g != null) {
            if (g.GetKey () == cSequence.anchorKey) {
                return new WasAnchorKeyResult ();
            }
        }

        KeyScoreValue ksv = KeyData.Instance.GetKeyScoreValue (g.GetKey ());
        if (ksv != null) {
            string trickCaption = ksv.name;
            float trickScore = ksv.points;
            return new TrickResults(trickScore, 0, trickCaption);
        } else {
            return new TrickResults();
        }
    }
Exemplo n.º 2
0
    public override void UpdateTrickChain(GnoteBar bar, GnoteSequence cSequence, PlayerHistory history)
    {
        Gnote hitNote = bar.LastNote ();
        Gnote previousNote = bar.PreviousNote ();
        if (previousNote == null) {
            // this is the first note, so we cool.
            return;
        }
        string hitString = hitNote.GetKey ();
        string previousString = previousNote.GetKey ();

        if (bar.ContainsNote (hitString)) {

        }
    }
Exemplo n.º 3
0
	public void AnalyseNote(Gnote cGnote, GnoteBar cBar, GnoteBar pBar){
		Gnote matchGnote = Metrognome.Instance.GetMatch (cGnote, pBar);
		if (matchGnote==null) {
			// No match
			// some sort of sound if they were on a streak.
		} else {
			// Match!
			matchGnote.SetMatched(true);
			KeyScoreValue ksv = KeyData.Instance.GetKeyScoreValue(cGnote.GetKey());
			string comment = "+"+ksv.points+"\n"+ksv.name;
			keyCount++;
			if(gnotes.Contains(cGnote)){
			}else{
				uniqueKeyCount++;
				cGnote.scoreComment += "\nUNIQUE";
			}
			cGnote.scoreComment = comment;
			cGnote.score = ksv.points;
			keyDistances += DistanceBetweenKeys (cGnote.GetKey(), LastNote().GetKey ());
			Metrognome.Instance.SetHolderHit (cGnote.GetDivision ());
			Displays.Instance.GnoteMatch (cGnote);
		}
	}
Exemplo n.º 4
0
 public virtual void UpdateTrickChain(GnoteBar bar, GnoteSequence cSequence, PlayerHistory history)
 {
     // over
 }
Exemplo n.º 5
0
 public virtual TrickResults CalculateResults(GnoteBar bar, GnoteSequence cSequence, PlayerHistory history)
 {
     // overwrite me
     return new TrickResults();
 }
Exemplo n.º 6
0
	public void AddBar(GnoteBar b){
		gnoteBars.Add (b);
	}