Ejemplo n.º 1
0
 private void SetBeeTargetedMovementDirection_OuterWorld(IBee bee, Rectangle environmentTargetDimmensions)
 {
     if (_beeCommon.BeeIsInOuterWorld(bee.BeeEnvironmentBehavior))
     {
         var beeLocationPoint    = new Point(bee.BeeInOuterWorldSize.X, bee.BeeInOuterWorldSize.Y);
         var targetLocationPoint = new Point(environmentTargetDimmensions.X, environmentTargetDimmensions.Y);
         bee.BeeOuterWorldMovementDirection = _beeCommon.GetSelectedMovement(bee.BeeEnvironmentBehavior, beeLocationPoint, targetLocationPoint);
     }
 }
Ejemplo n.º 2
0
        public IBee SetNextBeeWingMovementCycle(IBee bee, BeeEnvironmentEnum beeEnvironment)
        {
            var nextIndex = bee.BeeIndexWingAnimation + 1;

            if (nextIndex == _beeWingsMovementInvoker.GetTotalBeeAmimationWingFrames(beeEnvironment))
            {
                nextIndex = 0;
            }
            BeeWingMovementCycle nextBeeWingMovement = _beeWingsMovementInvoker.GetBeeSelectedWingAnimation(nextIndex, beeEnvironment);

            bee.BeeIndexWingAnimation = nextBeeWingMovement.BeeWingMovementIndex;
            if (_beeCommon.BeeIsIndoors(bee.BeeEnvironmentBehavior))
            {
                bee.BeeIndoorsWingAnimationImage = nextBeeWingMovement.BeeWingMovementImage;
            }
            if (_beeCommon.BeeIsInOuterWorld(bee.BeeEnvironmentBehavior))
            {
                bee.BeeOuterWorldWingAnimationImage = nextBeeWingMovement.BeeWingMovementImage;
            }
            return(bee);
        }