Metroidvania game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
497 B

package component
import (
"code.rocketnine.space/tslocum/gohan"
"code.rocketnine.space/tslocum/monovania/engine"
)
type DestructibleComponent struct {
}
var DestructibleComponentID = engine.Engine.NewComponentID()
func (p *DestructibleComponent) ComponentID() gohan.ComponentID {
return DestructibleComponentID
}
func Destructible(ctx *gohan.Context) *DestructibleComponent {
c, ok := ctx.Component(DestructibleComponentID).(*DestructibleComponent)
if !ok {
return nil
}
return c
}