private void Start() { _coll = GetComponent <CollisionHandler>(); _rb = GetComponent <Rigidbody2D>(); _anim = GetComponent <AnimationHandler>(); _anim = GetComponentInChildren <AnimationHandler>(); _vfx = GetComponent <VfxHandler>(); _ghost = GetComponent <GhostEffect>(); _healthManager = GetComponent <HealthManager>(); _attackManager = GetComponent <CharacterAttackManager>(); _capsuleCollider = GetComponent <CapsuleCollider2D>(); _input = GetComponent <IInputController>(); _gameManager = GameManager.Instance; _coll.OnGrounded += ResetIsJumping; _coll.OnWalled += ResetIsJumping; _groundTouch = true; _canStillJump = true; _wasOnWall = false; _side = 1; _capsuleOffset = _capsuleCollider.offset; _capsuleSize = _capsuleCollider.size; if (_showDebug) { CursedDebugger.Instance.Add("State", () => _state.ToString()); } }
private void Awake() { _anim = GetComponentInChildren <AnimationHandler>(); _move = GetComponent <CharacterMovement>(); _stats = GetComponent <CharacterStats>(); _coll = GetComponent <CollisionHandler>(); _weaponInv = GetComponent <WeaponInventory>(); _input = GetComponent <IInputController>(); //_contrVib = GetComponent<ControllerVibration>(); _coll.OnGrounded += () => _isDiveKicking = false; }