public void PerformRenderPipelineTest() { // We must change directory to the location of the assembly, because // Linux doesn't load SDL DLLs properly. Environment.CurrentDirectory = new FileInfo(Assembly.GetEntryAssembly().Location).DirectoryName; var kernel = new StandardKernel(); kernel.Load <ProtogameCoreModule>(); kernel.Load <ProtogameAssetModule>(); kernel.Bind <IAssert>().ToMethod(x => _assert); kernel.Bind <ITestAttachment>().ToMethod(x => _testAttachment); kernel.Bind <IRawLaunchArguments>().ToMethod(x => new DefaultRawLaunchArguments(new string[0])); try { using (var game = new HostGame(new RenderPipelineGame(kernel))) { game.Run(); } } catch (Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException) { System.Console.Error.WriteLine("WARNING: Unable to perform render pipeline tests as no graphics device could be found!"); } }
public void OnMatchList(bool success, string extendedInfo, List<MatchInfoSnapshot> matchList) { var join = GameObject.Find("JoinButton").GetComponent<Join>(); hg = FindObjectOfType<HostGame>(); if(textBox.text == "") { Fabric.EventManager.Instance.PostEvent("error2"); join.TextCont.gameObject.GetComponentInChildren<SVGImage>().color = Color.red; join.TextCont.SetActive(true); join.statusText.text = "Insert roomcode"; return; } if (!success) { Fabric.EventManager.Instance.PostEvent("error2"); join.TextCont.gameObject.GetComponentInChildren<SVGImage>().color = Color.red; join.TextCont.SetActive(true); join.statusText.text = "Room search unsuccesful."; return; } if (matchList == null) { Fabric.EventManager.Instance.PostEvent("error2"); join.TextCont.SetActive(true); join.statusText.text = "There is no list."; return; } if (matchList.Count == 0) { Fabric.EventManager.Instance.PostEvent("error2"); join.TextCont.gameObject.GetComponentInChildren<SVGImage>().color = Color.red; join.TextCont.SetActive(true); join.statusText.text = "No rooms found."; return; } foundGame = matchList[0]; JoinRoom(foundGame); }
private bool CheckModAndEngine(HostGame game) { if (game == null) { return(true); } else if (game.Engine == null) { ShowBalloonTip("Configuration required", "Mod " + game.Mod + " required by hosted game " + game + " has no engine assigned. Please configure it.", game.Mod); return(false); } else if (game.Engine.IsUnknown) { ShowBalloonTip("Configuration required", "Unknown game engine " + game.Engine + " required by hosted game " + game + ". Please configure it.", game.Engine); return(false); } else if (game.Mod.IsUnknown) { ShowBalloonTip("Configuration required", "Unknown mod " + game.Mod + " required by hosted game " + game + ". Please configure it.", game.Mod); return(false); } else { return(true); } }
protected override async void OnCreate(Bundle bundle) { base.OnCreate(bundle); HideSystemUi(); _hostGame = new HostGame(this); var view = (View)_hostGame.Services.GetService(typeof(View)); SetContentView(view); _hostGame.Run(); }
private void Start() { networkManager = NetworkManager.singleton; if (isLocalPlayer) { maincamera = Camera.main; SetDefault(); playerclass = GameManager.playerclass; hostGame = GameObject.FindGameObjectWithTag("NetworkManager").GetComponent <HostGame>(); } }
void Start() { UAE = FindObjectOfType <UnityAdsExample>(); rdm = FindObjectOfType <RoundDataManager>(); hg = FindObjectOfType <HostGame>(); gm = FindObjectOfType <GameManager>(); pm = FindObjectOfType <PlayerManager>(); um = FindObjectOfType <UIManager>(); artNoun = aNoun.text.Split(separators, System.StringSplitOptions.RemoveEmptyEntries); um.PocketReset(); }
public void Initialize() { _game = new HostGame(); Running = true; }