Esempio n. 1
0
 public void Interact(DriverController initiator)
 {
     if (OnInteraction != null)
     {
         OnInteraction(initiator);
     }
 }
Esempio n. 2
0
        public void ActivateCar(DriverController driver)
        {
            _switchManager.NotifySwitch(false);

            driver.DeactivateCharacter();
            enabled         = true;
            _turret.enabled = true;

            foreach (var wheel in _wheels)
            {
                wheel.enabled = true;
            }

            _cameraFollower.SwitchFollow(transform, CameraSize);
        }
Esempio n. 3
0
        void Awake()
        {
            FollowOnSight.Target = transform;
            _driver = FindObjectOfType <DriverController>();
            _driver.gameObject.SetActive(false);
            _turret         = GetComponentInChildren <TurretController>();
            _landingZones   = GetComponentsInChildren <TriggerDetection>().ToList();
            _cameraFollower = Camera.main.GetComponent <Follower>();

            var interactible = GetComponent <Interactible>();

            interactible.OnInteraction += ActivateCar;

            _wheels = GetComponentsInChildren <WheelRotation>();

            _switchManager = FindObjectOfType <SwitchManager>();
        }