Object:customActionOnAiCollisionWithPlayer(event)
Type: Function
Overview

Describes the custom behavior of artificial intelligence on сollision with the player, which will be added to the default (object:defaultActionOnAiCollisionWithPlayer(event)) functionality.
Examples

Add custom/additional ai functionality to the default functionality on collision with the player. For example, if necessary keep the basic functionality and add additional actions.
local newAI = require('classes.SimpleAI').newAI
-- enemy instance
local enemy = newAI({group = mainGroup, img = "snailWalk1.png", x = halfW-50, y = display.contentHeight-500, ai_type = "patrol"}) 
-- add custom/additional ai functionality to the default functionality on collision with the player 
function enemy:customActionOnAiCollisionWithPlayer(event)
 print("You can not escape from me " .. event.other.type) -- will print debug text in output
end