34#define ECM_EFFECT_DURATION 2.0
35#define ECM_PULSE_COUNT 4
36#define ECM_PULSE_INTERVAL (ECM_EFFECT_DURATION / (double)ECM_PULSE_COUNT)
38#define ECM_DEBUG_DRAW 0
54 else if ((
self = [super
init]))
62 [
self setStatus:STATUS_EFFECT];
63 [
self setScanClass:CLASS_NO_DRAW];
73 ShipEntity *ship = [_ship weakRefUnderlyingObject];
74 BOOL validShip = (ship !=
nil) && ([ship
status] != STATUS_DEAD);
83 NSArray *targets = [UNIVERSE findEntitiesMatchingPredicate:IsShipPredicate
87 NSUInteger i,
count = [targets count];
94 for (i = 0; i <
count; i++)
96 ShipEntity *target = [targets objectAtIndex:i];
97 ShipScriptEvent(context, target,
"shipHitByECM", ecmPulsesRemaining, whomVal);
111- (void) drawImmediate:(
bool)immediate translucent:(
bool)translucent
113#if ECM_DEBUG_DRAW && OO_DEBUG
128@implementation Entity (OOECMBlastEntity)
#define SCANNER_MAX_RANGE
void OODebugDrawPoint(Vector position, OOColor *color)
#define ECM_PULSE_INTERVAL
OOINLINE jsval OOJSValueFromNativeObject(JSContext *context, id object)
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)
#define ShipScriptEvent(context, ship, event,...)
uint_fast8_t _blastsRemaining
void reactToAIMessage:context:(NSString *message,[context] NSString *debugContext)