Example #1
0
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)
}
Example #2
0
func Show(m app.Message) {
	id, _ := m.GetInt("id")

	u, _ := user.Find(id)

	log.Println(id)
	m.ReplySuccess(u.Data())
}
Example #3
0
func Enter(m app.Message) {

	scene := new(animation.Scene)

	s = new(animation.Sprite)

	scene.AddSprite(s)

	go scene.Start()

	m.ReplySuccess(nil)
}
Example #4
0
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())
}