Example #1
0
        public void Initialize()
        {
            _rigidbody        = GetComponent <Rigidbody>();
            _playerController = GetComponent <PlayerController>();
            _controller       = GetComponent <RigidbodyFirstPersonController>();

            _playerController.Initialize();
        }
        public bool Initialize()
        {
            if (playerData == null)
            {
                return(false);
            }

            _manaRefreshTimer = 0f;

            _transform      = GetComponent <Transform>();
            _rigidBody      = GetComponent <Rigidbody>();
            _playerMovement = GetComponent <PlayerController>();
            _spellSystem    = GetComponent <SpellSystem>();

            InitPlayerStats();
            var init = _playerMovement.Initialize() && _spellSystem.Initialize();

            return(init);
        }