當前位置: 首頁>>代碼示例>>C#>>正文


C# Agent.Set_Agent方法代碼示例

本文整理匯總了C#中Agent.Set_Agent方法的典型用法代碼示例。如果您正苦於以下問題:C# Agent.Set_Agent方法的具體用法?C# Agent.Set_Agent怎麽用?C# Agent.Set_Agent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Agent的用法示例。


在下文中一共展示了Agent.Set_Agent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Start

	[UsedImplicitly] private void Start ()
	{
		Agent quick_agent = new Agent();
		quick_agent.Set_Agent(
			Agent_Simpletrain_Start,
			Agent_Simpletrain_Update,
			Agent_Simpletrain_End,
			Agent_Simpletrain_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "SIMPLETRAIN");
		
		quick_agent.Set_Agent(
			Agent_SchoolTrain_Start,
			Agent_SchoolTrain_Update,
			Agent_SchoolTrain_End,
			Agent_SchoolTrain_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "SCHOOLTRAIN");
		
		quick_agent.Set_Agent(
			Agent_TrainCarpenter_Start,
			Agent_TrainCarpenter_Update,
			Agent_TrainCarpenter_End,
			Agent_TrainCarpenter_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "TRAINCARPENTER");
		
		quick_agent.Set_Agent(
			Agent_TrainLumberjack_Start,
			Agent_TrainLumberjack_Update,
			Agent_TrainLumberjack_End,
			Agent_TrainLumberjack_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "TRAINLUMBERJACK");
		
		quick_agent.Set_Agent(
			Agent_TrainMiner_Start,
			Agent_TrainMiner_Update,
			Agent_TrainMiner_End,
			Agent_TrainMiner_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "TRAINMINER");
		
		quick_agent.Set_Agent(
			Agent_TrainBlacksmith_Start,
			Agent_TrainBlacksmith_Update,
			Agent_TrainBlacksmith_End,
			Agent_TrainBlacksmith_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "TRAINBLACKSMITH");
		
		quick_agent.Set_Agent(
			Agent_TrainTeacher_Start,
			Agent_TrainTeacher_Update,
			Agent_TrainTeacher_End,
			Agent_TrainTeacher_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "TRAINTEACHER");
		
		quick_agent.Set_Agent(
			Agent_TrainRifleman_Start,
			Agent_TrainRifleman_Update,
			Agent_TrainRifleman_End,
			Agent_TrainRifleman_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "TRAINRIFLEMAN");
		
		quick_agent.Set_Agent(
			Agent_Move_Start,
			Agent_Move_Update,
			Agent_Move_End,
			Agent_Move_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "MOVE");
		
		quick_agent.Set_Agent(
			Agent_CutTree_Start,
			Agent_CutTree_Update,
			Agent_CutTree_End,
			Agent_CutTree_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "CUTTREE");
		
		quick_agent.Set_Agent(
			Agent_SimpleMineOre_Start,
			Agent_SimpleMineOre_Update,
			Agent_SimpleMineOre_End,
			Agent_SimpleMineOre_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "SIMPLEMINEORE");
		
		quick_agent.Set_Agent(
			Agent_SimpleMineCoal_Start,
			Agent_SimpleMineCoal_Update,
			Agent_SimpleMineCoal_End,
			Agent_SimpleMineCoal_CompletedCheck
			);
		AgentMaster.Register_Agent_Type(quick_agent, "SIMPLEMINECOAL");
		
		quick_agent.Set_Agent(
//.........這裏部分代碼省略.........
開發者ID:DarkXenoShark,項目名稱:AI-ICA2-RTS,代碼行數:101,代碼來源:AgentCommandCompilation.cs


注:本文中的Agent.Set_Agent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。