Esempio n. 1
0
 /* Ici on exécute le comportement paramétré, qui lui aura un algorithme de recherche
  * différent prédéfini pour chaque état */
 public override void Execution()
 {
     if (Comportement != null)
     {
         Comportement.Execution();
     }
 }
Esempio n. 2
0
 /* ici on analyse si l'état du personnage convient selon ses paramètres
  * et on change l'état selon les conclusions, qui se chargera
  * de changer le comportement à associer automatiquement */
 public override void AnalyserSituation()
 {
     if (Comportement != null)
     {
         Comportement.AnalyserSituation();
     }
 }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     comportement = Comportement.getComportement (comportementType);
     comportement.iapos = transform.position;
     if (timer == 0) {
         comportement.CalculateDestination (playerDestination);
         navAgent.SetDestination (comportement.destination);
         timer = comportement.timeBeforeUpdate;
     }
     timer--;
 }
Esempio n. 4
0
 void CheckComportement()
 {
     comportement = Comportement.getComportement (comportementType);
     //	comportement = Comportement.getComportement (comportementType);
 }
Esempio n. 5
0
 /// <summary>
 /// Constructeur.
 /// </summary>
 /// <param name="type">Le type d'objectif.</param>
 /// <param name="chaineRealisation">La chaîne de comportements utilisée pour la réalisation de l'objectif.</param>
 public Objectif(TypeObjectif type, Comportement chaineRealisation)
 {
     this.TypeObj             = type;
     this.RealisationObjectif = chaineRealisation;
 }