Пример #1
0
        IEnumerator DoUpdate()
        {
            DoIdle();
            Transform egg = GameController.GetSingleton().levelsController.eggController.transform;

            while (egg.position.y - transform.position.y > attackSensibleDistance)
            {
                yield return(null);
            }

            tracer.target = egg;
            tracer.Start();
            while (true)
            {
                if (!pausing)
                {
//					PointInfo pi = tracer.FindSamePointOnWholePath ();
//					if (null == pi){
//						continue;
//					}

                    tracer.Update();
                }

                yield return(null);
            }
        }
Пример #2
0
        void Update()
        {
            Transform egg = GameController.GetSingleton().levelsController.eggController.transform;
            float     dis = Mathf.Abs(egg.position.y - transform.position.y);

//			Log.Debug ("1 {0},2 {1}",egg.position.y > transform.position.y - 0.05f,dis);
            if (egg.position.y > transform.position.y - 1f && sensibleDistance >= dis)
            {
                tracer.target = egg;
            }
            else
            {
                tracer.target = null;
            }

            tracer.Update();
        }
Пример #3
0
 void Update()
 {
     tracer.Update();
 }