Пример #1
0
        private EntityRulesViewModel(string name, IEnumerable <EffectViewModelBase> preBattleEffects, IEnumerable <EffectViewModelBase> postBattleEffects, IEnumerable <EffectViewModelBase> preTurnEffects, IEnumerable <EffectViewModelBase> postTurnEffects, ConditionViewModelBase eliminationCondition, IEnumerable <ActionViewModel> actions, IEnumerable <ResultViewModel> results, ActionMatrixViewModel actionMatrix, StringLookupViewModel stringLookup)
        {
            m_name = name;
            m_eliminationCondition = eliminationCondition;

            m_selectedRule = new TreeNodeViewModel <LabeledViewModelBase>("", Enumerable.Empty <LabeledViewModelBase>());

            m_preBattleEffectsNode  = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PreBattleEffectsNodeLabel, preBattleEffects);
            m_postBattleEffectsNode = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PostBattleEffectsNodeLabel, postBattleEffects);
            m_preTurnEffectsNode    = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PreTurnEffectsNodeLabel, preTurnEffects);
            m_postTurnEffectsNode   = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PostTurnEffectsNodeLabel, postTurnEffects);
            m_actionsNode           = new TreeNodeViewModel <ActionViewModel>(OurResources.ActionsNodeLabel, actions);
            m_resultsNode           = new TreeNodeViewModel <ResultViewModel>(OurResources.ResultsNodeLabel, results);

            Rules = new List <TreeNodeViewModelBase>
            {
                m_preBattleEffectsNode,
                m_preTurnEffectsNode,
                m_postTurnEffectsNode,
                m_postBattleEffectsNode,
                m_actionsNode,
                m_resultsNode,
            };

            ActionMatrix = actionMatrix;
            StringLookup = stringLookup;
        }
Пример #2
0
        private GameRulesViewModel(IEnumerable <EffectViewModelBase> preBattleEffects, IEnumerable <EffectViewModelBase> postBattleEffects, IEnumerable <EffectViewModelBase> postTurnEffects, IEnumerable <EffectViewModelBase> preResultEffects, IEnumerable <EffectViewModelBase> postResultEffects, ConditionViewModelBase eliminationCondition)
        {
            m_eliminationCondition = eliminationCondition;
            m_selectedEffect       = new TreeNodeViewModel <EffectViewModelBase>("", Enumerable.Empty <EffectViewModelBase>());

            m_preBattleEffectsNode  = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PreBattleEffectsNodeLabel, preBattleEffects);
            m_preResultEffectsNode  = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PreResultEffectsNodeLabel, preResultEffects);
            m_postResultEffectsNode = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PostResultEffectsNodelLabel, postResultEffects);
            m_postTurnEffectsNode   = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PostTurnEffectsNodeLabel, postTurnEffects);
            m_postBattleEffectsNode = new TreeNodeViewModel <EffectViewModelBase>(OurResources.PostBattleEffectsNodeLabel, postBattleEffects);
            Effects = new List <TreeNodeViewModelBase>
            {
                m_preBattleEffectsNode,
                m_preResultEffectsNode,
                m_postResultEffectsNode,
                m_postTurnEffectsNode,
                m_postBattleEffectsNode,
            };
        }