2
from bee.segments import *
3
import bee.segments.transistor
4
from bee.types import stringtupleparser
6
class transistor(object):
8
A transistor converts pull input to push output
9
Whenever the transistor is triggered, the value is pulled in and then pushed out
13
"autocreate" : {"type_" : "bool"},
18
f.type_.type = "option"
19
f.type_.options = "bool", "int", "float", "(str,identifier)", "(str,action)", "(str,keycode)", "(str,message)", "(str,property)", "(str,process)", "str", "(object,matrix)", "(object,bge)", "object", "custom"
20
f.type_.optiontitles = "Bool", "Integer", "Float", "ID String", "Action String", "Key String", "Message String", "Property String", "Process ID String", "Generic String", "Matrix Object", "BGE Object", "Generic Object", "Custom"
21
f.type_.default = "bool"
23
def __new__(cls, type_):
24
type_ = stringtupleparser(type_)
25
class transistor(bee.worker):
29
val = antenna("pull", type_)
30
trans = bee.segments.transistor(type_)
31
outp = output("push", type_)
34
trig = antenna("push", "trigger")
38
"val" : {"name": "Value"},
39
"outp" : {"name": "Output"},
40
"trig" : {"name": "Trigger"},
41
"_memberorder" : ["trig", "val", "outp"],
b'\\ No newline at end of file'