Ilysa by Example: Sequence - Beat

Generate events by specifying a sequence and the events you want to generate in that sequence.

package main
import (
    "github.com/shasderias/ilysa"
    "github.com/shasderias/ilysa/beatsaber"
    "github.com/shasderias/ilysa/context"
    "github.com/shasderias/ilysa/evt"
    "github.com/shasderias/ilysa/timer"
)
func main() {
    m, _ := beatsaber.NewMockMap(beatsaber.EnvironmentOrigins, 120, "[]")
    p := ilysa.New(m)

timer.Beat() specifies a sequence with a single beat.

    p.Sequence(timer.Beat(0), func(ctx context.Context) {

ctx.NewLighting() specifies a base game lighting event.

        ctx.NewLighting(

ctx.NewLighting() and the other New* methods you will encounter accept options. The following options tell Ilysa to generate a back laser blue fade event.

            evt.WithLight(evt.BackLasers),
            evt.WithLightValue(evt.LightBlueFade),
        )
    })
    p.Dump()
}
$ go run sequence-beat.go
[{"_time":0,"_type":0,"_value":3}]

Next example: Sequence - Interval.