breakout

package
v0.0.0-...-d37d129 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PongLevelEinfachConfig = PongLevelConfig{
		AnzahlSpawnSteine:         6,
		SpawnDelay:                12 * 60,
		GespawnterSteinSpeed:      1.5,
		PlattformHoehe:            ui.Height / 3,
		PlattformSpeed:            40,
		UpgradeWahrscheinlichkeit: 0.25,
		BallMaxSpeedX:             9,
		BallMaxSpeedY:             6,
	}
	PongLevelNormalConfig = PongLevelConfig{
		AnzahlSpawnSteine:         10,
		SpawnDelay:                6 * 60,
		GespawnterSteinSpeed:      2,
		PlattformHoehe:            ui.Height / 4,
		PlattformSpeed:            50,
		UpgradeWahrscheinlichkeit: 0.20,
		BallMaxSpeedX:             9,
		BallMaxSpeedY:             6,
	}
	PongLevelHartConfig = PongLevelConfig{
		AnzahlSpawnSteine:         20,
		SpawnDelay:                4 * 60,
		GespawnterSteinSpeed:      4,
		PlattformHoehe:            ui.Height / 9,
		PlattformSpeed:            math.MaxInt,
		UpgradeWahrscheinlichkeit: 0.1,
		BallMaxSpeedX:             9,
		BallMaxSpeedY:             6,
	}
)
View Source
var (
	StandardLevelSuperEinfachConfig = StandardLevelConfig{
		SteinSpalten:              7,
		SteinZeilen:               4,
		UpgradeWahrscheinlichkeit: 0.4,
		PlattformBreite:           ui.Width / 2,
		PlattformMaxSpeed:         5,
		BallMaxSpeedX:             4,
		BallMaxSpeedY:             4,
		Störkugel:                 false,
	}
	StandardLevelEinfachConfig = StandardLevelConfig{
		SteinSpalten:              10,
		SteinZeilen:               5,
		UpgradeWahrscheinlichkeit: 0.3,
		PlattformBreite:           ui.Width / 3,
		PlattformMaxSpeed:         6,
		BallMaxSpeedX:             6,
		BallMaxSpeedY:             4,
		Störkugel:                 false,
	}
	StandardLevelMediumConfig = StandardLevelConfig{
		SteinSpalten:              13,
		SteinZeilen:               7,
		UpgradeWahrscheinlichkeit: 0.2,
		PlattformBreite:           ui.Width / 4,
		PlattformMaxSpeed:         8,
		BallMaxSpeedX:             8,
		BallMaxSpeedY:             5,
		Störkugel:                 false,
	}
	StandardLevelHardConfig = StandardLevelConfig{
		SteinSpalten:              16,
		SteinZeilen:               12,
		UpgradeWahrscheinlichkeit: 0.2,
		PlattformBreite:           ui.Width / 8,
		PlattformMaxSpeed:         30,
		BallMaxSpeedX:             12,
		BallMaxSpeedY:             7,
		Störkugel:                 true,
	}
	StandardLevelExpertConfig = StandardLevelConfig{
		SteinSpalten:              18,
		SteinZeilen:               14,
		UpgradeWahrscheinlichkeit: 0.2,
		PlattformBreite:           ui.Width / 16,
		PlattformMaxSpeed:         100,
		BallMaxSpeedX:             20,
		BallMaxSpeedY:             9,
		Störkugel:                 true,
	}
)

Functions

func NewBreakoutScreen

func NewBreakoutScreen(
	herderLegacy herderlegacy.HerderLegacy,
	world *world,
	nächsterScreen func(gewonnen bool) herderlegacy.Screen,
) herderlegacy.Screen

func NewFreierModusScreen

func NewFreierModusScreen(
	herderLegacy herderlegacy.HerderLegacy,
	breakoutBeendenCallback func() herderlegacy.Screen,
) herderlegacy.Screen

func NewPongLevel

func NewPongLevel(config PongLevelConfig) *world

func NewStandardLevel

func NewStandardLevel(config StandardLevelConfig) *world

Types

type PongLevelConfig

type PongLevelConfig struct {
	AnzahlSpawnSteine            int
	SpawnDelay                   int
	GespawnterSteinSpeed         float64
	PlattformHoehe               float64
	PlattformSpeed               float64
	UpgradeWahrscheinlichkeit    float64
	BallMaxSpeedX, BallMaxSpeedY float64
}

type StandardLevelConfig

type StandardLevelConfig struct {
	SteinSpalten, SteinZeilen    int
	UpgradeWahrscheinlichkeit    float64
	PlattformBreite              float64
	PlattformMaxSpeed            float64
	BallMaxSpeedX, BallMaxSpeedY float64
	Störkugel                    bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL