C# Class BatBehavior, Demonology

Inheritance: EnemyBehavior
Show file Open project: Qlevine20/Demonology Class Usage Examples

Public Properties

Property Type Description
DeathSound UnityEngine.AudioClip
PlayerFoundSound UnityEngine.AudioClip
Poof GameObject
locs Vector2[]
mobFacingRight bool
respawn bool
speed float
targetRange float

Protected Properties

Property Type Description
ArrayDir int
Pos int
startScale Vector3

Public Methods

Method Description
DistanceBetween ( Vector2 pos1, Vector2 pos2 ) : float
Flip ( ) : void
MoveBetweenPoints ( Vector2 p ) : bool
OnCollisionEnter2D ( Collision2D other ) : void
OnDeath ( ) : void
OnDrawGizmos ( ) : void
OnRespawn ( ) : void
OnTriggerEnter2D ( Collider2D other ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
SmartMove ( Vector3 oldPos, Vector3 moveToPos, float moveDist ) : void

Method Details

DistanceBetween() public method

public DistanceBetween ( Vector2 pos1, Vector2 pos2 ) : float
pos1 Vector2
pos2 Vector2
return float

Flip() public method

public Flip ( ) : void
return void

MoveBetweenPoints() public method

public MoveBetweenPoints ( Vector2 p ) : bool
p Vector2
return bool

OnCollisionEnter2D() public method

public OnCollisionEnter2D ( Collision2D other ) : void
other Collision2D
return void

OnDeath() public method

public OnDeath ( ) : void
return void

OnDrawGizmos() public method

public OnDrawGizmos ( ) : void
return void

OnRespawn() public method

public OnRespawn ( ) : void
return void

OnTriggerEnter2D() public method

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

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

ArrayDir protected property

protected int ArrayDir
return int

DeathSound public property

public AudioClip,UnityEngine DeathSound
return UnityEngine.AudioClip

PlayerFoundSound public property

public AudioClip,UnityEngine PlayerFoundSound
return UnityEngine.AudioClip

Poof public property

public GameObject Poof
return GameObject

Pos protected property

protected int Pos
return int

locs public property

public Vector2[] locs
return Vector2[]

mobFacingRight public property

public bool mobFacingRight
return bool

respawn public property

public bool respawn
return bool

speed public property

public float speed
return float

startScale protected property

protected Vector3 startScale
return Vector3

targetRange public property

public float targetRange
return float