コード例 #1
0
func getLevelTileEntity(project *core.Project, level *core.Level, x int, y int) (entity model.Tile) {
	entity.Href = "/projects/" + project.Name() + "/archive/levels/" + fmt.Sprintf("%d", level.ID()) +
		"/tiles/" + fmt.Sprintf("%d", y) + "/" + fmt.Sprintf("%d", x)
	entity.Properties = level.TileProperties(int(x), int(y))

	return
}
コード例 #2
0
func (resource *WorkspaceResource) getLevelTexturesEntity(projectID string, level *core.Level) (entity model.LevelTextures) {
	entity.Href = "/projects/" + projectID + "/archive/levels/" + fmt.Sprintf("%d", level.ID()) + "/textures"
	entity.IDs = level.Textures()

	return
}