Beispiel #1
0
 private void ExecuteEditActor(object actorObj)
 {
     if (actorObj is Model.Actor)
     {
         CreateActorWindowViewModel createActorWindowViewModel = new CreateActorWindowViewModel();
         if (actorObj is Model.PlayerActor)
         {
             createActorWindowViewModel.LoadPlayerActor(actorObj as Model.PlayerActor);
             Model.PlayerActor playerActor = createActorWindowViewModel.GetPlayerActor();
             if (playerActor != null)
             {
                 ActorLibrary.EditActor(actorObj as Model.PlayerActor, playerActor);
                 Encounter.UpdateActor(actorObj as Model.PlayerActor);
             }
         }
         else if (actorObj is Model.Creature)
         {
             createActorWindowViewModel.LoadCreature(actorObj as Model.Creature);
             Model.Creature creature = createActorWindowViewModel.GetCreature();
             if (creature != null)
             {
                 ActorLibrary.EditActor(actorObj as Model.Creature, creature);
             }
         }
     }
 }
Beispiel #2
0
        private void ExecuteCreateCreature()
        {
            CreateActorWindowViewModel createActorWindowViewModel = new CreateActorWindowViewModel();

            Model.Creature creature = createActorWindowViewModel.GetCreature();
            if (creature != null)
            {
                ActorLibrary.AddActor(creature);
            }
        }
Beispiel #3
0
        private void ExecuteCreatePlayerActor()
        {
            CreateActorWindowViewModel createActorWindowViewModel = new CreateActorWindowViewModel();

            Model.PlayerActor playerActor = createActorWindowViewModel.GetPlayerActor();
            if (playerActor != null)
            {
                ActorLibrary.AddActor(playerActor);
            }
        }
Beispiel #4
0
 private void ExecuteSaveActorLibrary()
 {
     ActorLibrary.WriteXML();
 }
Beispiel #5
0
 private void ExecuteLoadActorLibrary()
 {
     ActorLibrary.ReadXML();
 }