Exemplo n.º 1
0
        public override EGoalStatus Update(float inDeltaTime)
        {
            if (_currentStatus == EGoalStatus.InProgress)
            {
                if (_currentTarget == null ||
                    VectorFunctions.DistanceSquared(Owner.transform.position, _currentTarget.transform.position) > _params.LoseFollowRadiusSquared ||
                    _currentTargetSpeciesInterface.IsSpeciesCryInProgress(ECryType.Negative))
                {
                    _currentTarget = null;
                    _currentTargetSpeciesInterface = null;

                    _currentStatus = EGoalStatus.Failed;
                }
            }

            return(_currentStatus);
        }
Exemplo n.º 2
0
 private bool IsMatchingAnimalCallingYou(ISpeciesInterface species)
 {
     return(species.IsSpeciesCryInProgress(ECryType.Positive) &&
            species.GetCurrentSpeciesType() == _ownerSpeciesInterface.GetCurrentSpeciesType());
 }