void Start() // Monobehavior start { logger = UniLogger.GetLogger("GameCamera"); feMain = BeamMain.GetInstance(); _thisCamera = (Camera)GetComponent("Camera"); ModeNormal mode = (ModeNormal)SetMode(CamModeID.kNormal); mode.init(this); }
// // API // // // Utility // // Bike Factory stuff static public GameObject CreateBike(IBike ib, FeGround feGround) { GameObject newBike = GameObject.Instantiate(FrontendBikeFactory.GetInstance().bikePrefab, utils.Vec3(ib.basePosition), Quaternion.identity) as GameObject; newBike.AddComponent(bikeClassTypes[ib.ctrlType]); newBike.transform.parent = feGround.transform; FrontendBike bk = (FrontendBike)newBike.transform.GetComponent("FrontendBike"); bk.Setup(ib, BeamMain.GetInstance().beamApp.mainGameInst); return(newBike); }
// 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"); }
public void LoadAndShow() { BeamMain mainObj = BeamMain.GetInstance(); BeamUserSettings settings = mainObj.frontend.GetUserSettings(); screenNameField.GetComponent <TMP_InputField>().text = settings.screenName; p2pConnectionField.GetComponent <TMP_InputField>().text = settings.p2pConnectionString; ethNodeField.GetComponent <TMP_InputField>().text = settings.ethNodeUrl; ethAcctField.GetComponent <TMP_InputField>().text = settings.ethAcct; gameIdField.GetComponent <TMP_InputField>().text = settings.tempSettings.ContainsKey("gameId") ? settings.tempSettings["gameId"] : ""; UserSettingsMgr.Save(settings); moveOnScreen(); }
public void SaveAndHide() { BeamMain mainObj = BeamMain.GetInstance(); BeamUserSettings settings = mainObj.frontend.GetUserSettings(); settings.screenName = screenNameField.GetComponent <TMP_InputField>().text; settings.p2pConnectionString = p2pConnectionField.GetComponent <TMP_InputField>().text; settings.ethNodeUrl = ethNodeField.GetComponent <TMP_InputField>().text; settings.ethAcct = ethAcctField.GetComponent <TMP_InputField>().text; string gameId = gameIdField.GetComponent <TMP_InputField>().text; if (gameId != "") { settings.tempSettings["gameId"] = gameId; } UserSettingsMgr.Save(settings); moveOffScreen(); }
// Use this for initialization protected override void Start() { base.Start(); _main = BeamMain.GetInstance(); }
// Use this for initialization protected void Start() { _main = BeamMain.GetInstance(); }
// Use this for initialization protected void Start() { _main = BeamMain.GetInstance(); _playMenu = (PlayMenu)utils.findObjectComponent("PlayMenu", "PlayMenu"); }