Corgi Engine  v8.8
MoreMountains.CorgiEngine.AIShootOnSight Class Reference

Add this component to a CorgiController2D and it will try to kill your player on sight. More...

Inheritance diagram for MoreMountains.CorgiEngine.AIShootOnSight:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Attributes

float ShootDistance = 10f
 The maximum distance at which the AI can shoot at the player. More...
 
Vector2 RaycastOriginOffset = new Vector2(0,0)
 The offset to apply to the shoot origin point (by default the position of the object) More...
 
LayerMask TargetLayerMask = LayerManager.PlayerLayerMask
 The layers the agent will try to shoot at. More...
 

Protected Member Functions

virtual void Start ()
 on start we get our components More...
 
virtual void Update ()
 Every frame, check for the player and try and kill it More...
 

Protected Attributes

Vector2 _direction
 
Character _character
 
CharacterHandleWeapon _characterShoot
 
Vector2 _raycastOrigin
 
RaycastHit2D _raycast
 

Detailed Description

Add this component to a CorgiController2D and it will try to kill your player on sight.

Member Function Documentation

◆ Start()

virtual void MoreMountains.CorgiEngine.AIShootOnSight.Start ( )
protectedvirtual

on start we get our components

◆ Update()

virtual void MoreMountains.CorgiEngine.AIShootOnSight.Update ( )
protectedvirtual

Every frame, check for the player and try and kill it

Member Data Documentation

◆ _character

Character MoreMountains.CorgiEngine.AIShootOnSight._character
protected

◆ _characterShoot

CharacterHandleWeapon MoreMountains.CorgiEngine.AIShootOnSight._characterShoot
protected

◆ _direction

Vector2 MoreMountains.CorgiEngine.AIShootOnSight._direction
protected

◆ _raycast

RaycastHit2D MoreMountains.CorgiEngine.AIShootOnSight._raycast
protected

◆ _raycastOrigin

Vector2 MoreMountains.CorgiEngine.AIShootOnSight._raycastOrigin
protected

◆ RaycastOriginOffset

Vector2 MoreMountains.CorgiEngine.AIShootOnSight.RaycastOriginOffset = new Vector2(0,0)

The offset to apply to the shoot origin point (by default the position of the object)

◆ ShootDistance

float MoreMountains.CorgiEngine.AIShootOnSight.ShootDistance = 10f

The maximum distance at which the AI can shoot at the player.

◆ TargetLayerMask

LayerMask MoreMountains.CorgiEngine.AIShootOnSight.TargetLayerMask = LayerManager.PlayerLayerMask

The layers the agent will try to shoot at.


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