22 lines
664 B
Go
22 lines
664 B
Go
|
package component
|
|||
|
|
|||
|
import "joylink.club/ecs"
|
|||
|
|
|||
|
// FluidPipe 流体管线
|
|||
|
//
|
|||
|
// 管线内流体流动条件:1、管线内有流体;2、管线两端有压差;3、管线畅通
|
|||
|
type FluidPipe struct {
|
|||
|
FlowVelocity int32 //流速,大于零从管线A端向B端流动,小于零从管线B端向A端流动,等于零没有流动
|
|||
|
}
|
|||
|
|
|||
|
// FluidDriver 流体驱动器
|
|||
|
type FluidDriver struct {
|
|||
|
On bool //true-输出流体驱动力;false-未输出流体驱动力
|
|||
|
Forward bool //true-正转;false-反转
|
|||
|
}
|
|||
|
|
|||
|
var (
|
|||
|
FluidPipeType = ecs.NewComponentType[FluidPipe]() //流体管线
|
|||
|
FluidDriverType = ecs.NewComponentType[FluidDriver]() //流体驱动器
|
|||
|
)
|