当前位置: 首页>>代码示例>>C#>>正文


C# Seeker类代码示例

本文整理汇总了C#中Seeker的典型用法代码示例。如果您正苦于以下问题:C# Seeker类的具体用法?C# Seeker怎么用?C# Seeker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Seeker类属于命名空间,在下文中一共展示了Seeker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	/** Use this for initialization */
	public void Start () {
		seeker = GetComponent<Seeker>();
		controller = GetComponent<CharacterController>();

		tr = transform;
		Repath();
	}
开发者ID:CCGLP,项目名称:Fast,代码行数:8,代码来源:AIFollow.cs

示例2: Start

    void Start()
    {
        _seeker = GetComponent<Seeker>();
        _characterController = GetComponent<CharacterController>();

        _compass = transform.Find("Compass");
    }
开发者ID:mortware,项目名称:rts,代码行数:7,代码来源:MovementController.cs

示例3: Update

	// Update is called once per frame
	void Update () {
		if(Vector3.Distance(transform.position,player.position)<10){
			sighted = true;
			target = player.position;
			Debug.Log(sighted);
		}	
		float distA = Vector3.Distance(transform.position,pointA.position);
		float distB = Vector3.Distance(transform.position,pointB.position);
		if(distA<2){
			atA = true;
			atB = false;
			target = pointB.position;
		}
		if(distB<2){
			atB = true;
			atA = false;
			target = pointA.position;
		}
		if(Time.time > curTime+waitTime){
			seeker = GetComponent<Seeker>();
			seeker.StartPath(transform.position,target,OnPathComplete);
			charctlr = GetComponent<CharacterController>();
			curTime = Time.time;
		}
	}
开发者ID:kxh337,项目名称:Sephone,代码行数:26,代码来源:GhostTwoPoint.cs

示例4: Start

	void Start () {
        pathFinder = GetComponent<Seeker>();
        pathFinder.StartPath(transform.position, SceneManager.Instance.creeperTargetPosition);
        var waveMultiplier = 1 + (SceneManager.Instance.WaveCount / 5f);
        life *= waveMultiplier;
        GetComponent<AIPath>().speed *= waveMultiplier;
    }
开发者ID:legionaryu,项目名称:Atom-defender,代码行数:7,代码来源:Creeper.cs

示例5: Start

    void Start()
    {
        var distanceFirstPlayer = Vector3.Distance(firstPlayer.transform.position, transform.position);
        var distanceSecondPlayer = Vector3.Distance(secondPlayer.transform.position, transform.position);

        if (distanceFirstPlayer > distanceSecondPlayer)
        {
            target = secondPlayer;
        }
        else
        {
            target = firstPlayer;
        }

        startTime = Time.time; 
        seeker = GetComponent<Seeker>();
        rb = GetComponent<Rigidbody2D>();

        if (target == null)
        {
            Debug.Log("pesho");
            return;
        }

        seeker.StartPath(transform.position, target.position, OnPathComplete);

        StartCoroutine(UpdatePath());

    }
开发者ID:Hris21,项目名称:Flaminis,代码行数:29,代码来源:EnemyAi.cs

示例6: Start

	void Start ()
	{
		target = GameObject.Find("Player");
		cachedTargetPosition = new Vector3(target.transform.position.x,target.transform.position.y,target.transform.position.z);
		seeker = GetComponent<Seeker> ();
		characterController = GetComponent<CharacterController>();
		switch (currentMode) {
		case MODE.STRAIGHT:
			seeker.StartPath (this.transform.position, target.transform.position, OnPathComplete);
			isSearching = true;
			break;
		case MODE.HUNT:
			seeker.StartPath (this.transform.position, target.transform.position, OnPathComplete);
			isSearching = true;
			break;
		case MODE.HIDE:
			if(isInLOS()){
				Vector3 hidingPoint = findHidingPoint();
				seeker.StartPath (this.transform.position, hidingPoint, OnPathComplete);
				isSearching = true;
			};
			break;
		default:
			break;
		}
	}
开发者ID:BjarkeHou,项目名称:AIMove,代码行数:26,代码来源:AI_Move.cs

示例7: Start

 public void Start ()
 {
   seeker = GetComponent<Seeker>();
   body = GetComponent<Rigidbody2D>();
   //Start a new path to the targetPosition, return the result to the OnPathComplete function
   seeker.StartPath(body.position,target.position,OnPathComplete );
 }
开发者ID:Kostas333,项目名称:PiratesDemo,代码行数:7,代码来源:AstarAI.cs

示例8: Start

 public void Start()
 {
     seeker = GetComponent<Seeker>();
     controller = GetComponent<CharacterController>();
     //Start a new path to the targetPosition, return the result to the OnPathComplete function
     seeker.StartPath(transform.position, targetPosition, OnPathComplete);
 }
开发者ID:Super-Goat-Herders,项目名称:ProjectGoat,代码行数:7,代码来源:AiStar4.cs

示例9: Start

	// Use this for initialization
	void Start () {

		//target = GameObject.FindGameObjectWithTag("Target").transform;
		seeker = GetComponent<Seeker>();

		seeker.StartPath (transform.position, target.position, OnPathComplete);
	}
开发者ID:JoshuaManricks,项目名称:Orbital,代码行数:8,代码来源:SeekerMissile.cs

示例10: Start

 // Use this for initialization
 void Start()
 {
     oldPosition = targetPosition;
     seeker = GetComponent<Seeker>();
     StartCoroutine(repathTime());
     seeker.StartPath(transform.position,GameObject.Find("Player").transform.position,OnPathComplete);
 }
开发者ID:hosfordryan,项目名称:Rougelike,代码行数:8,代码来源:EnemyAI.cs

示例11: Start

 public void Start()
 {
     seeker = GetComponent<Seeker>();
     controller = GetComponent<CharacterController>();
     FindTarget();
     StartCoroutine(GetNewPath());
 }
开发者ID:uudkdevs2013,项目名称:TheSonOfBSF,代码行数:7,代码来源:AstarAI.cs

示例12: Start

 void Start()
 {
     m_Seeker = GetComponent<Seeker>();
     m_Seeker.pathCallback += OnPathComplete;
     m_Path = GetComponent<AIPath>();
     m_Path.MoveComplete += OnMoveComplete;
 }
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:7,代码来源:InputController.cs

示例13: AddSeeker

        public int AddSeeker(LoginSeeker ObjSeeker, Seeker Objs)
        {
            try
            {
                _unitOfWork.Repository<Seeker>().Insert(Objs);
                // _unitOfWork.Save();
                ObjSeeker.SeekerID = _unitOfWork.Repository<Seeker>().GetAll().Where(c => c.EmailID == Objs.EmailID).Select(c => c.SeekerID).FirstOrDefault();
                _unitOfWork.Repository<LoginSeeker>().Insert(ObjSeeker);
                _unitOfWork.Save();
                return 1;
            }
            catch (Exception)
            {

                return 0;
            }

            //using (JobASPContext context = new JobASPContext())
            //{
            //    try
            //    {
            //        context.Seekers.Add(Objs);
            //        context.SaveChanges();
            //        ObjSeeker.SeekerID = context.Seekers.Where(c => c.EmailID == Objs.EmailID).Select(c => c.SeekerID).FirstOrDefault();
            //        context.LoginSeeker.Add(ObjSeeker);
            //        context.SaveChanges();
            //        return 1;
            //    }
            //    catch (Exception)
            //    {
            //        return 0;
            //    }
            //}
        }
开发者ID:yeshu125,项目名称:JobASP,代码行数:34,代码来源:RegisterBO.cs

示例14: Start

	void Start()
	{
		GameObject goItemManager = GameObject.FindGameObjectsWithTag("GameManager").FirstOrDefault( (go) => go.name == "Item Manager" );
		if( null == goItemManager )
			Debug.LogError( "Failed to find Item Manager game object");
		else
			m_Inventory = new Inventory( goItemManager.GetComponent<InventoryManager>() );

		m_Path = GetComponent<AIPath>();
		m_Seeker = GetComponent<Seeker>();

		// Find the start locator and set our position/orientation
		if( !string.IsNullOrEmpty( m_StartLocatorName ) )
		{
			GameObject[] locators = GameObject.FindGameObjectsWithTag( "Locator" );
			if( locators.Length > 0 )
			{
				GameObject startLocator = locators.FirstOrDefault( (i) => { return i.name == m_StartLocatorName; } );

				if( null != startLocator )
				{
					transform.position = startLocator.transform.position;
					transform.rotation = startLocator.transform.rotation;
				}
			}
		}
	}
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:27,代码来源:Player.cs

示例15: Start

	// Use this for initialization
	void Start () {
		instance = this;
		ConsoleControl.Log("Start called");
		float theBeforeTime = Time.realtimeSinceStartup;
		/*for (int i = 0; i < floors.Length; i++){
			floors[i].Id = i+1;
			//floors[i].make();
		}*/



		line = this.GetComponent<LineRenderer>();//get a reference to the line
		seeker = GetComponent<Seeker>();
		//astarPath = GetComponent<AstarPath>();
		//logs["Getting components"] = Time.realtimeSinceStartup - theBeforeTime;

		//logs["Set active floor"] = Time.realtimeSinceStartup - theBeforeTime;

		//add the waypoints to the graph
		//float thebeforetime = Time.realtimeSinceStartup;

		PlayerPrefs.SetString("MarkerSave", "");
		MapLabel.loadMarkers();
		//logs["Initial marker load"] = Time.realtimeSinceStartup - theBeforeTime;
		if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork){
			startMarkerUpdate();
		}
		//logs["Start update of markers"] = Time.realtimeSinceStartup - theBeforeTime;

		logs["Startup time"] = Time.realtimeSinceStartup - theBeforeTime;

		setLogs();
	}
开发者ID:KMarshland,项目名称:ChildrensHospitalApp,代码行数:34,代码来源:MapMaker.cs


注:本文中的Seeker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。