Added 2 levels.
This commit is contained in:
parent
3fb808ba78
commit
6eed028d82
@ -19,15 +19,15 @@ func (s *levelSelect) Enter(ctx *Context) error {
|
||||
s.ctx = ctx
|
||||
s.pack = s.ctx.Levels[s.packID]
|
||||
s.Init()
|
||||
name := func(id string, steps int) string {
|
||||
name := func(i int, steps int) string {
|
||||
if steps == 0 {
|
||||
return fmt.Sprintf("Level %s", id)
|
||||
return fmt.Sprintf("Level %d", i)
|
||||
}
|
||||
return fmt.Sprintf("Level %s (%d)", id, steps)
|
||||
return fmt.Sprintf("Level %d (%d)", i, steps)
|
||||
}
|
||||
for _, id := range s.pack.order {
|
||||
for i, id := range s.pack.order {
|
||||
levelID := id
|
||||
s.Add(name(levelID, s.ctx.Progress.Level(s.packID, levelID).Steps), func() {
|
||||
s.Add(name(i+1, s.ctx.Progress.Level(s.packID, levelID).Steps), func() {
|
||||
s.ctx.Navigation.PlayLevel(s.packID, levelID)
|
||||
})
|
||||
}
|
||||
|
11
cmd/krampus19/res/levels/empty.txt
Normal file
11
cmd/krampus19/res/levels/empty.txt
Normal file
@ -0,0 +1,11 @@
|
||||
level:
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
:level
|
@ -6,8 +6,16 @@ level:
|
||||
id: 1
|
||||
:level
|
||||
|
||||
level:
|
||||
id: 3
|
||||
:level
|
||||
|
||||
level:
|
||||
id: 2
|
||||
:level
|
||||
|
||||
level:
|
||||
id: 4
|
||||
:level
|
||||
|
||||
:levels
|
11
cmd/krampus19/res/levels/pack1_level3.txt
Normal file
11
cmd/krampus19/res/levels/pack1_level3.txt
Normal file
@ -0,0 +1,11 @@
|
||||
level:
|
||||
._._._._._._._._._._
|
||||
._._._._._._._._._._
|
||||
._~_#_#_#_#B#_._._._
|
||||
._~_#B#_#_._#_._._._
|
||||
._~_._#_~_#_#_._._._
|
||||
._#X._#_~_#_._._._._
|
||||
._._#_#B#_#_._._._._
|
||||
._._#@#_._._._._._._
|
||||
._._._._._._._._._._
|
||||
:level
|
16
cmd/krampus19/res/levels/pack1_level4.txt
Normal file
16
cmd/krampus19/res/levels/pack1_level4.txt
Normal file
@ -0,0 +1,16 @@
|
||||
level:
|
||||
._._._._._._._._._._._._
|
||||
._._#_#_._._._._._._._._
|
||||
._._#_#B#_#B#@#_#_._._._
|
||||
._._#_#_#_#_#B#_#_._._._
|
||||
._._._._._._#_._._._._._
|
||||
._._._._._._#_._._._._._
|
||||
._._._._._._#B._._._._._
|
||||
._._._#_#_._#_._#_#_._._
|
||||
._#_#_#_#_~_#_#_#_#_#_._
|
||||
._#_._._#_._#_._#_._#_._
|
||||
._#_._#X~_._~_._~_._#_._
|
||||
._#_._._#_._#_._#_._#_._
|
||||
._#_#_#_#_#_~_#_#_#_#_._
|
||||
._._._._._._._._._._._._
|
||||
:level
|
Loading…
Reference in New Issue
Block a user