rts-sim-module/deprecated/entities/signal_entity.go
walker 0bba8f0934 删除donburi包引用
修改filter导入为从ecs项目导入
整理包结构,将弃用的包放入deprecated文件中
2023-10-09 11:17:25 +08:00

74 lines
3.9 KiB
Go

package entities
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/deprecated/system"
)
func CreateSignal3XH1Entity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Signal3XH1StateComponent, system.Signal3XH1FilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.Signal3XH1StateComponent.Set(e, system.NewSignal3XH1State())
system.Signal3XH1FilamentStateComponent.Set(e, system.NewSignal3XH1FilamentState())
return e
}
func CreateSignal2XH1CdcEntity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Signal2XH1StateComponent, system.Signal2XH1FilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.Signal2XH1StateComponent.Set(e, system.NewSignal2XH1CdcState())
system.Signal2XH1FilamentStateComponent.Set(e, system.NewSignal2XH1FilamentState())
return e
}
func CreateSignal2XH1CzqzEntity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Signal2XH1StateComponent, system.Signal2XH1FilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.Signal2XH1StateComponent.Set(e, system.NewSignal2XH1CzqzState())
system.Signal2XH1FilamentStateComponent.Set(e, system.NewSignal2XH1FilamentState())
return e
}
func CreateSignal3XH2Entity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Signal3XH2StateComponent, system.Signal3XH2FilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.Signal3XH2StateComponent.Set(e, system.NewSignal3XH2State())
system.Signal3XH2FilamentStateComponent.Set(e, system.NewSignal3XH2FilamentState())
return e
}
func CreateSignal3XH3Entity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Signal3XH3StateComponent, system.Signal3XH3FilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.Signal3XH3StateComponent.Set(e, system.NewSignal3XH3State())
system.Signal3XH3FilamentStateComponent.Set(e, system.NewSignal3XH3FilamentState())
return e
}
func CreateSignal3XH4Entity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.Signal3XH4StateComponent, system.Signal3XH4FilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.Signal3XH4StateComponent.Set(e, system.NewSignal3XH4State())
system.Signal3XH4FilamentStateComponent.Set(e, system.NewSignal3XH4FilamentState())
return e
}
func CreateSignalJDXHEntity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.SignalJDXHStateComponent, system.SignalJDXHFilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.SignalJDXHStateComponent.Set(e, system.NewSignalJDXHState())
system.SignalJDXHFilamentStateComponent.Set(e, system.NewSignalJDXHFilamentState())
return e
}
func CreateSignalDCXHEntity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.SignalDCXHStateComponent, system.SignalDCXHFilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.SignalDCXHStateComponent.Set(e, system.NewSignalDCXHState())
system.SignalDCXHFilamentStateComponent.Set(e, system.NewSignalDCXHFilamentState())
return e
}
func CreateSignalJCKXHEntity(w ecs.World, signalId string) *ecs.Entry {
e := w.Create(system.EntityIdentityComponent, system.SignalJCKXHStateComponent, system.SignalJCKXHFilamentStateComponent)
system.EntityIdentityComponent.Set(e, &system.EntityIdentity{Id: signalId})
system.SignalJCKXHStateComponent.Set(e, system.NewSignalJCKXHState())
system.SignalJCKXHFilamentStateComponent.Set(e, system.NewSignalJCKXHFilamentState())
return e
}