示例#1
0
    // 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);
    }
示例#2
0
    // 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);
    }
示例#3
0
    // 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);
    }
示例#4
0
        /// <summary>
        /// 初始化
        /// </summary>
        public void Init(PurchaserTao.handler back_, PurchaserTao.handler cinish_)
        {
            Debugback  = back_;
            callFinish = cinish_;

            InitializePurchasing();
        }
示例#5
0
        /// <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);
        }
示例#6
0
 public UDPReceive(int p, handler myhandler)
 {
     thehandler    = myhandler;
     port          = p;
     receiveThread = new Thread(
         new ThreadStart(ReceiveData));
     receiveThread.IsBackground = true;
     receiveThread.Start();
 }
示例#7
0
        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);
        }
示例#8
0
 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;
 }
示例#9
0
    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);
    }
示例#10
0
        /// <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);
        }
示例#11
0
        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);
                }
            }
        }
示例#12
0
    // 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;

    }
示例#13
0
 public void removeEvent(string name, handler _handler)
 {
     event_handlers[name] -= _handler;
 }
示例#14
0
 public bool RegisterHandler(handler engineCallbackHandler)
 {
     this.engineCallbackHandler = engineCallbackHandler;
     return(true);
 }
示例#15
0
 // Use this for initialization
 void Start()
 {
     handler = GameObject.Find("Ground").GetComponent<handler>();
 }
示例#16
0
 public void AddKeyHandler(string _key, handler _handler)
 {
     dicHandler.Add(_key, _handler);
 }
示例#17
0
        /// <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);
        }
示例#18
0
 RegisterHandlerWithRetry(handler, endpoint, handle);
示例#19
0
 public void addEvent(string name, handler _handler)
 {
     event_handlers[name] += _handler;
 }
示例#20
0
        /// <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;
 }
示例#22
0
 public void AddKeyHandler(string _key, handler _handler)
 {
     dicHandler.Add(_key, _handler);
 }
示例#23
0
 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