Exemple #1
0
    private void Awake()
    {
        _source = GetComponentInChildren <AudioSource>();

        _vfxController = FindObjectOfType <VFXControllerComponent>();
        _sFXController = FindObjectOfType <SFXControllerComponent>();
    }
    protected override void Awake()
    {
        base.Awake();

        _cameraController = FindObjectOfType <CameraControllerComponent>();
        _vfxController    = FindObjectOfType <VFXControllerComponent>();
        _sfxController    = FindObjectOfType <SFXControllerComponent>();

        enabled = false;
    }
    protected override void Awake()
    {
        //Initiliaze projectil pool
        PoolSystem.InitiliazePool(_projectilPrefab, null, 1);

        //Get controller components from scene
        _vfxController          = FindObjectOfType <VFXControllerComponent>();
        _cameraController       = FindObjectOfType <CameraControllerComponent>();
        _weaponHolderController = FindObjectOfType <WeaponHolderComponent>();

        //Get the player transform from the root of this object
        _playerForward = transform.root;

        //Stop update method
        enabled = false;

        base.Awake();
    }