Exemplo n.º 1
0
        public void Init(string Name)
        {
            ProjectileContext GlobalProjectileContext = new ProjectileContext();
            ProjectileParams  MagicProjectileParams   = new ProjectileParams(GlobalProjectileContext);

            MagicUserContext GlobalMagicContext = new MagicUserContext();
            MagicUserParams  MagicParams        = new MagicUserParams(GlobalMagicContext);

            Dictionary <string, MagicElement> DicMagicElement = MagicElement.LoadRegularCore(MagicParams);

            foreach (KeyValuePair <string, MagicElement> ActiveMagicElement in MagicElement.LoadProjectileCores(MagicParams, MagicProjectileParams))
            {
                DicMagicElement.Add(ActiveMagicElement.Key, ActiveMagicElement.Value);
            }
            foreach (KeyValuePair <string, MagicElement> ActiveMagicElement in MagicElement.LoadElements(MagicParams))
            {
                DicMagicElement.Add(ActiveMagicElement.Key, ActiveMagicElement.Value);
            }

            ActiveSpell               = new MagicSpell(Name, null, GlobalMagicContext, DicMagicElement);
            ActiveMagicEditor         = new MagicEditor(ActiveSpell, GlobalProjectileContext, MagicProjectileParams.SharedParams);
            ActiveMagicEditor.Content = new ContentManager(Services);
            ActiveMagicEditor.Content.RootDirectory = "Content";
            Services.AddService(GraphicsDevice);
            ActiveMagicEditor.Load();
        }
Exemplo n.º 2
0
 public override void OnSelect()
 {
     ActiveMagicEditor = new MagicEditor(ActiveSpell, GlobalProjectileContext, SharedParams);
     ActiveMagicEditor.Load();
 }