Ejemplo n.º 1
0
 void OnMouseOver()
 {
     if (_outline == null)
     {
         Renderer rend = GetComponentInChildren <Renderer>();
         _outline = rend.gameObject.AddComponent <Outline>();
         GameObject       player     = GameObject.FindWithTag("Player");
         AshleyController controller = player.GetComponent <AshleyController>();
         controller.target = rend.gameObject;
     }
 }
Ejemplo n.º 2
0
        void OnMouseExit()
        {
            if (_outline != null)
            {
                GameObject       player     = GameObject.FindWithTag("Player");
                AshleyController controller = player.GetComponent <AshleyController>();
                controller.target = null;

                Destroy(_outline);
                _outline = null;
            }
        }