/// <summary> /// Gets and stores components for further use /// </summary> protected virtual void Initialization() { _character = GetComponent <Character>(); _controller = GetComponent <CoreController>(); _characterBasicMovement = GetComponent <CharacterHorizontalMovement>(); //_characterGravity = GetComponent<CharacterGravity> (); _spriteRenderer = GetComponent <SpriteRenderer>(); //_health = GetComponent<Health> (); _animator = _character._animator; //_sceneCamera = _character.SceneCamera; _inputManager = _character.LinkedInputManager; _state = _character.CharacterState; _movement = _character.MovementState; _condition = _character.ConditionState; _abilityInitialized = true; if (_animator != null) { InitializeAnimatorParameters(); } if (_character._userProfiler != null) { _userProfiler = _character._userProfiler; } }
public virtual void getProfiler() { if (gameObject.name != "Sancar(Clone)") { _userProfiler = null; return; } if (_userProfiler == null) { GameObject profiler = GameObject.Find("GameManager"); if (profiler != null) { _userProfiler = profiler.GetComponent <userProfiler>(); } else { Debug.Log("WARNING: User Profiler Not Found"); } } }