func Move(m app.Message) { x, _ := m.GetFloat("x") y, _ := m.GetFloat("y") log.Println(x) s.SetPosition(animation.Vector{X: x, Y: y}) m.ReplySuccess(nil) }
func Show(m app.Message) { id, _ := m.GetInt("id") u, _ := user.Find(id) log.Println(id) m.ReplySuccess(u.Data()) }
func Enter(m app.Message) { scene := new(animation.Scene) s = new(animation.Sprite) scene.AddSprite(s) go scene.Start() m.ReplySuccess(nil) }
func Signin(m app.Message) { email, has := m.Get("email") u, has := user.FindBy("email", email) if !has { m.ReplyError(2, "sss") return } m.Session().Notify(u.Data()) m.ReplySuccess(u.Data()) }