image path helper functions
This commit is contained in:
21
konstructor/object.go
Normal file
21
konstructor/object.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package konstructor
|
||||
|
||||
type ObjectType string
|
||||
|
||||
const (
|
||||
ItemObjectType ObjectType = "item"
|
||||
NPCObjectType ObjectType = "npc"
|
||||
PlatformObjectType ObjectType = "platform"
|
||||
)
|
||||
|
||||
type ObjectDirectoryMap map[ObjectType]string
|
||||
|
||||
var ObjectDirectories = ObjectDirectoryMap{
|
||||
ItemObjectType: "items",
|
||||
NPCObjectType: "npcs",
|
||||
PlatformObjectType: "platforms",
|
||||
}
|
||||
|
||||
func GetObjectDirectory(name ObjectType) string {
|
||||
return "assets/images/" + ObjectDirectories[name] + "/"
|
||||
}
|
||||
Reference in New Issue
Block a user