PhysicsEntity: added a hit-reporting mechanism (for bullet animations)
This commit is contained in:
parent
47b2e741d8
commit
f80337e1a5
2 changed files with 7 additions and 0 deletions
|
@ -62,6 +62,10 @@ PhysicsEntity = Class{
|
|||
Entity.delete(self)
|
||||
end;
|
||||
|
||||
-- Reimplement
|
||||
wasHit = function(self)
|
||||
end;
|
||||
|
||||
|
||||
-- Apply linear impulse with given direction and power
|
||||
punch = function(self, angle, power)
|
||||
|
|
|
@ -153,6 +153,9 @@ function begin_contact(a, b, coll)
|
|||
bObj:setPowerUpMode(ChaingunMode())
|
||||
coll:setEnabled(false)
|
||||
else
|
||||
aObj:wasHit()
|
||||
bObj:wasHit()
|
||||
|
||||
local plane = nil
|
||||
local other = nil
|
||||
if aObj:isinstance(Plane) then
|
||||
|
|
Loading…
Reference in a new issue