public Misil(Barco barcoDuenio, Barco barcoEnemigo) { //habria que inyectarlo por parametro Microsoft.DirectX.Direct3D.Device d3dDevice = GuiController.Instance.D3dDevice; TgcSceneLoader loader = new TgcSceneLoader(); //TgcScene escena = loader.loadSceneFromFile(GuiController.Instance.ExamplesMediaDir + "MeshCreator\\Meshes\\Objetos\\BarrilPolvora\\BarrilPolvora-TgcScene.xml"); //this.mesh = escena.Meshes[0]; mesh = new TgcSphere(); mesh.BasePoly = TgcSphere.eBasePoly.CUBE; mesh.setColor(Color.Black); mesh.Radius = 10; mesh.Position = new Vector3(0, 2, 0); mesh.Inflate = true; mesh.LevelOfDetail = 4; mesh.updateValues(); string texturePath = (string)GuiController.Instance.AlumnoEjemplosMediaDir + "\\Textures\\metalOscuro.jpg"; mesh.setTexture(TgcTexture.createTexture(d3dDevice, texturePath)); this.barco = barcoDuenio; this.enemigo = barcoEnemigo; }
public void setEnemy(Barco enemigo) { this.enemy = enemigo; }
public bool chocasteConBarco(Barco unBarco) { return TgcCollisionUtils.testSphereAABB(this.BoundingSphere(), unBarco.BoundingBox()); }