public ApianVoteMachine(long timeoutMs, long cleanupMs, UniLogger logger = null) { TimeoutMs = timeoutMs; CleanupMs = cleanupMs; Logger = logger ?? UniLogger.GetLogger("ApianVoteMachine"); _voteDict = new Dictionary <T, VoteData>(); }
// Start is called before the first frame update public BeamCliFrontend(BeamUserSettings startupSettings) { _feModeHelper = new BeamCliModeHelper(this); feBikes = new Dictionary <string, FrontendBike>(); userSettings = startupSettings; logger = UniLogger.GetLogger("Frontend"); }
private int MaxSyncCmdsPerUpdate; // public ServerOnlyData(ApianBase apInst, Dictionary <string, string> config) { Logger = UniLogger.GetLogger("ApianGroup"); // re-use same logger (put class name in msgs) ApianInst = apInst; syncingPeers = new Dictionary <string, SyncingPeerData>(); _LoadConfig(config); }
public virtual void Setup(IBike beBike, IBeamApplication appl, IBeamAppCore core) { Logger = UniLogger.GetLogger("Frontend"); // use the FE logger appCore = core; bb = beBike; CreateControl(); control.Setup(appl, core, beBike); }
// // IAppMode // public void Setup(AppModeManager mgr, IModalApp gInst = null) { // Called by manager before Start() // Not virtual manager = mgr; appl = gInst as AceApplication; logger = UniLogger.GetLogger("AceCoreMode"); }
public BeamApplication(BeamGameNet bgn, IBeamFrontend fe) { gameNet = bgn; gameNet.SetClient(this); frontend = fe; Logger = UniLogger.GetLogger("BeamBackendInstance"); modeMgr = new ModeManager(new BeamModeFactory(), this); }
protected void Init(AceUserSettings settings) { Logger = UniLogger.GetLogger("CliDriver"); fe = new AceCliFrontend(settings); gn = new AceGameNet(); appl = new AceApplication(gn, fe); appl.Start(settings.startMode); }
void Start() // Monobehavior start { logger = UniLogger.GetLogger("GameCamera"); feMain = BeamMain.GetInstance(); _thisCamera = (Camera)GetComponent("Camera"); ModeNormal mode = (ModeNormal)SetMode(CamModeID.kNormal); mode.init(this); }
public void Setup(AppModeManager mgr, IModalApp gInst = null) { // Called by manager before Start() // Not virtual // TODO: this should be the engine and not the modeMgr - but what IS an engine... manager = mgr; appl = gInst as AceApplication; logger = UniLogger.GetLogger("AceGameMode"); }
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>(); }
// Start is called before the first frame update void Start() { userSettings = UserSettingsMgr.Load(kSettingsFileBaseName); //userSettings = BeamUserSettings.CreateDefault(); userSettings.localPlayerCtrlType = BikeFactory.LocalPlayerCtrl; // Kinda hackly mainObj = BeamMain.GetInstance(); _feModeHelper = new BeamFeModeHelper(mainObj); feBikes = new Dictionary <string, GameObject>(); logger = UniLogger.GetLogger("Frontend"); }
void UpdateValues() { foreach (LevelEntry le in levelEntries) { if ((le.LoggerName.Length > 0)) { UniLogger.GetLogger(le.LoggerName).LogLevel = le.level; UniLogger.GetLogger(le.LoggerName).ThrowOnError = throwOnError; } } }
public AceApplication(AceGameNet agn, IAceFrontend fe) { Logger = UniLogger.GetLogger("AceApplication"); Logger.Verbose($"Ctor: AceApplication({agn}, {fe})"); aceGameNet = agn; aceGameNet.AddClient(this); frontend = fe; appModeMgr = new FsmModeManager(new AceModeFactory(), this); frontend.SetAceApplication(this); }
public static string GetPath(string leafFolder) { #if UNITY_2019_1_OR_NEWER string homePath = Application.persistentDataPath; #else string homePath = (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX) ? Environment.GetEnvironmentVariable("HOME") : Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%"); #endif UniLogger.GetLogger("UserSettings").Info($"User settings path: {homePath + Path.DirectorySeparatorChar + leafFolder}"); return(homePath + Path.DirectorySeparatorChar + leafFolder); }
public BaseBike(BeamCoreState gData, string _id, string _peerId, string _name, Team _team, string ctrl, long initialTime, Vector2 initialPos, Heading head) { gameData = gData; bikeId = _id; peerId = _peerId; name = _name; team = _team; basePosition = initialPos; baseTime = initialTime; baseHeading = head; ctrlType = ctrl; score = kStartScore; logger = UniLogger.GetLogger("BaseBike"); }
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), }; }
public static AceApian Create(string apianGroupType, IAceGameNet aceGameNet, AceAppCore appCore) { AceApian result; switch (apianGroupType) { case SinglePeerGroupManager.kGroupType: result = new AceApianSinglePeer(aceGameNet, appCore); break; case CreatorSezGroupManager.kGroupType: result = new AceApianCreatorSez(aceGameNet, appCore); break; default: UniLogger.GetLogger("Apian").Warn($"AceApianFactory.Create() Unknown GroupType: {apianGroupType}"); result = null; break; } return(result); }
public BikeControlBase() { Logger = UniLogger.GetLogger("BikeCtrl"); }
public ApianGroupManagerBase(ApianBase apianInst) { Logger = UniLogger.GetLogger("ApianGroup"); ApianInst = apianInst; Members = new Dictionary <string, ApianGroupMember>(); }
public async Task TwoClientsShouldTalk() { UniLogger.GetLogger("P2pNet").LogLevel = UniLogger.Level.Debug; await TestGuts._TwoClientsShouldTalk(clientActiveMqConnectionStr); }
protected Queue <Action> loopedBackMessageHandlers; // messages that come from this node (loopbacks) get handled at the end of the loop public GameNetBase() { callbacksForNextPoll = new Queue <Action>(); loopedBackMessageHandlers = new Queue <Action>(); logger = UniLogger.GetLogger("GameNet"); }
// Start is called before the first frame update public AceCliFrontend(AceUserSettings startupSettings) { userSettings = startupSettings; logger = UniLogger.GetLogger("Frontend"); }