예제 #1
0
 private void Awake()
 {
     hud           = FindObjectOfType <HUDController>();
     countdownUI   = FindObjectOfType <CountdownUIController>();
     pauseMenu     = FindObjectOfType <PauseMenuController>();
     gameoverUI    = FindObjectOfType <GameOverUIController>();
     virtualCamera = FindObjectOfType <CinemachineVirtualCamera>();
     aircraftArea  = FindObjectOfType <AircraftArea>();
     ActiveCamera  = FindObjectOfType <Camera>();
 }
예제 #2
0
        /// <summary>
        /// Called when the agent is first initialized
        /// </summary>
        public override void Initialize()
        {
            area      = GetComponentInParent <AircraftArea>();
            rigidbody = GetComponent <Rigidbody>();
            trail     = GetComponent <TrailRenderer>();

            // Override the max step set in the inspector
            // Max 5000 steps if training, infinite steps if racing
            MaxStep = area.trainingMode ? 5000 : 0;
        }
        public override void InitializeAgent()
        {
            base.InitializeAgent();
            area          = GetComponentInParent <AircraftArea>();
            rigidbody     = GetComponent <Rigidbody>();
            trail         = GetComponent <TrailRenderer>();
            rayPerception = GetComponent <RayPerception3D>();

            //Override max step set in inspoector
            //Max 5000 if training infinite if racing
            agentParameters.maxStep = area.trainingMode ? 5000 : 0;
        }