image path helper functions
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package konstructor
|
||||
|
||||
type PlaygroundID string
|
||||
|
||||
type Position struct {
|
||||
X int
|
||||
Y int
|
||||
@@ -7,6 +9,7 @@ type Position struct {
|
||||
}
|
||||
|
||||
type Playground struct {
|
||||
ID PlaygroundID
|
||||
Render Render
|
||||
Platforms []Platform
|
||||
NPCs []NPC
|
||||
@@ -18,3 +21,7 @@ type Level struct {
|
||||
Name string
|
||||
Playgrounds []Playground
|
||||
}
|
||||
|
||||
func GetPlaygroundImagePath(name PlaygroundID) string {
|
||||
return "assets/images/playgrounds/" + string(name) + ".png"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user