// Use this for initialization void Start() { carMover = GetComponent <CarMover>(); WayPoint nextWP = waypoints[seekingWayPoint]; pointAt = nextWP.transform.position; }
void Spawn() { instance = Instantiate(AIPrefab, transform.position, transform.rotation) as CarMover; instance.enabled = false; instance.transform.parent = transform; instance.GetComponent<Rigidbody>().isKinematic = true; }
private void Start() { brain = new SNN(new List <int> { 5, 5, 1 }, random); mover = GetComponent <CarMover>(); sensorDistances = new List <double>(); }
void Start() { car = GetComponent<CarMover>(); arm = GetComponentInChildren<RotateTowardsInput>(); if(arm == null) { Debug.LogError("!!"); Debug.Break(); } }
public override void OnInspectorGUI() { DrawDefaultInspector(); if (GUILayout.Button("Move Car to Start")) { CarMover cm = target as CarMover; cm.MoveToStartPos(); } }
internal static void SetUpModelingProcessor(ModelingForm modelingForm, MappedTopology mappedTopology) { CashCounter = mappedTopology.CashCounter; FuelDispensersList = mappedTopology.FuelDispensersList; FuelTanksList = mappedTopology.FuelTanksList; _isCollectingMoney = false; _isRefilling = false; CarMover.SetUpCarMover(modelingForm); CarRouter.SetUpCarRouter(modelingForm); RefuellerMover.SetUpRefuellerMover(modelingForm); }
// Use this for initialization protected override void Start() { base.Start(); audioSrc = GetComponent <AudioSource>(); progressImage.fillAmount = 0; progressImage.transform.parent.gameObject.SetActive(false); standartColor = progressImage.color; mover = FindObjectOfType <CarMover>(); }
private void Start() { carBrain = GetComponent <CarBrain>(); carMover = GetComponent <CarMover>(); GetComponent <Renderer>().material.color = UnityEngine.Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f); }
void Start() { Turret = GetComponentInChildren<RotateTowardsInput>(); mover = GetComponent<CarMover>(); FindTarget(); }
protected void Start() { mover = GetComponent<CarMover>(); body = GetComponent<Rigidbody>(); Setup(); }
void Start() { mover = GetComponent <CarMover>(); }
internal static void Tick(ModelingForm modelingForm, MappedTopology mappedTopology) { if (IsPaused) { return; } TimerTicksCount++; TicksAfterLastCarSpawning++; if (TimeAfterLastCarSpawningInSeconds >= TimeBetweenCars) { CarCreator.SpawnCar(); TimeBetweenCars = ModelSettings.TrafficFlow.TimeBetweenCars; TicksAfterLastCarSpawning = 0; } //if (!_paused) //{ // //return; // //CarCreator.SpawnCar(); // CarCreator.SpawnCollector(); // _paused = true; //} //if (TimerTicksCount % 20 == 0) //{ // CarCreator.SpawnCar(); //} #region LoopingControls var panelPlayground = modelingForm.PlaygroundPanel; foreach (Control control in panelPlayground.Controls) { if (!(control is MoveablePictureBox)) { continue; } var moveablePictureBox = control as MoveablePictureBox; // Car if (moveablePictureBox is CarPictureBox car) { CarRouter.RouteCar(car); CarMover.MoveCarToDestination(car); continue; } // Collector if (moveablePictureBox is CollectorPictureBox collector) { CarRouter.RouteCar(collector); CarMover.MoveCarToDestination(collector); continue; } // Refueller if (moveablePictureBox is RefuellerPictureBox refueller) { RefuellerRouter.RouteRefueller(refueller); RefuellerMover.MoveRefuellerToDestination(refueller); } } #endregion /LoopingControls #region UI UpdateUI(modelingForm, mappedTopology); #endregion UI }
void Start() { car = GetComponent<CarMover>(); rotators = GetComponentsInChildren<RotateTowardsInput>(); }