- Home /
What does this mean?
Hi all, so i am new to programming/c# and have been relying a lot on tutorials to learn. Currently I have come across some C# code that will help do what I trying to accomplish with my game. Example. I understand all but a few parts. Mainly this part in particular:
bool doubleRaycastDown(TerrainMovementRayProperties movementRay, float rayLength, out RaycastHit leftHitInfo, out RaycastHit rightHitInfo) {
How can a bool be something other than true or false? Currently I see it has movementRay so I guess that can be true/false but what about the float or the two outs for the RaycastHIt. What am I missing? Also would TerrainMovementRayProperties be a class with different properties about a Ray i need to set up?
UPDATE
so while waiting for mod to approve question i think i figured it out. bool doubleRaycastDown is a method that returns a bool but also takes in the parameters of (I think it is a class, possibly a enum? not sure) then a float then it also returns two raycasthit. Am I correct did I miss anything?
Answer by Cherno · Jun 04, 2015 at 02:36 PM
You are correct. It is indeed a method that takes varies values (called parameters), useses these to perform some calculations, and then returns a result, in this case a bool value (true/false).
Your answer
Follow this Question
Related Questions
Scavenger Hunt List Bools Question 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
GetComponent, set boolean to true but it willn't revert 3 Answers