private ContadorBalas() { Size screenSize = GuiController.Instance.Panel3d.Size; juego = Juego.Instance; indicadorBala = new Indicadores(); indicadorCargador = new Indicadores(); texto = new TgcText2d(); texto.Color = Color.Red; texto.Align = TgcText2d.TextAlign.LEFT; int tamañoTexturaBala = (int)indicadorBala.getPosicionXSpriteBala(); texto.Position = new Point(tamañoTexturaBala + 25, screenSize.Height - 32); texto.Size = new Size(350, 500); texto.changeFont(new System.Drawing.Font("Arial", 16f, FontStyle.Bold)); textoCargador = new TgcText2d(); textoCargador.Color = Color.Red; textoCargador.Align = TgcText2d.TextAlign.LEFT; int tamañoTexturaCargador = (int)indicadorBala.getPosicionXSpriteCargador(); textoCargador.Position = new Point(tamañoTexturaCargador + 190, screenSize.Height - 32); textoCargador.Size = new Size(350, 100); textoCargador.changeFont(new System.Drawing.Font("Arial", 16f, FontStyle.Bold)); setInitialValues(); }
public static Juego getInstance() { if (Instance == null) { Instance = new Juego(); } return Instance; }
public override void init() { GuiController.Instance.Modifiers.addFloat("zoom", 2f, 5f, 3f); GuiController.Instance.Modifiers.addBoolean("huellas", "Mostrar huellas", true); GuiController.Instance.Modifiers.addBoolean("nieve", "Mostrar nieve", true); Device d3dDevice = GuiController.Instance.D3dDevice; juego = Juego.getInstance(); vida = Vida.getInstance(); vida.initialize(); //ppManager = new PostProcesadoManager(this); camara = new TgcFpsMiCamara(); camara.Enable = true; camara.setCamera(new Vector3(-200, 40, 0), new Vector3(0, 10, 0)); camara.MovementSpeed = 150; soundManager = SoundManager.getInstance(); contadorBalas = ContadorBalas.getInstance(); escenarioManager = new EscenarioManager(); escenarioManager.generarPosiciones(); escenarioManager.generarBosque(500, 200, 40); octree = new Octree(); octree.create(escenarioManager.getOptimizables(), escenarioManager.limites); octree.createDebugOctreeMeshes(); enemigosManager = new EnemigosManager(escenarioManager); enemigosManager.generarEnemigos(Juego.Instance.totalEnemigos); Juego.Instance.manejoEnemigos(enemigosManager); contadorEnemigos = new ContadorEnemigos(); armaManager = ArmaManager.getInstance(enemigosManager, camara, escenarioManager); indicadores = new Indicadores(); camara.setEscenarioManger(escenarioManager); finalJuego = new GameOver(); huellaManager = new HuellasManager(25); nieve = new Nieve(3000, 3000, 200); clima = new Clima(nieve, soundManager); }