示例#1
0
 public ShipController(Ship s, SolarSystemController ssc, IActorRef actorTextOutput)
 {
     _model           = s;
     _solarSystemC    = ssc;
     _actorTextOutput = actorTextOutput;
     _destination     = _model.SolarSystem.Planets.Where(x => x.StarChartId == _model.DestinationScId).FirstOrDefault();
 }
示例#2
0
 public ShipController(Ship s, SolarSystemController ssc, IActorRef actorTextOutput)
 {
     _model = s;
     _solarSystemC = ssc;
     _actorTextOutput = actorTextOutput;
     _destination = _model.SolarSystem.Planets.Where(x => x.StarChartId == _model.DestinationScId).FirstOrDefault();
 }
示例#3
0
        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);

            setupChildMarketActors(ss);
            setupChildAgentActors(ss);

            Receive<MessageTick>(msg => receiveTick(msg));
            Receive<MessageShipCommand>(msg => receiveCommandForShip(msg));
            Receive<MessageEngineAgCompletedCommand>(msg => receiveAgentCompletedMessage(msg));

            //_actorTextOutput.Tell("Solar System initialised : " + _solarSystem.Name);
        }