private void BabyStartToCry()
    {
        print("Baby Cry");
        IsOn = true;

        _actionableObject.AddApplicableCharacter(player.PlayerType, this);
        StartCoroutine(nameof(TakePenalty));
    }
Exemple #2
0
    private void BecomeToilety()
    {
        print("Became Toilety");
        IsOn = true;

        _actionableObject.AddApplicableCharacter(player.PlayerType, this);
        StartCoroutine(nameof(TakePenalty));
    }
    private void FixedUpdate()
    {
        Vector2 position = _transform.position;

        if (!IsOn)
        {
            distance += Vector2.Distance(position, lastPosition);

            if (distance >= distanceToBeSmelly)
            {
                distance = 0;
                IsOn     = true;

                _actionableObject.AddApplicableCharacter(player.PlayerType, this);
                StartCoroutine(nameof(TakePenalty));
            }
        }
        lastPosition = position;
    }