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


C# Property.setHolderSpline方法代码示例

本文整理汇总了C#中Property.setHolderSpline方法的典型用法代码示例。如果您正苦于以下问题:C# Property.setHolderSpline方法的具体用法?C# Property.setHolderSpline怎么用?C# Property.setHolderSpline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Property的用法示例。


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

示例1: doscan

		private IEnumerator doscan ()
		{
				GameObject loadSplineb = Instantiate (loadSplinePrefab) as GameObject;
				GameObject holder = gameObject;
				int i = 0, station_id = 0;
				loadSpline = loadSplineb.GetComponent<Spline> () as Spline; 
				loadSplineb.name = "game trail preference";
				totalnodes = loadSpline.SplineNodes.Length;
				//foreach (SplineNode L in loadSpline.SplineNodes) {
				//L.Position;
				//}
//		GameObject ro = GameObject.Find (name_of_the_property_holder);
//				if (ro == null) {
//						ro = GameObject.Instantiate (allproperties, Vector3.zero, Quaternion.identity) as GameObject;
//						ro.name = name_of_the_property_holder;
//				}
				//int endof = 50, station_c = 0;
				bigList.Clear ();
				//for (int i=0; i<totalnodes; i++) {
				foreach (SplineNode L in loadSpline.SplineNodes) {
						//string objectname = name_of_the_property_holder + "/" + getnum (i);
						//Debug.Log ("objectname to show:" + objectname);
						//GameObject holder = GameObject.Find (objectname);
						//if (holder != null) {
						//Debug.Log ("objectname found:" + objectname);
						Property pr = new Property ();
						pr.event_pass = Property.passing_event.NOTHING;
						pr.name = "P:" + getnum (i);
						pr.id = i;
						pr.fix_price_inflation_factor = Random.Range (fixPriceInflationRange.x, fixPriceInflationRange.y);
						pr.revenue_factor = Random.Range (revenueRange.x, revenueRange.y);
						//setup and create the default location place;
						GameObject hholder = new GameObject ();
						hholder.transform.position = L.Position;
						hholder.transform.parent = holder.transform;
						pr.setHolderSpline (debug, hholder, rezIsland, splineSidelocation (i, L.Position));
						Station install_station = mstation.Find (x => x.position_step == station_id);
						if (install_station != null) {
								pr.event_pass = install_station.event_pass;
								pr.blocktype = install_station.blocktype;
								pr.name = "Special:" + install_station.name;
								pr.id = install_station.id;
								pr.owned_by_id = -2;
								pr.fix_price_inflation_factor = -1;
								pr.revenue_factor = -1;
								pr.setSpecialBuilding (install_station, Vector3.up * building_offset);
						}
						hholder.name = pr.name;
						bigList.Add (pr);
						station_id++;
						i++;
						yield return new WaitForEndOfFrame ();
						//}
				}

				//players initalization for demo
				if (useExistingTagPlayer) {
						Debug.Log ("useExistingTagPlayer");
						foreach (GameObject snapob in GameObject.FindGameObjectsWithTag("Player")) {
								snapob.SetActive (true);
								RichmanAnimator h = snapob.GetComponent<RichmanAnimator> ();
								h.enabled = true;
								h.init (loadSpline);
								h.setDemo (true);
								//Debug.Log ("enabled");
								yield return new WaitForSeconds (0.5f);
						}
						yield return new WaitForSeconds (0.5f);
//						if (demoCC.Instance != null) {
//							demoCC.Instance.initss ();
//						}
				}
		}
开发者ID:GDxU,项目名称:incomplete-richman,代码行数:73,代码来源:SplineCity.cs


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