Exemplo n.º 1
0
        private void OnEnable()
        {
            Transform lookIn = effects == null ? transform : effects;

            particleSystems = lookIn.GetComponents <ParticleSystem>();
            _startables     = lookIn.GetComponents <Startable>();
            if (focusGrabber == null)
            {
                focusGrabber = GetComponent <FocusGrabber>();
            }
        }
Exemplo n.º 2
0
 private void Update()
 {
     if (grab && !wasGrabbing)
     {
         if (CURRENT_GRABBER != null)
         {
             CURRENT_GRABBER.grab = false;
         }
         CURRENT_GRABBER = this;
     }
     wasGrabbing = grab;
 }
Exemplo n.º 3
0
 public override void OnEnable()
 {
     base.OnEnable();
     if (cam != null)
     {
         cam = GetComponent <Camera>();
     }
     if (focusGrabber == null)
     {
         focusGrabber = GetComponent <FocusGrabber>();
     }
 }
Exemplo n.º 4
0
 public void Start()
 {
     if (cam == null)
     {
         return;
     }
     if (moveen != null)
     {
         bodyRigid = moveen.body == null?moveen.gameObject.GetComponent <Rigidbody>() : moveen.body.GetComponent <Rigidbody>();
     }
     if (focusGrabber == null)
     {
         focusGrabber = GetComponent <FocusGrabber>();
     }
 }