public CompiladorJogo(Jogo jogo, string pastaVersaoCompilada) { _Jogo = jogo; string nomeProjeto = jogo.Arquivo.Substring(jogo.Arquivo.LastIndexOf('\\') + 1); _NomeProjeto = nomeProjeto.Remove(nomeProjeto.LastIndexOf('.')); _PastaVersaoCompilada = pastaVersaoCompilada.EndsWith("\\") ? pastaVersaoCompilada : pastaVersaoCompilada + '\\'; if(_PastaVersaoCompilada == _Jogo.PastaJogo) throw new Exception("A pasta selecionada não pode ser a pasta do projeto"); }
private string GerarDll(Script script) { string filePath = EscreverClasse(script); string dll = _PastaVersaoCompilada + script.NomeClasse + ".dll"; string argumentos = @"/target:library /out:""{0}"" ""{1}"" /reference:""{2}"" /reference:""{3}\Microsoft.Xna.Framework.dll"" /reference:""{3}\Microsoft.Xna.Framework.Game.dll"""; argumentos = string.Format(argumentos, dll, filePath, _PastaVersaoCompilada + Jogo.RetornarArquivoPadrao(ArquivoPadrao.DLLObjetos), Configuracao.RetornarPastaXNA()); Process p = new Process(); p.StartInfo.FileName = Jogo.RetornarCaminhoCompilador(); p.StartInfo.Arguments = argumentos; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.Start(); string erro = p.StandardOutput.ReadToEnd(); p.WaitForExit(); if (p.ExitCode != 0) { int i = erro.IndexOf("error "); throw new Exception(erro.Substring(i)); } return(script.NomeClasse + ".dll"); }
public Triangulo(Jogo jogo) : base(jogo) { }
public ConcentradorObjeto(Jogo jogo) { Jogo = jogo; Jogo.ListaObjeto.Add(this); ID = Guid.NewGuid().ToString(); }
private void ClearEngine(bool novoProjeto) { ProjetoJogo = null; TreeViewObjetos.Nodes.Clear(); GrpGameView.Controls.Clear(); CboUpdate.Items.Clear(); LstScript.Items.Clear(); PropertyControl.SelectedObject = null; _NumCena = 1; Visible = false; FrmInicio inicio = new FrmInicio(this, novoProjeto); inicio.ShowDialog(); if (!IsDisposed) { Visible = true; } }
public Som(Jogo jogo) { Jogo = jogo; }
public static Jogo AbrirProjeto(string caminhoArquivo) { Jogo jogo = new Jogo(caminhoArquivo); jogo.LerArquivoProjeto(); return jogo; }
public static Jogo AbrirJogo(string arquivo, GameProxy gameProxy, ContentManager content, GraphicsDeviceManager graphics) { Jogo jogo = new Jogo(arquivo); jogo.LerArquivoJogo(gameProxy, content, graphics); return jogo; }
public static Jogo CriarProjeto(string pasta, string nomeJogo) { if (!pasta.EndsWith("\\")) pasta += '\\'; string caminhoArquivo = pasta + nomeJogo + EXTENSAO_PROJETO; Jogo jogo = new Jogo(caminhoArquivo); CriarEstruturaPasta(pasta, true); CenaWinForm cena = new CenaWinForm(); cena.Nome = "Principal"; jogo.ListaCena.Add(cena); return jogo; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); string arquivo = RetornarArquivoJogo(); _Jogo = Jogo.AbrirJogo(arquivo, _GameProxy, Content, graphics); CarregarCena("Principal"); }
public ImagemObjeto(Jogo jogo) : base(jogo) { }
public AbstractImagemObjeto(Jogo jogo) : base(jogo) { }
public ManipuladorArquivo(Jogo jogo) { _Jogo = jogo; }
public FiguraObjeto(Jogo jogo) : base(jogo) { }
private void abrirToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog op = new OpenFileDialog(); op.Filter = "Projeto CogEngine|*" + Jogo.EXTENSAO_PROJETO; op.Title = "CogEngine - Abrir"; op.ShowDialog(); string caminhoArquivo = op.FileName; if (!string.IsNullOrEmpty(caminhoArquivo.Trim())) { ProjetoJogo = Jogo.AbrirProjeto(caminhoArquivo); } }
public ConcentradorTexto(Jogo jogo) : base(jogo) { }
public Quadrado(Jogo jogo) : base(jogo) { }