Added proper taggins for gravity

This commit is contained in:
2025-11-26 00:27:28 -07:00
parent a9b2a3b7ff
commit c70f85abe5
4 changed files with 118 additions and 24 deletions

View File

@@ -13,13 +13,48 @@ func CreatePlains(screenWidth, screenHeight float64) *Map {
m.BackgroundColor = color.NRGBA{R: 135, G: 206, B: 235, A: 255}
// ground surface
groundColor := color.NRGBA{R: 34, G: 139, B: 34, A: 255}
m.World.AddSurface(&world.Surface{
X: 0,
Y: screenHeight - config.GroundHeight,
Width: screenWidth,
Height: config.GroundHeight,
Tag: world.TagGround,
Color: color.NRGBA{R: 34, G: 139, B: 34, A: 255},
Color: groundColor,
})
// Platforms
// Use ground color by default as requested
platformColor := groundColor
// Platform 1: Low left
m.World.AddSurface(&world.Surface{
X: 100,
Y: screenHeight - 120,
Width: 150,
Height: 20,
Tag: world.TagPlatform,
Color: platformColor,
})
// Platform 2: Mid center
m.World.AddSurface(&world.Surface{
X: 350,
Y: screenHeight - 200,
Width: 200,
Height: 20,
Tag: world.TagPlatform,
Color: platformColor,
})
// Platform 3: High right
m.World.AddSurface(&world.Surface{
X: 650,
Y: screenHeight - 280,
Width: 150,
Height: 20,
Tag: world.TagPlatform,
Color: platformColor,
})
// left portal to desert