void Awake() { health = maxHealth; submarineResources = FindObjectOfType<Submarine_Resources>(); if (GetComponent<EnemyRespawn>()) { respawnPoint = GetComponent<EnemyRespawn>().point; } }
private Submarine_Resources sub_res; //Use to get the Submarine_Resource component info. #endregion Fields #region Methods // Use this for initialization void Start() { if (subt < 0.0f) subt = 0.001f; sub_res = GetComponent<Submarine_Resources>(); oxygenValue = sub_res.getOxygenLevel(); saturationValue = Camera.main.GetComponent<ColorCorrectionCurves>().saturation; }
void Start() { shipLights = GameObject.FindObjectOfType<ShipLights>(); envManager = GameObject.FindObjectOfType<EnvironmentManager>(); subRes = GameObject.FindObjectOfType<Submarine_Resources>(); // envMan = GameObject.FindObjectOfType<ActiveEnvironments>(); if (!shipCol) { shipCol = myShip.GetComponent<Collider>(); } }
// Use this for initialization void Start() { //This guarantee the volome does not go beyond 20.0f as the highest value is 20.0f if (maxSnd > 20.0f) maxSnd = 20.0f; if (minSnd < -80.0f) minSnd = -80.0f; sub_res = GetComponent<Submarine_Resources>(); oxygenValue = sub_res.getOxygenLevel(); }
void Awake() { subRes = FindObjectOfType<Submarine_Resources>(); //Sub Res Link rb = GetComponent<Rigidbody>(); //Rigidbody Link keyboard = FindObjectOfType<KeyboardManager>(); //Keyboard Link }