Class: Zyps::CollisionCondition

Inherits:
Condition show all
Defined in:
lib/zyps/conditions.rb

Overview

True only if collided with target.

Instance Method Summary collapse

Methods inherited from Condition

#copy

Instance Method Details

#select(actor, targets) ⇒ Object

Returns an array of targets that have collided with the actor.



69
70
71
# File 'lib/zyps/conditions.rb', line 69

def select(actor, targets)
	targets.find_all {|target| Utility.collided?(actor, target)}
end