Exemple #1
0
        public void Anim_SpawnPoop()
        {
            GameObject gameObject = Instantiate(_genericPoopComponent, _spawnSpot.position, Quaternion.identity);

            gameObject.GetComponent <GenericPoopComponent>().SetCurrentPoopScriptable(_currentPoop, _poopedBy);

            _currentPoop = null;
            _poopedBy    = null;
        }
Exemple #2
0
 public void TurnItIntoAPoop(PoopScriptable poopScriptable)
 {
     _canPickupItem = poopScriptable.CanPickupItem;
     _canPlant      = poopScriptable.CanPlant;
     _canTakeSeed   = poopScriptable.CanTakeSeed;
     _canTakePlant  = poopScriptable.CanTakePlant;
     _canEat        = poopScriptable.CanEat;
     _canAttack     = poopScriptable.CanAttack;
 }
Exemple #3
0
        private void ManageTheButHole()
        {
            if (_inputManager.PoopButton == 1 && !_isPooping && StomachItemList.Any(e => e.State == EnumStomachItemDTOState.ReadyToPoop) && _playerStructure.PoopAmout < _maximumAmoutOfPoop)
            {
                _movementMouseComponent.Animator_CantMove();
                _isPooping = true;
                List <StomachItemDTO> foodToPoopList = StomachItemList.Where(e => e.State == EnumStomachItemDTOState.ReadyToPoop).ToList();
                string currentFlowersRecipeInStomach = string.Join("-", foodToPoopList.Select(e => e.Item.GetHashCode()).OrderBy(e => e).ToList());

                _currentPoop = _poopList.FirstOrDefault(e => e.Recipe == currentFlowersRecipeInStomach);

                _animator.SetTrigger(_animatorVariables.Poop);

                List <Guid> foodToPoopIdList = foodToPoopList.Select(e => e.Id).ToList();

                StomachItemList.RemoveAll(e => foodToPoopIdList.Contains(e.Id));
                _stomachUIComponent.RemoveFoods(foodToPoopIdList);
                _playerStructure.PoopAmout++;
            }
        }
Exemple #4
0
        public void TurnItIntoAPoop(PoopScriptable poopScriptable, StomachComponent poopedBy)
        {
            // => Player Structure
            _poopedBy = poopedBy;
            _animator.runtimeAnimatorController = poopScriptable.PoopAnimator;
            _isMainPlayer          = false;
            _canMoveByClick        = poopScriptable.CanMoveByClick;
            _canInteract           = poopScriptable.CanInteract;
            _canPoop               = poopScriptable.CanPoop;
            _spriteForActiveStatus = poopScriptable.SpriteForActiveStatus;

            // => Interact Component
            this._interactableComponent.TurnItIntoAPoop(poopScriptable);

            // => DamageTakerOptions
            _damageTakerComponent.TurnItIntoAPoop(poopScriptable);

            // => DamageDealerOptions
            _damageDealerComponent.TurnItIntoAPoop(poopScriptable);

            this.StartCoroutine(StartDeathCooldown(poopScriptable.DeathCooldown));
        }
Exemple #5
0
 public void SetCurrentPoop(PoopScriptable currentPoop, StomachComponent poopedBy)
 {
     _currentPoop = currentPoop;
     _poopedBy    = poopedBy;
     _animator.SetTrigger(_animatorVariables.StartPoop);
 }
Exemple #6
0
 public void SetCurrentPoopScriptable(PoopScriptable poop, StomachComponent poopedBy)
 {
     _currentPoop = poop;
     _poopedBy    = poopedBy;
 }
 public void TurnItIntoAPoop(PoopScriptable poopScriptable)
 {
     _damage    = poopScriptable.Damage;
     _cdwDamage = poopScriptable.CdwDamage;
 }
 public void TurnItIntoAPoop(PoopScriptable poopScriptable)
 {
     _health     = poopScriptable.Health;
     _fullHealth = _health;
 }
Exemple #9
0
 public void Aniamtor_SetCurrentPoop()
 {
     this.GetComponentInChildren <ButtHoleComponent>().SetCurrentPoop(_currentPoop, this);
     _currentPoop = null;
 }