Пример #1
0
    // Use this for initialization
    void Awake()
    {
        GameObject missleValuesObjectRef = GameObject.FindWithTag("ScriptManager");

        if (missleValuesObjectRef != null)
        {
            _MVRef = missleValuesObjectRef.GetComponent <MissleValues>();
        }
        else
        {
            Debug.Log("Cannot find MissleValues script");
        }

        _camTransform = Camera.main.transform;
        _missle       = this.gameObject;
        _missleSpeed  = _MVRef.missleSpeed;
    }
Пример #2
0
    private void Awake()
    {
        GameObject missleValuesObject = GameObject.FindWithTag("ScriptManager");

        if (missleValuesObject != null)
        {
            _MVRef = missleValuesObject.GetComponent <MissleValues>();
        }
        else
        {
            Debug.Log("Cannot find MissleValues script");
        }

        _thisTransform      = this.gameObject.transform;
        _timeBetweenMissles = Random.Range(_MVRef.minMissleFireRate, _MVRef.maxMissleFireRate);
        _droneRange         = _MVRef.droneRange;
        _timeOfPreviousShot = 0f;
    }
 private void Awake()
 {
     _MV      = MissleValues.Instance;
     _missles = CreateList(_MV.prefab, _MV.poolSize);
 }