Example #1
0
        private void Start()
        {
            var bot = GetComponent <Bot>();

            if (bot != null)
            {
                RadiusTrigger.Create(transform, Layers.Sight, bot.ContactRadius + Range, OnEnter, OnExit);
            }
        }
Example #2
0
        protected void Start()
        {
            body = GetComponent <Rigidbody>();
            var bot = GetComponent <Bot>();

            if (bot != null)
            {
                boundaryRadius = bot.ContactRadius + 0.1f;
                RadiusTrigger.Create(transform, Layers.Sight, boundaryRadius, OnTouch);
            }
        }