Esempio n. 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);
             }
         }
     }
 }
Esempio n. 2
0
        private void ExecuteCreateCreature()
        {
            CreateActorWindowViewModel createActorWindowViewModel = new CreateActorWindowViewModel();

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

            Model.PlayerActor playerActor = createActorWindowViewModel.GetPlayerActor();
            if (playerActor != null)
            {
                ActorLibrary.AddActor(playerActor);
            }
        }