Created
April 8, 2017 19:42
-
-
Save PoetaKodu/0d8c4a079debbff32bdb921cb8453943 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////// | |
bool CSightSense::SetSightDistance(const float & sightDistance) | |
{ | |
/* Musimy zapobiedz ustawieniu ujemnego zasiegu wzroku. */ | |
if (sightDistance > 0) | |
{ | |
m_sightDistance = sightDistance; | |
return true; | |
} | |
return false; | |
} | |
//////////////////////////////////////////////// | |
bool CSightSense::SetSightAngle(const float & sightAngle) | |
{ | |
/* Musimy zapobiedz ustawieniu ujemnego kata widzenia lub kata > 180. | |
Przy kacie 180 stopni postac widzi 180 st. w lewo i 180st w prawo, | |
wiec obejmuje to caly obszar naokolo niego. | |
*/ | |
if (sightAngle > 0 && sightAngle <= 180) | |
{ | |
m_sightAngle = sightAngle; | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment