(u engo.Updater)
| 33 | } |
| 34 | |
| 35 | func (t *testAudioScene) Setup(u engo.Updater) { |
| 36 | var err error |
| 37 | t.w = u.(*ecs.World) |
| 38 | t.audioSystem = &AudioSystem{} |
| 39 | t.w.AddSystem(t.audioSystem) |
| 40 | |
| 41 | t.ogg = testAudio{BasicEntity: ecs.NewBasic()} |
| 42 | if t.ogg.AudioComponent.Player, err = LoadedPlayer("1.ogg"); err != nil { |
| 43 | panic(err) |
| 44 | } |
| 45 | t.audioSystem.Add(&t.ogg.BasicEntity, &t.ogg.AudioComponent) |
| 46 | |
| 47 | t.wav = testAudio{BasicEntity: ecs.NewBasic()} |
| 48 | if t.wav.AudioComponent.Player, err = LoadedPlayer("sfx_coin_double2.wav"); err != nil { |
| 49 | panic(err) |
| 50 | } |
| 51 | t.audioSystem.Add(&t.wav.BasicEntity, &t.wav.AudioComponent) |
| 52 | |
| 53 | t.mp3 = testAudio{BasicEntity: ecs.NewBasic()} |
| 54 | if t.mp3.AudioComponent.Player, err = LoadedPlayer("TripleShot.mp3"); err != nil { |
| 55 | panic(err) |
| 56 | } |
| 57 | t.audioSystem.Add(&t.mp3.BasicEntity, &t.mp3.AudioComponent) |
| 58 | } |
| 59 | |
| 60 | // TestAudioSystemIntegrationNormalUse tests using the AudioSystem as a part of |
| 61 | // engo. It doesn't fail on data because sometimes things "slip" and the data doesn't |
nothing calls this directly
no test coverage detected