// Use this for initialization void Start() { isUp = false; isDown = true; isMovingUp = false; isMovingDown = false; isCalled = false; isFinishTurn = false; particlePoint = new Vector3(transform.position.x, 28.8f, transform.position.z); particlePoint2 = new Vector3(transform.position.x, 30f, transform.position.z); anim = GetComponent<Animation>(); handler = GameObject.Find("Ground").GetComponent<handler>(); moleName = this.gameObject.name; for (int i = 0; i < 12; i++) { if (moleName.Contains("(" + i + ")")) { hole = GameObject.Find("Hole (" + i + ")"); break; } } //GameObject obj1 = GameObject.Find("Digda1"); //bool digda1 = obj1.GetComponent<moleMovement>().isDown; downPosition = new Vector3(transform.position.x, 15.5f, transform.position.z); upPosition = new Vector3(transform.position.x, 23.8f, transform.position.z); }
// Use this for initialization void Start() { GameObject canvas = GameObject.Find("Canvas"); foreach (Transform childT in canvas.GetComponentInChildren <Transform>()) { switch (childT.gameObject.name) { case "textbox": textbox = childT.gameObject; break; case "namebox": nameBox = childT.gameObject; break; case "yesButton": yesButton = childT.gameObject; break; case "noButton": noButton = childT.gameObject; break; case "next": nextButton = childT.gameObject; break; } } hdr = textbox.GetComponent <handler>(); toggleAllComps(false); }
// Use this for initialization void Start() { minAvailableTime = 1f; maxAvailableTime = 2f; isUp = false; isDown = true; isCalled = false; particlePoint = new Vector3(transform.position.x, 28.8f, transform.position.z - 3); anim = GetComponent<Animation>(); handler = GameObject.Find("Ground").GetComponent<handler>(); moleName = this.gameObject.name; for (int i = 0; i < 12; i++) { if (moleName.Contains("(" + i + ")")) { hole = GameObject.Find("Hole (" + i + ")"); break; } } //GameObject obj1 = GameObject.Find("Digda1"); //bool digda1 = obj1.GetComponent<moleMovement>().isDown; downPosition = new Vector3(transform.position.x, 16.43f, transform.position.z); upPosition = new Vector3(transform.position.x, 27.25f, transform.position.z); }
/// <summary> /// 初始化 /// </summary> public void Init(PurchaserTao.handler back_, PurchaserTao.handler cinish_) { Debugback = back_; callFinish = cinish_; InitializePurchasing(); }
/// <summary> /// Initializes this instance. /// </summary> private void init() { HtmlWeb hw = new HtmlWeb(); try { if (this.isLocal) { this.doc = hw.Load(this.local_url); } else { this.doc = hw.Load(this.url); } } catch { Console.WriteLine("Nepodržani dokument!"); } this.loadTime = DateTime.Now; this.ReloadTimesManual = 0; this.ReloadTimesAuto = 0; this.VisitTime = 0; this.noChanges = -1; this.Links = new List <HtmlNode>(); this.attachedControllers = new List <MVC_Controller>(); this.attachedViews = new List <MVC_View>(); updateLinks(); this.accessTime = DateTime.Now; Update up = new Update(); h += new handler(up.UpdateObjects); }
public UDPReceive(int p, handler myhandler) { thehandler = myhandler; port = p; receiveThread = new Thread( new ThreadStart(ReceiveData)); receiveThread.IsBackground = true; receiveThread.Start(); }
private bool callHandler(handler h, string message) { bool result = false; IsRunning = true; try { h(); result = true; } catch (Exception e) { SIEEMessageBox.Show(e.Message, message, MessageBoxImage.Error); } finally { IsRunning = false; } return(result); }
public bool run(Command _com) { handler tempHandler = new handler(); string key = _com.getKey(); if (dicHandler.TryGetValue(_com.getKey(), out tempHandler)) { tempHandler.Execute(_com); } return true; }
public bool run(Command _com) { handler tempHandler = new handler(); string key = _com.getKey(); if (dicHandler.TryGetValue(_com.getKey(), out tempHandler)) { tempHandler.Execute(_com); } return(true); }
/// <summary> /// Initializes a new instance of the <see cref="match"/> class. /// </summary> /// <param name="ranking">The ranking.</param> /// <param name="takerTeam">The taker team.</param> /// <param name="takerTeamDiff">The taker team difference.</param> /// <param name="takerRez">The taker rez.</param> public match(List <team> ranking, CareTakerTeams takerTeam, CareTakerTeams takerTeamDiff, CareTakerResults takerRez) { this.teams = new List <team>(); foreach (team tim in ranking) { tim.round_points = 0; teams.Add(tim); } this.takerTeam = takerTeam; this.takerRez = takerRez; this.takerTeamDiff = takerTeamDiff; PrintEfListener listen = new PrintEfListener(); h += new handler(listen.Print); }
private void Read_Data() { Looper.Prepare(); handler mHandler = new handler(); Message msg; while (true) { try { Thread.Sleep(200); } catch (InterruptedException e) { } status = _bascula.ReadData(4096, readBuffer, actualNumBytes); if (status == 0x00 && actualNumBytes[0] > 0) { msg = mHandler.ObtainMessage(); mHandler.SendMessage(msg); } } }
// Use this for initialization void Start() { attack = false; easyTimer = 1f; mediumTimer = 0.7f; hardTimer = 0.5f; handler = GameObject.Find("Ground").GetComponent<handler>(); check = new bool[12]; holes = new GameObject[12]; moles = new GameObject[12][]; moles[0] = GameObject.FindGameObjectsWithTag("moles0"); moles[1] = GameObject.FindGameObjectsWithTag("moles1"); moles[2] = GameObject.FindGameObjectsWithTag("moles2"); moles[3] = GameObject.FindGameObjectsWithTag("moles3"); moles[4] = GameObject.FindGameObjectsWithTag("moles4"); moles[5] = GameObject.FindGameObjectsWithTag("moles5"); moles[6] = GameObject.FindGameObjectsWithTag("moles6"); moles[7] = GameObject.FindGameObjectsWithTag("moles7"); moles[8] = GameObject.FindGameObjectsWithTag("moles8"); moles[9] = GameObject.FindGameObjectsWithTag("moles9"); moles[10] = GameObject.FindGameObjectsWithTag("moles10"); moles[11] = GameObject.FindGameObjectsWithTag("moles11"); holes[0] = GameObject.Find("Hole (0)"); holes[1] = GameObject.Find("Hole (1)"); holes[2] = GameObject.Find("Hole (2)"); holes[3] = GameObject.Find("Hole (3)"); holes[4] = GameObject.Find("Hole (4)"); holes[5] = GameObject.Find("Hole (5)"); holes[6] = GameObject.Find("Hole (6)"); holes[7] = GameObject.Find("Hole (7)"); holes[8] = GameObject.Find("Hole (8)"); holes[9] = GameObject.Find("Hole (9)"); holes[10] = GameObject.Find("Hole (10)"); holes[11] = GameObject.Find("Hole (11)"); lastPosition = gameObject.transform.position; }
public void removeEvent(string name, handler _handler) { event_handlers[name] -= _handler; }
public bool RegisterHandler(handler engineCallbackHandler) { this.engineCallbackHandler = engineCallbackHandler; return(true); }
// Use this for initialization void Start() { handler = GameObject.Find("Ground").GetComponent<handler>(); }
public void AddKeyHandler(string _key, handler _handler) { dicHandler.Add(_key, _handler); }
/// <summary> /// Initializes this instance. /// </summary> private void init() { HtmlWeb hw = new HtmlWeb(); try { if(this.isLocal) this.doc = hw.Load(this.local_url); else { this.doc = hw.Load(this.url); } } catch { Console.WriteLine("Nepodržani dokument!"); } this.loadTime = DateTime.Now; this.ReloadTimesManual = 0; this.ReloadTimesAuto = 0; this.VisitTime = 0; this.noChanges = -1; this.Links = new List<HtmlNode>(); this.attachedControllers = new List<MVC_Controller>(); this.attachedViews = new List<MVC_View>(); updateLinks(); this.accessTime = DateTime.Now; Update up = new Update(); h += new handler(up.UpdateObjects); }
RegisterHandlerWithRetry(handler, endpoint, handle);
public void addEvent(string name, handler _handler) { event_handlers[name] += _handler; }
/// <summary> /// Initializes a new instance of the <see cref="match"/> class. /// </summary> /// <param name="ranking">The ranking.</param> /// <param name="takerTeam">The taker team.</param> /// <param name="takerTeamDiff">The taker team difference.</param> /// <param name="takerRez">The taker rez.</param> public match(List<team> ranking, CareTakerTeams takerTeam, CareTakerTeams takerTeamDiff, CareTakerResults takerRez) { this.teams = new List<team>(); foreach (team tim in ranking) { tim.round_points = 0; teams.Add(tim); } this.takerTeam = takerTeam; this.takerRez = takerRez; this.takerTeamDiff = takerTeamDiff; PrintEfListener listen = new PrintEfListener(); h += new handler(listen.Print); }
public void Attach() { doSomething += P1; doSomething += P2; }
var task = RequestExecAsync(handler, request);
/** * Add signal handler. * @param signal signal object. * @param handler handler function to be executed then signal dispatches. */ protected function addSignalHandler(signal : SignalExpress, handler : Function) : void