public BeamApplication(BeamGameNet bgn, IBeamFrontend fe) { gameNet = bgn; gameNet.SetClient(this); frontend = fe; Logger = UniLogger.GetLogger("BeamBackendInstance"); modeMgr = new ModeManager(new BeamModeFactory(), this); }
public BeamCliModeHelper(IBeamFrontend _fe) { fe = _fe; _modeFuncs = new Dictionary <int, ModeFuncs>() { { BeamModeFactory.kSplash, new SplashModeFuncs() }, { BeamModeFactory.kPlay, new PlayModeFuncs() }, { BeamModeFactory.kPractice, new PracticeModeFuncs() } }; }
protected Dictionary <int, BeamPlace> _reportedTimedOutPlaces; // places that have been reported as timed out, but not removed yet public BeamCoreState(IBeamFrontend fep) { Logger = UniLogger.GetLogger("GameState"); Players = new Dictionary <string, BeamPlayer>(); Bikes = new Dictionary <string, IBike>(); Ground = new Ground(); InitPlaces(); _bikeIdsToRemoveAfterLoop = new List <string>(); }
public BeamAppCore(IBeamFrontend fep) { logger = UniLogger.GetLogger("GameInstance"); frontend = fep; CoreData = new BeamCoreState(frontend); OnNewCoreState(); commandHandlers = new Dictionary <string, Action <BeamMessage> >() { [BeamMessage.kNewPlayer] = (msg) => OnNewPlayerCmd(msg as NewPlayerMsg), [BeamMessage.kPlayerLeft] = (msg) => OnPlayerLeftCmd(msg as PlayerLeftMsg), [BeamMessage.kBikeCreateData] = (msg) => this.OnCreateBikeCmd(msg as BikeCreateDataMsg), [BeamMessage.kRemoveBikeMsg] = (msg) => this.OnRemoveBikeCmd(msg as RemoveBikeMsg), [BeamMessage.kBikeTurnMsg] = (msg) => this.OnBikeTurnCmd(msg as BikeTurnMsg), [BeamMessage.kBikeCommandMsg] = (msg) => this.OnBikeCommandCmd(msg as BikeCommandMsg), [BeamMessage.kPlaceClaimMsg] = (msg) => this.OnPlaceClaimCmd(msg as PlaceClaimMsg), [BeamMessage.kPlaceHitMsg] = (msg) => this.OnPlaceHitCmd(msg as PlaceHitMsg), [BeamMessage.kPlaceRemovedMsg] = (msg) => this.OnPlaceRemovedCmd(msg as PlaceRemovedMsg), }; }