Пример #1
0
    void Awake()
    {
        health = maxHealth;
        submarineResources = FindObjectOfType<Submarine_Resources>();

        if (GetComponent<EnemyRespawn>()) {
            respawnPoint = GetComponent<EnemyRespawn>().point;
        }
    }
Пример #2
0
    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;
    }
Пример #3
0
 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>();
     }
 }
Пример #4
0
    // 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();
    }
Пример #5
0
 void Awake()
 {
     subRes = FindObjectOfType<Submarine_Resources>();		//Sub Res Link
     rb = GetComponent<Rigidbody>();							//Rigidbody Link
     keyboard = FindObjectOfType<KeyboardManager>();			//Keyboard Link
 }