• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Seeker类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Awake

		/** Alerts the Seeker that this modifier exists */
		public void Awake () {
			seeker = GetComponent<Seeker>();

			if (seeker != null) {
				seeker.RegisterModifier(this);
			}
		}
开发者ID:Xylord,项目名称:Project-Feels,代码行数:8,代码来源:Modifiers.cs


示例17: Start

    void Start()
    {
        seeker = GetComponent<Seeker>();
        rb = GetComponent<Rigidbody2D>();
        myT = GetComponent<Transform>();
        anim = GetComponent<Animator>();

        //clockTower = FindObjectOfType<ClockTower>().gameObject;
        //if (townNPC)
        //{
        //    anim.SetBool("CanSeePlayer", true);
        //    anim.SetBool("Idle", false);
        //    anim.SetBool("Patrol", false);
        //    //target = clockTower.transform;
        //    seeker.StartPath(transform.position, target.position, OnPathComplete);
        //    StartCoroutine(UpdatePath());
        //}

            if (target == null)
        {
            //Debug.LogError("No Player found");
            return;
        }       

        //StartCoroutine(UpdatePath());
    }
开发者ID:SMBNoog,项目名称:IsleOfAdventure,代码行数:26,代码来源:NewEnemyAI.cs


示例18: Start

	// Use this for initialization
	public virtual void Start () {
		direction = 1;
        au_s = GetComponent<AudioSource>();
		player = GameObject.FindGameObjectWithTag("Player");
		animation = GetComponent<Animator> ();
		seeker = GetComponent<Seeker> ();
	}
开发者ID:JustInToCoding,项目名称:Ritual,代码行数:8,代码来源:EnemyController.cs


示例19: btnUpload_Click

        protected void btnUpload_Click(object sender, EventArgs e)
        {
            if (fuSeekerResume.HasFile)
            {
                byte[] imageBytes = new byte[fuSeekerResume.PostedFile.InputStream.Length + 1];
               // fuSeekerResume.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length);
                Seeker objSeeker = new Seeker();
                string filename = Path.GetFileName(fuSeekerResume.PostedFile.FileName);
                string FName = Session["ID"].ToString()+filename;
                fuSeekerResume.SaveAs(Server.MapPath("~/PDF_Files/" + FName));
                objSeeker.Resume = "~/PDF_Files/" + FName;
                objSeeker.SeekerID = Convert.ToInt32(Session["ID"].ToString());
                int i = new RegisterBO().UpdateSeeker(objSeeker);
                if (i == 1)
                {
                    lblErr.Text = "Update Successful";
                }
                else { lblErr.Text = "updation failed"; }

            }
            else
            {
                lblErr.Text = "Please Choose a File";
            }
        }
开发者ID:yeshu125,项目名称:JobASP,代码行数:25,代码来源:UploadResume.aspx.cs


示例20: Start

	// Use this for initialization
	void Start () {
		target = GameObject.Find ("CharacterRobotBoy").transform;
		seeker = GetComponent<Seeker> ();




	}
开发者ID:AlexGrey,项目名称:shooter2dGame,代码行数:9,代码来源:EnemyAI.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Segment类代码示例发布时间:2022-05-24
下一篇:
C# SeekOrigin类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap