Esempio n. 1
0
 void OnDisable()
 {
     Object[] cameras = GameObject.FindObjectsOfType(typeof(OutlineEffect));
     foreach (Object c in cameras)
     {
         OutlineEffect effect = c as OutlineEffect;
         effect.RemoveOutline(this);
     }
 }
        private void Awake()
        {
            if (Instance != null)
            {
                Destroy(this);
                throw new System.Exception("you can only have one outline camera in the scene");
            }

            Instance = this;
        }
Esempio n. 3
0
 public void BroadcastOutline(OutlineEffect effect, bool add)
 {
     if (add)
     {
         effect.AddOutline(this);
     }
     else
     {
         effect.RemoveOutline(this);
     }
 }
Esempio n. 4
0
 private void Awake()
 {
     m_instance = this;
 }
 // Use this for initialization
 void Start()
 {
     _outlineEffect = GetComponent <OutlineEffect>();
 }
Esempio n. 6
0
 void Awake()
 {
     m_instance = this;
 }
Esempio n. 7
0
 private void Awake()
 {
     m_instance       = this;
     outlineMaterials = new Material[colors.Length];
 }
Esempio n. 8
0
 private void Awake()
 {
     //lineColor2 = new Color(66, 200, 254);
     m_instance = this;
 }