//Construtor por copia public Nave(Nave nave) { this.naveModel = nave.naveModel; this.position = new Vector3(var.Next(0, 10), var.Next(0, 10), var.Next(0, 10)); this.World = Matrix.CreateTranslation(position); this.state = nave.state; }
//Construtor sem parâmetros public Nave() { naveModel = null; position = new Vector3(var.Next(0, 10), var.Next(0, 10), var.Next(0, 10)); this.World = Matrix.CreateTranslation(position); state = true; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> public Nave(NaveModel model) { naveModel = model; position = new Vector3(0, 0, 0); this.World = Matrix.CreateTranslation(position); state = true; }
public ResourceManager(ContentManager content) { // TODO: use this.Content to load your game content here nave_model = new NaveModel(content, "Models/Ship1/p1_saucer"); nave_template = new Nave(nave_model); // Variável para carregar o modelo 3d da nave pool = new NavePool <Nave>(10); Vector3 worldPos = new Vector3(0, 0, 0); for (int i = 0; i < pool.Size(); i++) { pool.SetModel(i, nave_model); } }
//Auxilially to set a nave model to shit public void SetModel(int index, NaveModel naveModel) { live_stack[index].SetNaveModel(naveModel); }
void INavePool.SetNaveModel(NaveModel nm) { naveModel = nm; }