Consolodated config, added portals, etc.
This commit is contained in:
78
internal/config/factory.go
Normal file
78
internal/config/factory.go
Normal file
@@ -0,0 +1,78 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"image/color"
|
||||
)
|
||||
|
||||
type MapConfig struct {
|
||||
ID string
|
||||
Number int
|
||||
GroundColor color.NRGBA
|
||||
BackgroundColor color.NRGBA
|
||||
}
|
||||
|
||||
func DefaultMap1() MapConfig {
|
||||
return MapConfig{
|
||||
ID: "map1",
|
||||
Number: 1,
|
||||
GroundColor: color.NRGBA{R: 34, G: 139, B: 34, A: 255},
|
||||
BackgroundColor: color.NRGBA{R: 135, G: 206, B: 235, A: 255},
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultMap2() MapConfig {
|
||||
return MapConfig{
|
||||
ID: "map2",
|
||||
Number: 2,
|
||||
GroundColor: color.NRGBA{R: 139, G: 69, B: 19, A: 255},
|
||||
BackgroundColor: color.NRGBA{R: 155, G: 196, B: 215, A: 255},
|
||||
}
|
||||
}
|
||||
|
||||
type PortalConfig struct {
|
||||
ID string
|
||||
DestinationMap string
|
||||
DestinationPortal string
|
||||
Color color.NRGBA
|
||||
GlowColor color.NRGBA
|
||||
}
|
||||
|
||||
func LeftPortalMap1() PortalConfig {
|
||||
return PortalConfig{
|
||||
ID: "map1_left",
|
||||
DestinationMap: "map2",
|
||||
DestinationPortal: "map2_right",
|
||||
Color: color.NRGBA{R: 255, G: 100, B: 100, A: 180},
|
||||
GlowColor: color.NRGBA{R: 255, G: 150, B: 150, A: 100},
|
||||
}
|
||||
}
|
||||
|
||||
func RightPortalMap1() PortalConfig {
|
||||
return PortalConfig{
|
||||
ID: "map1_right",
|
||||
DestinationMap: "map2",
|
||||
DestinationPortal: "map2_left",
|
||||
Color: color.NRGBA{R: 100, G: 255, B: 100, A: 180},
|
||||
GlowColor: color.NRGBA{R: 150, G: 255, B: 150, A: 100},
|
||||
}
|
||||
}
|
||||
|
||||
func LeftPortalMap2() PortalConfig {
|
||||
return PortalConfig{
|
||||
ID: "map2_left",
|
||||
DestinationMap: "map1",
|
||||
DestinationPortal: "map1_right",
|
||||
Color: color.NRGBA{R: 100, G: 255, B: 100, A: 180},
|
||||
GlowColor: color.NRGBA{R: 150, G: 255, B: 150, A: 100},
|
||||
}
|
||||
}
|
||||
|
||||
func RightPortalMap2() PortalConfig {
|
||||
return PortalConfig{
|
||||
ID: "map2_right",
|
||||
DestinationMap: "map1",
|
||||
DestinationPortal: "map1_left",
|
||||
Color: color.NRGBA{R: 255, G: 100, B: 100, A: 180},
|
||||
GlowColor: color.NRGBA{R: 255, G: 150, B: 150, A: 100},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user