Пример #1
0
        public bool CheckForPlayer()
        {
            bool checkForPlayer = false;

            if (this.PhysicsContainer.Object.CheckForPlayerDiagonally(this.FacingRight, sightForPlayerDistance, sightForPlayerAngle))
            {
                this.StopMoving(); // find a better way to do this - set him Idle in the meantime ***
                checkForPlayer = true;
            }
            else if (this.PhysicsContainer.Object.CheckForPlayerDiagonally(this.FacingRight, sightForPlayerDistance, sightForPlayerAngle + sightForPlayerAngleOffset))
            {
                this.StopMoving(); // same as above ***
                checkForPlayer = true;
            }

            return(Vision.CheckForPlayer(checkForPlayer));
        }
Пример #2
0
 public bool CheckForPlayer()
 {
     return Vision.CheckForPlayer(this.PhysicsContainer.Object.CheckForPlayerHorizontally(this.FacingRight, sightForPlayerDistance));
 }