Exemple #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "goal")
     {
         TankAcademy academy = GameObject.Find("Academy").GetComponent <TankAcademy>();
         academy.EventGoalSphereHitByBullet(m_TankIdOwner);
     }
     gameObject.SetActive(false);
 }
Exemple #2
0
 public override void InitializeAgent()
 {
     base.InitializeAgent();
     m_Shooting = GetComponent <Shooting>();
     //m_Movement = GetComponent<Movement>();
     m_Movement             = GetComponent <LocalMovement>();
     Monitor.verticalOffset = 1f;
     myArea    = area.GetComponent <TankArea>();
     rayPer    = GetComponent <RayPerception>();
     myAcademy = myAcademyObj.GetComponent <TankAcademy>();
     agentRB   = GetComponent <Rigidbody>();
 }
Exemple #3
0
 /// <summary>
 /// Get physics mask
 /// </summary>
 protected virtual void Awake()
 {
     if (s_Instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         s_Instance = this;
     }
     myAcademy     = myAcademyObj.GetComponent <TankAcademy>();
     m_PhysicsMask = LayerMask.GetMask("Players", "Projectiles", "Powerups", "DestructibleHazards", "Decorations");
 }
Exemple #4
0
 private void Awake()
 {
     Init();
     m_LastLookUpdate = Time.realtimeSinceStartup;
     myAcademy        = myAcademyObj.GetComponent <TankAcademy>();
 }