2
* This file is part of the dis-Emi-A HaXe Library. Copyright (c) edA-qa mort-ora-y
3
* For full copyright and license information please refer to doc/license.txt.
13
* Combines the IMCombined and the main game logic for collision
15
class InnerMonster extends GameObject
17
var container : IMCombined;
19
public function new( game : Game, sprite : InnerMonsterSprite )
21
container = new IMCombined( game.global, sprite );
25
game.corePanel.addActor( container );
26
game.corePanel.sizeActor( container, game.global.surfaceSize.promoteF() );
28
container.place( Point2.at( game.surface.width / 2, game.surface.height / 2 ) );
30
oc = new flashx.ObjectCollider( flash.Lib.current.stage );
33
override function destroy()
36
game.corePanel.removeActor( container );
39
var oc : flashx.ObjectCollider;
42
//determine if we are okay, either using the simple mode, or the complex mode
43
if( game.innerMonsterOverlap )
44
return game.surface.isCovered(container.sAt.floorDemote());
48
return oc.aContainsB( game.corePanel.surfaceBitmap, container.sprite.getActor() )
49
&& game.surface.isValid( container.sAt.floorDemote() );
53
override function _stepTime( elapsed : Float )
55
container.doStepTime( elapsed, posOkay );
58
override public function getCorePanelCollisionObject( ) : flash.display.DisplayObject