コード例 #1
0
        protected override void SetInitialValues()
        {
            _playerState            = GameObject.FindObjectOfType <PlayerStateManager>();
            _colliderToStopMovement = this.GetComponentInChildren <MovementMouseCollider>();
            _animator          = this.GetComponent <Animator>();
            _animatorVariables = new DamageTakerAnimatorVariables();
            _lifeBarComponent  = GameObject.FindObjectsOfType <LifeBarComponent>().FirstOrDefault(e => e.IsBoss == _isBoss);

            if (_isGround)
            {
                _tileMapComponentList = this.GetComponentsInChildren <TileMapComponnent>();
            }

            _fullHealth          = _health;
            _instanceIdEnemyList = new List <int>();
        }
コード例 #2
0
        private void ManageTheStopCollision(Collider2D collision)
        {
            if (_instaceIdToCollider is null)
            {
                return;
            }

            MovementMouseCollider movementMouseCollider = collision.gameObject.GetComponent <MovementMouseCollider>();

            if (movementMouseCollider is null)
            {
                return;
            }
            if (movementMouseCollider.GetInstanceID() == _instaceIdToCollider.Value)
            {
                _instaceIdToCollider = null;
            }
        }