You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
| namespace Game
 | |
| {
 | |
|     public class AIEntityDefault : AIEntityBase<AIEntityDefault>
 | |
|     {
 | |
|         protected override void OnCreate()
 | |
|         {
 | |
|             Sequence(() =>
 | |
|             {
 | |
|                 SetHungry();
 | |
|                 CheckStagger();
 | |
|                 FindTarget();
 | |
|                 Selector(() =>
 | |
|                 {
 | |
|                     Sequence(() =>
 | |
|                     {
 | |
|                         CheckDistance(0, 2);
 | |
|                         MoveBack();
 | |
|                     });
 | |
|                     Sequence(() =>
 | |
|                     {
 | |
|                         CheckDistance(2, 3);
 | |
|                         MoveAroundTo();
 | |
|                     });
 | |
|                     MoveTo();
 | |
|                 });
 | |
|             });
 | |
|         }
 | |
| 
 | |
|         private void SetHungry()
 | |
|         {
 | |
|             Selector("设置饥饿值", () =>
 | |
|             {
 | |
|                 SetHungryIncrease(EAIModuleType.LongRange, 1, 1);
 | |
|                 SetHungryIncrease(EAIModuleType.Melee, 1, 1);
 | |
|                 SetHungryIncrease(EAIModuleType.Spectator, 1, 1);
 | |
|             });
 | |
|         }
 | |
|     }
 | |
| } |