public override void OnGameEnded() { base.OnGameEnded(); if (_spawnerInstace != null) { Destroy(_spawnerInstace.gameObject); _spawnerInstace = null; } }
// ADD THE ELEMINATION AFTER LANDING // ADD DETECTIONXXX void Start() { b_withinAngleLimits = false; interceptPoint = interceptionPointGO.transform.position; glideSlopeRadiusDist = Vector3.Distance(transform.position, interceptPoint); landingPlane = null; ATCInterface = ATCinterfaceGO.GetComponent <AirplaneMovementInterface>(); spawner = FindObjectOfType <PlaneSpawner>(); }
private void SetActiveRunwaysBasedOnWindForecast(PlaneSpawner spawner) { if (windDirFromHeading <= 180) { spawner.activeRunwayComingFromThe = "East"; } else { spawner.activeRunwayComingFromThe = "West"; } }
private void Start() { skyCondition = new string[4]; skyCondition[0] = "Foggy"; skyCondition[1] = "Clear"; skyCondition[2] = "Rainy"; skyCondition[3] = "Overcast"; planeSpawner = FindObjectOfType <PlaneSpawner>(); RandomiseWeather(); SetActiveRunwaysBasedOnWindForecast(planeSpawner); }
// METHODS ----- new void Start() { base.Start(); _weaponTrail = GetComponentInChildren<TrailRenderer>(); _attackPlanePoint = GetComponentInChildren<PlaneSpawner>(); SoundController = GetComponent<RandomSoundPlayer>(); CollectRadius += 1; // TESTING AddEffectToWeapons(new Damage(25)); ui = GameObject.Find("UI").GetComponent<SpiritMeterUI>(); if (DashEnabled) { _dashTrail = GetComponent<TrailRenderer> (); } _mainCamera = GameObject.FindGameObjectWithTag("MainCamera").camera; _reviveHeartPrefab = (GameObject) Resources.Load("ReviveHeart"); //currentSpiritPower = gameObject.AddComponent<SpiritBungie>(); //currentSpiritPower = gameObject.AddComponent<SpiritLightning>(); //currentSpiritPower = gameObject.AddComponent<SpiritPingPong>(); //currentSpiritPower = gameObject.AddComponent<SpiritImmortal>(); currentSpiritPower = gameObject.AddComponent<SpiritBungie>(); aspect = GetComponentInChildren<EntityRig>().Entity.GetAspect("twinhero"); //Search for menu settings GameObject levelInfo = GameObject.Find("LevelCreationInfo"); if (levelInfo != null) { spiritRegen = levelInfo.GetComponent<LevelCreationInfo>().spiritRegen; _damageRecievedModifier = levelInfo.GetComponent<LevelCreationInfo>().DamageRecievedModifier; } }
// Start is called before the first frame update void Start() { spawner = FindObjectOfType <PlaneSpawner>(); }
public override void OnGameStarted() { base.OnGameStarted(); _spawnerInstace = GameObject.Instantiate(_spawnerPrefab); _spawnerInstace.transform.position = Vector3.zero; }
// Start is called before the first frame update void Start() { plnSpawner = FindObjectOfType <PlaneSpawner>(); Debug.Log(plnSpawner.name); }