本文整理匯總了C#中AgentData.getInitial方法的典型用法代碼示例。如果您正苦於以下問題:C# AgentData.getInitial方法的具體用法?C# AgentData.getInitial怎麽用?C# AgentData.getInitial使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AgentData
的用法示例。
在下文中一共展示了AgentData.getInitial方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: spawnAgent
private void spawnAgent()
{
Vector3 spawnPos = GameObject.FindGameObjectWithTag("Spawn").transform.position;
Quaternion rotate = GameObject.FindGameObjectWithTag("Spawn").transform.rotation;
GameObject npc = Instantiate(SpawnList[0], spawnPos, rotate) as GameObject;
AgentData tempData = new AgentData();
Debug.Log ("ID from npc : " + npc.GetInstanceID());
tempData.setID(npc.GetInstanceID());
Debug.Log ("ID from data : " + tempData.getID());
tempData.setOtherAgents(findOtherAgents());
Debug.Log ("OtherAgents : " + tempData.getOtherAgents());
Debug.Log ("Name from npc : " + npc.name);
tempData.setInitial(npc.name);
Debug.Log ("Name from data : " + tempData.getInitial());
npc.GetComponent<Sentry>().setAgentData(tempData);
Debug.Log (npc.GetComponent<Sentry>().getAgentData().getInitial());
History.Add(tempData);
//if (History[agentAttempts] == null) Debug.Log (agentAttempts + " was null");
//Debug.Log ("History ID : " + History[agentAttempts].getInitial());
//Debug.Log ("History: " + History.Count());
agentAttempts++;
SpawnList.RemoveAt(0);
Debug.Log ("After SpawnList Remove");
setWaypointsForNPCs();
}