Exemple #1
0
        /// <summary>
        /// Portends a <see cref="FutureFish"/>.
        /// </summary>
        /// <remarks>
        /// TODO: Should this be named "Fishsee"? Or is that too vague?
        /// </remarks>
        /// <param name="spawnBenthicPosition"></param>
        /// <returns></returns>
        private FutureFish ForeseeFish(Spacey.IBenthic spawnBenthicPosition)
        {
            var fishToSpawn = PickPossiblyDangerousFish(spawnBenthicPosition);

            // fish have a different size as a motivation to go deep

            var newFish = new FutureFish(
                fishToSpawn,
                spawnBenthicPosition,
                Random.Range(FishtrobutionDistanceFromGround.x, FishtrobutionDistanceFromGround.y),
                GetRandomFishSpawnRotation(),
                fishToSpawn.SetScaleByDepth(spawnBenthicPosition)
                );

            GenerateFishTicket();

            return(newFish);
        }
Exemple #2
0
 private bool ShouldActivateFish(FutureFish fish)
 {
     return(!fish.Activated && IsCloseAhead(fish) && !IsFarBehind(fish));
 }