28 lines
702 B
Go
28 lines
702 B
Go
package component
|
||
|
||
import "joylink.club/ecs"
|
||
|
||
// FluidPipe 流体管线
|
||
type FluidPipe struct {
|
||
Direction PipeFlowDirection //流动方向
|
||
}
|
||
|
||
// PipeFlowDirection 管线内流体流动方向定义
|
||
type PipeFlowDirection int8
|
||
|
||
const (
|
||
PipeFlowNon PipeFlowDirection = iota //流体未流动
|
||
PipeFlowAb //流体从管线的A->B
|
||
PipeFlowBa //流体从管线的B->A
|
||
)
|
||
|
||
// FluidDriver 流体驱动器
|
||
type FluidDriver struct {
|
||
On bool //true-输出流体驱动力;false-未输出流体驱动力
|
||
}
|
||
|
||
var (
|
||
FluidPipeType = ecs.NewComponentType[FluidPipe]() //流体管线
|
||
FluidDriverType = ecs.NewComponentType[FluidDriver]() //流体驱动器
|
||
)
|