/// <summary> /// Initializes a new instance of the <see cref="AMortalItemData" /> class. /// </summary> /// <param name="item">The item.</param> /// <param name="owner">The owner.</param> /// <param name="maxHitPts">The maximum hit points.</param> /// <param name="passiveCMs">The item's passive Countermeasures.</param> public AMortalItemData(IMortalItem item, Player owner, float maxHitPts, IEnumerable<PassiveCountermeasure> passiveCMs) : base(item, owner) { Initialize(passiveCMs); MaxHitPoints = maxHitPts; CurrentHitPoints = maxHitPts; }
public MortalDetectionHandler(IMortalItem item) : base(item) { Subscribe(); }
private void OnDeath(IMortalItem item) { _gameMgr.GetPlayerKnowledge(item.Owner).OnItemDeath(item);// FIXME player is wrong }
void ExecutePatrolOrder_UponFsmTgtDeath(IMortalItem deadFsmTgt) { LogEvent(); if (_fsmTgt != deadFsmTgt) { D.Error("{0}.target {1} is not dead target {2}.", DebugName, _fsmTgt.DebugName, deadFsmTgt.DebugName); } // TODO Communicate failure to boss? IPatrollable patrollableTgt = _fsmTgt as IPatrollable; StationaryLocation assumeFormationTgt = GameUtility.GetClosest(Position, patrollableTgt.LocalAssemblyStations); CurrentOrder = new FleetOrder(FleetDirective.AssumeFormation, OrderSource.CmdStaff, assumeFormationTgt); }