public SerialBootStrap(SerialReader serial) { logging.Info("start load identify_data"); this.serial = serial; identify_data = new MemoryStream(); identify_cmd = this.serial.lookup_command("identify offset=%u count=%c"); this.serial.register_callback(handle_identify, "identify_response"); this.serial.register_callback(handle_unknown, "#unknown"); this.send_timer = this.serial.reactor.register_timer(this.send_event, SelectReactor.NOW); }
public SerialRetryCommand(SerialReader serial, byte[] cmd, string name, int oid = 0) { this.serial = serial; this.cmd = cmd; this.name = name; this.oid = oid; min_query_time = this.serial.reactor.monotonic(); this.serial.register_callback(handle_callback, this.name, this.oid); this.send_timer = this.serial.reactor.register_timer(this.send_event, SelectReactor.NOW); }
private void Start() { dead = GameObject.FindGameObjectWithTag("Player").transform.Find("DeadSound").gameObject; speed = maxSpeed; stopPlayer = false; sprite = GetComponent <SpriteRenderer>(); myRigidBody = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); reactorTimer = gameStates.GetComponent <ReactorTimer>(); inventory[0] = null; tiredSound.SetActive(false); }
public void handle_ready() { this.toolhead = this.printer.lookup_object <ToolHead>("toolhead"); this.timeout_timer = this.reactor.register_timer(this.timeout_handler); this.printer.register_event_handler("toolhead:sync_print_time", (Delegate)(Action <double, double, double>) this.handle_sync_print_time); }