Esempio n. 1
0
 private void Awake()
 {
     attack          = GetComponent <Attack>();
     attack.offline  = true;
     movement        = GetComponent <Movement>();
     rbody           = GetComponent <Rigidbody>();
     targetRigidBody = GetComponent <Rigidbody>();
     hitEnemy.AddListener(data => // If we hit enemy, reward
     {
         //print("hit");
         SetReward(data); // Reward proportional to damage dealt
         Done();
     });
     attack.alliesTag  = alliesTag.ToList();
     attack.enemiesTag = enemiesTag.ToList();
     academy           = GameObject.Find("Academy").GetComponent <KillerAcademy>();
 }
Esempio n. 2
0
 private void Start()
 {
     rBody   = GetComponent <Rigidbody>();
     academy = GameObject.Find("Academy").GetComponent <KillerAcademy>();
 }