Add silly cheat codes to make Play Mode editable

physics
Noah 2019-05-28 22:34:54 -07:00
parent 1523deeb9c
commit de79bde776
1 changed files with 16 additions and 0 deletions

View File

@ -32,6 +32,22 @@ func (c Command) Run(d *Doodle) error {
}
fpsDoNotCap = !fpsDoNotCap
return nil
} else if c.Raw == "don't edit and drive" {
if playScene, ok := d.Scene.(*PlayScene); ok {
playScene.drawing.Editable = true
d.Flash("Level canvas is now editable. Don't edit and drive!")
} else {
d.Flash("Use this cheat in Play Mode to make the level canvas editable.")
}
return nil
} else if c.Raw == "scroll scroll scroll your boat" {
if playScene, ok := d.Scene.(*PlayScene); ok {
playScene.drawing.Scrollable = true
d.Flash("Level canvas is now scrollable with the arrow keys.")
} else {
d.Flash("Use this cheat in Play Mode to make the level scrollable.")
}
return nil
}
switch c.Command {