Skip to content

Commit

Permalink
dont add behaviours to nil units, and use shard_include in behaviour …
Browse files Browse the repository at this point in the history
…factory
  • Loading branch information
tomjn committed Nov 28, 2015
1 parent 8a6889a commit b448646
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data/ai/behaviourfactory.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
require "behaviour"
shard_include( "behaviour" )
BehaviourFactory = class(AIBase)

require "behaviours"
shard_include( "behaviours" )
function BehaviourFactory:Init()
--
end

function BehaviourFactory:AddBehaviours(unit)
if unit == nil then
return
end
-- add behaviours here
-- unit:AddBehaviour(behaviour)
local b = behaviours[unit:Internal():Name()]
Expand Down

0 comments on commit b448646

Please sign in to comment.