Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        flightComputer       = gameObject.GetComponent <FlightComputer>();
        pathNavigator        = gameObject.GetComponent <PathNavigator>();
        flightDataVisualizer = gameObject.GetComponentInChildren <FlightDataVisualizer>();

        //Check if landing pad is selected or find
        if (CurrentLandingPad == null)
        {
            SetCurrentLandingPadToClosest();
        }
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     plane                = transform;
     engineController     = gameObject.GetComponent <EngineController>();
     flightDataVisualizer = gameObject.GetComponentInChildren <FlightDataVisualizer>();
     controllerInputs     = GameObject.Find("VRActions").GetComponent <ControllerInputs>();
     pathNavigator        = this.GetComponent <PathNavigator>();
     navigationComputer   = this.GetComponent <NavigationComputer>();
     currentFlightData    = new FlightData(plane, engineController, pathNavigator);
     flightDataVisualizer.CurrentFlightData = currentFlightData;
     soundController = GetComponentInChildren <SoundController>();
     soundController.FlightComputerRef = this;
 }