Object:defaultActionOnVisualContactWithPlayer(event)
Type: Function
Overview

Describes the default behavior of artificial intelligence on visual contact with the player.
Examples

Change default ai functionality on visual contact with the player
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"}) 
-- change default ai functionality on visual contact with the player 
function enemy:defaultActionOnVisualContactWithPlayer(event)
 print("I see you " .. event.other.type) -- will print debug text in output
end