anchor.diff:  										   entity_config = BcEntityConfig,
   										   entities = BcEntities,
   										   entity_event_handler = EventHandler} = State) ->
  +	%% TODO change entity orientation if neccesary
  +	EntitiesEventPid = bc_entities:event(BcEntities),
  +	gen_event:notify(EntitiesEventPid, {entity_attacking, BcEntity}),
   	UpdatedState =
   		case EventHandler of
   			undefined ->			
  
positive.code: 			_ ->
  				State
  		end,
  	Damage = calculate_damage(BcEntityConfig, 
  							  InRangeEnemyBcEntity, 
  							  BcEntityConfig),
  	%% TODO calculate attack speed and publish attacking event
  	{next_state, attacking, UpdatedState}.
  
  calculate_damage(BcEntityConfig, EnemyBcEntity, BcEntities) ->
  	EnemyEntityType = bc_entity:entity_type(EnemyBcEntity),
  	{ok, EnemyBcEntityConfig} = bc_entities:entity_config(EnemyEntityType),
  	10.
  
  dist_entities(#state{entity = BcEntity} = State) ->
  
negative.code: 			EntitiesEventPid = bc_entities:event(BcEntities),
  			gen_event:notify(EntitiesEventPid, {entity_moved, UpdatedBcEntity}),
  			MoveSpeed = bc_entity_config:move_speed(BcEntityConfig),
  			TimeRef = send_action_complete(MoveSpeed),
  			{next_state, moving, State#state{entity = UpdatedBcEntity,
  											 timer = TimerRef}};
  		{error, _} ->
  			sense(State)
  	end.
  
  send_action_complete(Speed) ->
  	DelayFloat = 1000 - (1000 * Speed),
  	DelayInt = erlang:trunc(DelayFloat),
  	gen_fsm:send_event_after(DelayInt, action_complete).
  
  move_entity(Direction, #state{entity = BcEntity, map = BcMap} = State) ->
  	OriginalBcCollision = bc_entity:to_collision(BcEntity),
  