-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAIDecisionMaker.cs
58 lines (41 loc) · 1.76 KB
/
AIDecisionMaker.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using AI_BehaviorTree_AIGameUtility;
using System.Collections.Generic;
using FOSCHIANI;
using CHATEIGNER;
using UnityEngine.Assertions;
namespace AI_BehaviorTree_AIImplementation
{
public class AIDecisionMaker
{
/// <summary>
/// Ne pas supprimer des fonctions, ou changer leur signature sinon la DLL ne fonctionnera plus
/// Vous pouvez unitquement modifier l'intérieur des fonctions si nécessaire (par exemple le nom)
/// ComputeAIDecision en fait partit
/// </summary>
private int AIId = -1;
public GameWorldUtils AIGameWorldUtils = new GameWorldUtils();
Nimbus2000 Nimbus2000 = new Nimbus2000();
// Ne pas utiliser cette fonction, elle n'est utile que pour le jeu qui vous Set votre Id, si vous voulez votre Id utilisez AIId
public void SetAIId(int parAIId) { AIId = parAIId; }
public string GetName() { return "Nimbus 2000"; }
public void SetAIGameWorldUtils(GameWorldUtils parGameWorldUtils) { AIGameWorldUtils = parGameWorldUtils; }
//Fin du bloc de fonction nécessaire (Attention ComputeAIDecision en fait aussi partit)
public void OnMyAIDeath()
{
}
public List<AIAction> ComputeAIDecision()
{
return Nimbus2000.ComputeAIDecision(AIId, AIGameWorldUtils);
}
public PlayerInformations GetPlayerInfos(int parPlayerId, List<PlayerInformations> parPlayerInfosList)
{
foreach (PlayerInformations playerInfo in parPlayerInfosList)
{
if (playerInfo.PlayerId == parPlayerId)
return playerInfo;
}
Assert.IsTrue(false, "GetPlayerInfos : PlayerId not Found");
return null;
}
}
}