Exemplo n.º 1
0
 public void Steal()
 {
     randomPos();
     if (ground.GetComponentInChildren <NpcAIAgent>() != null)
     {
         ground.GetComponentInChildren <NpcAIAgent>().AddReward(-1.0f);
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     cc             = GetComponent <CharacterController>();
     cc.enabled     = false;
     academy        = GameObject.Find("Academy").GetComponent <NpcaiAcademy>();
     rayPer         = GetComponent <ObjectPerception>();
     rayPer.enemy   = this;
     lastEpisode    = Timer.time;
     trainingGround = GetComponentInParent <TrainingGround>();
     isAlive        = true;
     deathTime      = 0;
     target         = trainingGround.GetComponentInChildren <TreasureController>();
     agentRb        = GetComponent <Rigidbody>();
     disToTarget    = float.MaxValue;
     player         = trainingGround.GetComponentInChildren <NpcAIAgent>();
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     cc             = GetComponent <CharacterController>();
     academy        = GameObject.Find("Academy").GetComponent <NpcaiAcademy>();
     rayPer         = GetComponent <ObjectPerception>();
     rayPer.player  = this;
     lastEpisode    = currentTime.Second;
     trainingGround = GetComponentInParent <TrainingGround>();
     target         = trainingGround.GetComponentInChildren <TreasureController>();
     //target.gameObject.SetActive(false);
     agentRb = GetComponent <Rigidbody>();
 }