private void receiveSSCompleted(MessageEngineSSCompletedCommand msg) { if (_runState == TickEngineRunState.RunningMax) { _numberOfIncompleteSS--; if (_numberOfIncompleteSS <= 0) { _numberOfIncompleteSS = _subscribedActorSolarSystems.Count(); receiveTick(null); } } }
public ActorSolarSystem(IActorRef actorEngine, IActorRef actorTextOutput, SolarSystem ss) { _actorEngine = actorEngine; _actorTextOutput = actorTextOutput; ss.Actor = Self; _solarSystemC = new SolarSystemController(ss, this, actorTextOutput); _tickCompleteCmd = new MessageEngineSSCompletedCommand(_solarSystemC.SolarSystemId); setupChildAgentActors(ss); Receive <MessageTick>(msg => receiveTick(msg)); Receive <MessageShipCommand>(msg => receiveCommandForShip(msg)); Receive <MessageMarketCommand>(msg => receiveCommandForMarket(msg)); Receive <MessageEngineAgCompletedCommand>(msg => receiveAgentCompletedMessage(msg)); //_actorTextOutput.Tell("Solar System initialised : " + _solarSystem.Name); }