Documentation
¶
Overview ¶
Package effects include different components for adding effects
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Get = gets{ AlternateColorState: func(e *goecs.Entity) AlternateColorState { return e.Get(TYPE.AlternateColorState).(AlternateColorState) }, AlternateColor: func(e *goecs.Entity) AlternateColor { return e.Get(TYPE.AlternateColor).(AlternateColor) }, Layer: func(e *goecs.Entity) Layer { return e.Get(TYPE.Layer).(Layer) }, Hide: func(e *goecs.Entity) Hide { return e.Get(TYPE.Hide).(Hide) }, }
Get effect component
View Source
var TYPE = types{ AlternateColorState: reflect.TypeOf(AlternateColorState{}), AlternateColor: reflect.TypeOf(AlternateColor{}), Layer: reflect.TypeOf(Layer{}), Hide: reflect.TypeOf(Hide{}), }
TYPE hold the reflect.Type for our effects components
Functions ¶
This section is empty.
Types ¶
type AlternateColor ¶
type AlternateColor struct { From color.Solid // From is color.Solid that we start from To color.Solid // To is the color.Solid that we will end to Time float32 // Time is how long will be get to go from From to To in seconds Delay float32 // Delay is how long will stay in the final To until switching again to To }
AlternateColor effects will cycle between two colors From and To in given Time with an Optional Delay
type AlternateColorState ¶
type AlternateColorState struct { CurrentTime float32 // CurrentTime time that this effects has been running Running bool // Running indicates if this effect is running From color.Solid // From is color.Solid that we start from in the current state To color.Solid // To is the color.Solid that we will end to the current state }
AlternateColorState is the state for an effect
Click to show internal directories.
Click to hide internal directories.