Esempio n. 1
0
    public static GATEnvelope CreateEnvelope(ConstFile.NoteLen note, int offset = 0, bool normalize = false)
    {
        float sampleRate = 44100;

        int len     = Mathf.FloorToInt((ConstFile.NoteBPMCalcs[(int)note] / ConstFile.BPM) * sampleRate);
        int fadeIn  = Mathf.FloorToInt((sampleRate * len) / 135000);
        int fadeOut = Mathf.FloorToInt((sampleRate * len) / 4);

        return(new GATEnvelope(len, fadeIn, fadeOut, offset, normalize));
    }
Esempio n. 2
0
 public ConditionalItem()
 {
     cond1Val = 0;
     cond2Val = 0;
     cond1Ind = ConstFile.ConditionOptions.ENEMY_DISTANCE;
     greater  = true;
     cond2Ind = ConstFile.ConditionOptions.VALUE;
     action   = ConstFile.Actions.REST;
     note     = ConstFile.NoteLen.QUARTER;
 }