Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
PatrolZone Class Reference

Detailed Description

Script for a zone which entities that inherit from BaseEntityController will patrol until a player is in range. Also used by Geb and his rock golems to stay within the bossroom.

Documentation updated 8/26/2024

Author
Roy Pascual

Public Member Functions

Vector2 LeftPoint ()
 Returns the position of the left end of the patrol zone.
 
Vector2 RightPoint ()
 Returns the position of the right end of the patrol zone.
 

Private Member Functions

void OnDrawGizmos ()
 Shows icons for the left and right ends in the Unity Editor scene view. This allows developers to see where these points are so they can be easily adjusted.
 
void Awake ()
 Sets the left and right ends and sets their references so their positions can be accessed later.
 

Private Attributes

Transform leftEnd
 
Transform rightEnd
 

Member Function Documentation

◆ Awake()

void PatrolZone.Awake ( )
private

Sets the left and right ends and sets their references so their positions can be accessed later.

◆ LeftPoint()

Vector2 PatrolZone.LeftPoint ( )

Returns the position of the left end of the patrol zone.

◆ OnDrawGizmos()

void PatrolZone.OnDrawGizmos ( )
private

Shows icons for the left and right ends in the Unity Editor scene view. This allows developers to see where these points are so they can be easily adjusted.

Important
Must be commented out or removed to export the game. Otherwise, Unity will throw compiler errors.

◆ RightPoint()

Vector2 PatrolZone.RightPoint ( )

Returns the position of the right end of the patrol zone.

Member Data Documentation

◆ leftEnd

Transform PatrolZone.leftEnd
private

Reference to a point representing the left end of the patrol zone. The entity will go back and forth between this point and rightEnd while patrolling.

◆ rightEnd

Transform PatrolZone.rightEnd
private

Reference to a point representing the right end of the patrol zone. The entity will go back and forth between this point and leftEnd while patrolling.


The documentation for this class was generated from the following file: