Example #1
0
        public RaceModule(HeroInfo info)
        {
            mHeroInfo = info;

            mRaceMod = new PropGroup <int>(RecalcRaceMod);//, "RaceMod");
            mHeroInfo.AddBasePropRelation(mRaceMod);
        }
Example #2
0
        public BasePointModule(HeroInfo info)
        {
            mHeroInfo   = info;
            mBasePoints = new PropGroup <int>(null);//, "Base");

            info.AddBasePropRelation(mBasePoints);
        }
Example #3
0
        public ClassModule(HeroInfo info)
        {
            mHeroInfo      = info;
            mBasePropBonus = new PropGroup <int>(RecalcClassMod);

            mHeroInfo.AddAdvPropRelation(mBasePropBonus);
        }
Example #4
0
        public HeroInfo()
        {
            mAdvProp  = new PropGroup <int>(RecalcAdvanceProps); //,"Final");
            mPropMod  = new PropGroup <int>(RecalcPropMod);      //,"");
            mBaseProp = new PropGroup <int>(RecalcBaseProps);    //,"Base");

            mPropMod.AddParentProp(mAdvProp);
            mBaseProp.AddParentProp(mPropMod);

            mRaceModule      = new RaceModule(this);
            mClassModule     = new ClassModule(this);
            mBasePointModule = new BasePointModule(this);

            //System.Reflection.MemberInfo info = typeof(HeroInfo);
            //mReadOnly = (ReadOnlyAttribute)Attribute.GetCustomAttribute(info, typeof(ReadOnlyAttribute));
        }
Example #5
0
        } // _getNodeTypeProps()

        /// <summary>
        /// Returns enumarable collection of all properties on all node types of the object class
        /// </summary>
        private IEnumerable <CswViewBuilderProp> _getObjectClassProps(CswNbtMetaDataObjectClass ObjectClass)
        {
            var OcProps = new List <CswViewBuilderProp>();
            Dictionary <Int32, string> UniqueProps = new Dictionary <int, string>();

            if (null != ObjectClass)
            {
                //Iterate all NodeTypes and all versions of the NodeTypes to build complete list of NTPs
                foreach (IEnumerable <CswViewBuilderProp> ViewBuilderProps in from CswNbtMetaDataNodeType NodeType
                         in ObjectClass.getNodeTypes()
                         select _getNodeTypeProps(NodeType, ref UniqueProps))
                {
                    OcProps.AddRange(ViewBuilderProps);
                }
            }
            var ReturnProps = from Prop in OcProps
                              group Prop by Prop into PropGroup
                              where PropGroup.Count() == 1
                              select PropGroup.Key;

            return(ReturnProps);
        } // _getObjectClassProps()