private void OnTriggerEnter(Collider other) { if (other.tag == "goal") { TankAcademy academy = GameObject.Find("Academy").GetComponent <TankAcademy>(); academy.EventGoalSphereHitByBullet(m_TankIdOwner); } gameObject.SetActive(false); }
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>(); }
/// <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"); }
private void Awake() { Init(); m_LastLookUpdate = Time.realtimeSinceStartup; myAcademy = myAcademyObj.GetComponent <TankAcademy>(); }