gameclock

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Day   = hoursPerDay
	Month = hoursPerDay * daysPerMonth
	Year  = hoursPerDay * daysPerMonth * monthsPerYear
)

Variables

This section is empty.

Functions

func ConvertDateToGameTime

func ConvertDateToGameTime(year, month, day, hour uint64) uint64

Types

type GameClock

type GameClock struct {
	// contains filtered or unexported fields
}

func NewGameClock

func NewGameClock(initialTime GameTime, gameSpeedMultiplier float64) *GameClock

func (*GameClock) GetCurrentDate

func (gc *GameClock) GetCurrentDate() string

func (*GameClock) GetCurrentTime

func (gc *GameClock) GetCurrentTime() GameTime

func (*GameClock) StartTime

func (gc *GameClock) StartTime()

func (*GameClock) Update

func (gc *GameClock) Update()

func (*GameClock) UpdateTicker

func (gc *GameClock) UpdateTicker(multiplier float64)

type GameTime

type GameTime uint64

func (GameTime) Add

func (gt GameTime) Add(gtd GameTimeDuration) GameTime

func (GameTime) After

func (gt GameTime) After(gametime GameTime) bool

func (GameTime) Before

func (gt GameTime) Before(gametime GameTime) bool

type GameTimeDuration

type GameTimeDuration uint64

Jump to

Keyboard shortcuts

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