public World(string path, string file_name, int width, int height) { //setovanje visine i sirine za resize this.mf_width = width; this.mf_height = height; try { this.mf_scene = new AssimpScene(path, file_name); this.mf_font = new BitmapFont("Tahoma", 14f, false, true, true, false); this.mf_box = new Box(); } catch (Exception) { MessageBox.Show("Neuspesno kreirana instanca klase BOX", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error); } try { textures = new int[textureCount]; } catch (Exception) { MessageBox.Show("Neuspesno kreirana niz identifikatora za teksture", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.Initialize(); this.Resize(); }
/// <summary> /// Konstruktor klase Cube. /// </summary> public Hangar() { try { m_box = new Box(m_width, m_height, m_depth); } catch (Exception) { MessageBox.Show("Neuspesno kreirana instanca klase Box", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// Konstruktor klase Cube sa parametrima. /// </summary> /// <param name="size">Velicina stranice kuce.</param> public Hangar(float width, float height, float depth) { this.m_width = width; this.m_height = height; this.m_depth = depth; try { m_box = new Box(m_width, m_height, m_depth); m_antena = new Antenna(m_width / 24.0f, m_height / 4.0f, m_depth / 5.0f); } catch (Exception) { MessageBox.Show("Neuspesno kreirana instanca klase Box", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error); } }