C# Class AIController

Inheritance: MonoBehaviour
Mostrar archivo Open project: mezosaurus/eae-project Class Usage Examples

Public Properties

Property Type Description
IsTaggedByTree bool
SkinType NPCSkinType
alertDecrement float
alertTexture GameObject
alerted bool
bopperAlertSounds AudioClip[]
bopperCuriousSounds AudioClip[]
bopperEaten AudioClip
bopperIdleSounds AudioClip[]
bopperPanicSounds AudioClip[]
detectLevel float
emptyAlert Texture2D
fullAlert Texture2D
grabbed bool
hearingAlertMultiplier float
hearingRadiusLevelMultiplier float
hippieAlertSounds AudioClip[]
hippieCuriousSounds AudioClip[]
hippieEaten AudioClip
hippieIdleSounds AudioClip[]
hippiePanicSounds AudioClip[]
hottieAlertSounds AudioClip[]
hottieCuriousSounds AudioClip[]
hottieEaten AudioClip
hottieIdleSounds AudioClip[]
hottiePanicSounds AudioClip[]
isCritterType bool
killSelf bool
lureCooldownSeconds float
lurePower float
lureTag string
lureTexture GameObject
lured bool
mowerAlertSounds AudioClip[]
mowerCuriousSounds AudioClip[]
mowerEaten AudioClip
mowerIdleSounds AudioClip[]
mowerPanicSounds AudioClip[]
mowing AudioClip
npcTag string
numPathStart int
numStationaryStart int
oldmanAlertSounds AudioClip[]
oldmanCuriousSounds AudioClip[]
oldmanEaten AudioClip
oldmanIdleSounds AudioClip[]
oldmanPanicSounds AudioClip[]
panicCooldownSeconds float
panicTexture GameObject
panicked bool
scared bool
scaredByAxeman bool
scaredCooldownSeconds float
scaredTexture GameObject
sightAlertMultiplier float
spawnTag string
speed float
visionAngleSize float
visionDistance float

Protected Properties

Property Type Description
alertLevel float
alertThreshold float
enteredMap bool
idleCounter float
idlePlayTime float
lastDirectionWasRight bool
lastLure Lure
luredTimeLeft float
marked bool
moveDir Vector2
movePath SubpathScript
nearWall bool
nextPath GameObject
npcDir Vector3
panicThreshold float
panickedPos Vector3
playAlert bool
playCurious bool
playIdle bool
player GameObject
playerInRange bool
previousAlertLevel float
scaredTimeLeft float
visionAngleOffset float
walkingKey string
xScale float

Public Methods

Method Description
OnDestroy ( ) : void
Start ( ) : void
abilityPlacedListener ( Message message ) : void
eatenListener ( Message message ) : void
getLastLure ( ) : Lure
grabbedListener ( Message message ) : void
lureEnterListener ( Message message ) : void
lureReleaseListener ( Message message ) : void
markedBountyListener ( Message message ) : void
releasedListener ( Message message ) : void
trapEnterListener ( Message message ) : void
trapReleaseListener ( Message message ) : void

Protected Methods

Method Description
NPCHandleSeeingPlayer ( ) : bool
NPCOnDestroy ( ) : void
OnCollisionEnter2D ( Collision2D collision ) : void
OnCollisionExit2D ( Collision2D collision ) : void
OnTriggerEnter2D ( Collider2D other ) : void
OnTriggerExit2D ( Collider2D other ) : void
OnTriggerStay2D ( Collider2D other ) : void
alert ( ) : void
avoid ( Vector3 currentNPCDirection ) : Vector3
broadcastAlertLevelChanged ( AlertLevelType type ) : void
checkForPlayer ( ) : bool
createTempGameObject ( Vector3 pos, Transform parent ) : GameObject
decrementAlertLevel ( ) : void
destroyNPC ( ) : void
determineDirectionChange ( Vector3 npcPosition, Vector3 newPosition ) : void
flipXScale ( bool right ) : void
getLeavingPath ( ) : GameObject
getNextPath ( ) : GameObject
getPlayer ( ) : GameObject
handleLured ( ) : bool
ignoreBorder ( bool ignore, Collider2D other ) : void
lure ( Vector3 lurePosition ) : void
panic ( ) : void
scare ( Vector3 scaredPosition ) : void
setAnimatorInteger ( int animation ) : void
setAnimatorInteger ( string key, int animation ) : void
setNPCDirection ( Vector3 direction ) : void
updateNPC ( ) : bool

Private Methods

Method Description
GetClosestPlayer ( Vector3 position ) : GameObject
increaseAlertLevel ( float sensitivity ) : void
testDirectionChange ( float biasTan, Vector3 low, Vector3 middle, Vector3 high ) : void

Method Details

NPCHandleSeeingPlayer() protected method

protected NPCHandleSeeingPlayer ( ) : bool
return bool

NPCOnDestroy() protected method

protected NPCOnDestroy ( ) : void
return void

OnCollisionEnter2D() protected method

protected OnCollisionEnter2D ( Collision2D collision ) : void
collision Collision2D
return void

OnCollisionExit2D() protected method

protected OnCollisionExit2D ( Collision2D collision ) : void
collision Collision2D
return void

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnTriggerEnter2D() protected method

protected OnTriggerEnter2D ( Collider2D other ) : void
other UnityEngine.Collider2D
return void

OnTriggerExit2D() protected method

protected OnTriggerExit2D ( Collider2D other ) : void
other UnityEngine.Collider2D
return void

OnTriggerStay2D() protected method

protected OnTriggerStay2D ( Collider2D other ) : void
other UnityEngine.Collider2D
return void

Start() public method

public Start ( ) : void
return void

abilityPlacedListener() public method

public abilityPlacedListener ( Message message ) : void
message Message
return void

alert() protected method

protected alert ( ) : void
return void

avoid() protected method

protected avoid ( Vector3 currentNPCDirection ) : Vector3
currentNPCDirection Vector3
return Vector3

broadcastAlertLevelChanged() protected method

protected broadcastAlertLevelChanged ( AlertLevelType type ) : void
type AlertLevelType
return void

checkForPlayer() protected method

protected checkForPlayer ( ) : bool
return bool

createTempGameObject() protected method

protected createTempGameObject ( Vector3 pos, Transform parent ) : GameObject
pos Vector3
parent Transform
return GameObject

decrementAlertLevel() protected method

protected decrementAlertLevel ( ) : void
return void

destroyNPC() protected method

protected destroyNPC ( ) : void
return void

determineDirectionChange() protected method

protected determineDirectionChange ( Vector3 npcPosition, Vector3 newPosition ) : void
npcPosition Vector3
newPosition Vector3
return void

eatenListener() public method

public eatenListener ( Message message ) : void
message Message
return void

flipXScale() protected method

protected flipXScale ( bool right ) : void
right bool
return void

getLastLure() public method

public getLastLure ( ) : Lure
return Lure

getLeavingPath() protected method

protected getLeavingPath ( ) : GameObject
return GameObject

getNextPath() protected method

protected getNextPath ( ) : GameObject
return GameObject

getPlayer() protected method

protected getPlayer ( ) : GameObject
return GameObject

grabbedListener() public method

public grabbedListener ( Message message ) : void
message Message
return void

handleLured() protected method

protected handleLured ( ) : bool
return bool

ignoreBorder() protected method

protected ignoreBorder ( bool ignore, Collider2D other ) : void
ignore bool
other Collider2D
return void

lure() protected method

protected lure ( Vector3 lurePosition ) : void
lurePosition Vector3
return void

lureEnterListener() public method

public lureEnterListener ( Message message ) : void
message Message
return void

lureReleaseListener() public method

public lureReleaseListener ( Message message ) : void
message Message
return void

markedBountyListener() public method

public markedBountyListener ( Message message ) : void
message Message
return void

panic() protected method

protected panic ( ) : void
return void

releasedListener() public method

public releasedListener ( Message message ) : void
message Message
return void

scare() protected method

protected scare ( Vector3 scaredPosition ) : void
scaredPosition Vector3
return void

setAnimatorInteger() protected method

protected setAnimatorInteger ( int animation ) : void
animation int
return void

setAnimatorInteger() protected method

protected setAnimatorInteger ( string key, int animation ) : void
key string
animation int
return void

setNPCDirection() protected method

protected setNPCDirection ( Vector3 direction ) : void
direction Vector3
return void

trapEnterListener() public method

public trapEnterListener ( Message message ) : void
message Message
return void

trapReleaseListener() public method

public trapReleaseListener ( Message message ) : void
message Message
return void

updateNPC() protected method

protected updateNPC ( ) : bool
return bool

Property Details

IsTaggedByTree public_oe property

public bool IsTaggedByTree
return bool

SkinType public_oe property

public NPCSkinType SkinType
return NPCSkinType

alertDecrement public_oe property

public float alertDecrement
return float

alertLevel protected_oe property

protected float alertLevel
return float

alertTexture public_oe property

public GameObject alertTexture
return GameObject

alertThreshold protected_oe property

protected float alertThreshold
return float

alerted public_oe property

public bool alerted
return bool

bopperAlertSounds public_oe property

public AudioClip[] bopperAlertSounds
return AudioClip[]

bopperCuriousSounds public_oe property

public AudioClip[] bopperCuriousSounds
return AudioClip[]

bopperEaten public_oe property

public AudioClip bopperEaten
return AudioClip

bopperIdleSounds public_oe property

public AudioClip[] bopperIdleSounds
return AudioClip[]

bopperPanicSounds public_oe property

public AudioClip[] bopperPanicSounds
return AudioClip[]

detectLevel public_oe property

public float detectLevel
return float

emptyAlert public_oe property

public Texture2D emptyAlert
return Texture2D

enteredMap protected_oe property

protected bool enteredMap
return bool

fullAlert public_oe property

public Texture2D fullAlert
return Texture2D

grabbed public_oe property

public bool grabbed
return bool

hearingAlertMultiplier public_oe property

public float hearingAlertMultiplier
return float

hearingRadiusLevelMultiplier public_oe property

public float hearingRadiusLevelMultiplier
return float

hippieAlertSounds public_oe property

public AudioClip[] hippieAlertSounds
return AudioClip[]

hippieCuriousSounds public_oe property

public AudioClip[] hippieCuriousSounds
return AudioClip[]

hippieEaten public_oe property

public AudioClip hippieEaten
return AudioClip

hippieIdleSounds public_oe property

public AudioClip[] hippieIdleSounds
return AudioClip[]

hippiePanicSounds public_oe property

public AudioClip[] hippiePanicSounds
return AudioClip[]

hottieAlertSounds public_oe property

public AudioClip[] hottieAlertSounds
return AudioClip[]

hottieCuriousSounds public_oe property

public AudioClip[] hottieCuriousSounds
return AudioClip[]

hottieEaten public_oe property

public AudioClip hottieEaten
return AudioClip

hottieIdleSounds public_oe property

public AudioClip[] hottieIdleSounds
return AudioClip[]

hottiePanicSounds public_oe property

public AudioClip[] hottiePanicSounds
return AudioClip[]

idleCounter protected_oe property

protected float idleCounter
return float

idlePlayTime protected_oe property

protected float idlePlayTime
return float

isCritterType public_oe property

public bool isCritterType
return bool

killSelf public_oe property

public bool killSelf
return bool

lastDirectionWasRight protected_oe property

protected bool lastDirectionWasRight
return bool

lastLure protected_oe property

protected Lure lastLure
return Lure

lureCooldownSeconds public_oe property

public float lureCooldownSeconds
return float

lurePower public_oe property

public float lurePower
return float

lureTag public_oe property

public string lureTag
return string

lureTexture public_oe property

public GameObject lureTexture
return GameObject

lured public_oe property

public bool lured
return bool

luredTimeLeft protected_oe property

protected float luredTimeLeft
return float

marked protected_oe property

protected bool marked
return bool

moveDir protected_oe property

protected Vector2 moveDir
return Vector2

movePath protected_oe property

protected SubpathScript movePath
return SubpathScript

mowerAlertSounds public_oe property

public AudioClip[] mowerAlertSounds
return AudioClip[]

mowerCuriousSounds public_oe property

public AudioClip[] mowerCuriousSounds
return AudioClip[]

mowerEaten public_oe property

public AudioClip mowerEaten
return AudioClip

mowerIdleSounds public_oe property

public AudioClip[] mowerIdleSounds
return AudioClip[]

mowerPanicSounds public_oe property

public AudioClip[] mowerPanicSounds
return AudioClip[]

mowing public_oe property

public AudioClip mowing
return AudioClip

nearWall protected_oe property

protected bool nearWall
return bool

nextPath protected_oe property

protected GameObject nextPath
return GameObject

npcDir protected_oe property

protected Vector3 npcDir
return Vector3

npcTag public_oe property

public string npcTag
return string

numPathStart public_oe property

public int numPathStart
return int

numStationaryStart public_oe property

public int numStationaryStart
return int

oldmanAlertSounds public_oe property

public AudioClip[] oldmanAlertSounds
return AudioClip[]

oldmanCuriousSounds public_oe property

public AudioClip[] oldmanCuriousSounds
return AudioClip[]

oldmanEaten public_oe property

public AudioClip oldmanEaten
return AudioClip

oldmanIdleSounds public_oe property

public AudioClip[] oldmanIdleSounds
return AudioClip[]

oldmanPanicSounds public_oe property

public AudioClip[] oldmanPanicSounds
return AudioClip[]

panicCooldownSeconds public_oe property

public float panicCooldownSeconds
return float

panicTexture public_oe property

public GameObject panicTexture
return GameObject

panicThreshold protected_oe property

protected float panicThreshold
return float

panicked public_oe property

public bool panicked
return bool

panickedPos protected_oe property

protected Vector3 panickedPos
return Vector3

playAlert protected_oe property

protected bool playAlert
return bool

playCurious protected_oe property

protected bool playCurious
return bool

playIdle protected_oe property

protected bool playIdle
return bool

player protected_oe property

protected GameObject player
return GameObject

playerInRange protected_oe property

protected bool playerInRange
return bool

previousAlertLevel protected_oe property

protected float previousAlertLevel
return float

scared public_oe property

public bool scared
return bool

scaredByAxeman public_oe property

public bool scaredByAxeman
return bool

scaredCooldownSeconds public_oe property

public float scaredCooldownSeconds
return float

scaredTexture public_oe property

public GameObject scaredTexture
return GameObject

scaredTimeLeft protected_oe property

protected float scaredTimeLeft
return float

sightAlertMultiplier public_oe property

public float sightAlertMultiplier
return float

spawnTag public_oe property

public string spawnTag
return string

speed public_oe property

public float speed
return float

visionAngleOffset protected_oe property

protected float visionAngleOffset
return float

visionAngleSize public_oe property

public float visionAngleSize
return float

visionDistance public_oe property

public float visionDistance
return float

walkingKey protected_oe property

protected string walkingKey
return string

xScale protected_oe property

protected float xScale
return float