mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 05:18:21 +00:00
28 lines
451 B
Go
Executable File
28 lines
451 B
Go
Executable File
package entity
|
|
|
|
import "github.com/bloeys/nmage/assert"
|
|
|
|
var _ Comp = &BaseComp{}
|
|
|
|
type BaseComp struct {
|
|
Entity *BaseEntity
|
|
}
|
|
|
|
func (b BaseComp) baseComp() {
|
|
}
|
|
|
|
func (b *BaseComp) Init(parent *BaseEntity) {
|
|
assert.T(parent != nil, "Component was initialized with a nil parent. That is not allowed.")
|
|
b.Entity = parent
|
|
}
|
|
|
|
func (b BaseComp) Name() string {
|
|
return "Base Component"
|
|
}
|
|
|
|
func (b BaseComp) Update() {
|
|
}
|
|
|
|
func (b BaseComp) Destroy() {
|
|
}
|