Beispiel #1
0
 //adds a hero/companion/ally in to the party roster
 public void addCompany(Hero hero)
 {
     heroes.Add(hero);
 }
Beispiel #2
0
 /// <summary>
 /// Allows the game component to perform any initialization it needs to before starting
 /// to run.  This is where it can query for any required services and load content.
 /// </summary>
 //When new game is chosen from the main menu this method initializes some basic values to party, camera etc.
 public void NewGame()
 {
     maps = new Dictionary<string, Map>();
     Hero hero1 = new Hero("Taistelu Jaska", new Vector3(50, 12.1f, -100));
     party = new Party();
     party.addCompany(hero1);
     party.attachObserver(new CameraObserver(this));
     party.addItem("Potion");
     party.addItem("Ether");
     party.addItem("Grenade");
     setModels();
     worldModel = ModelManager.instance(game).models["Taistelu Jaska"];
     worldModel.setPosition(party.Position, party.PartyRotation);
     maps.Add("OverWorld", new Map("eternia", game));
     maps.Add("Battle1", new Map("battle1", game));
     camera = new Camera(game.GraphicsDevice);
     camera.SetUpCamera(Party.Position, Party.PartyRotation);
 }
Beispiel #3
0
 public void removeCompany(Hero hero)
 {
     if(heroes.Contains(hero))
        heroes.Remove(hero);
 }