Exemplo n.º 1
0
        public SkAttribs(ISkEntity ent, List <int> idxList, List <float> valList)
        {
            _entity  = ent;
            _expFunc = new ExpFuncSet(this);

            int maxIdx = 0;
            int cnt    = idxList.Count;

            for (int j = 0; j < cnt; j++)
            {
                if (idxList[j] > maxIdx)
                {
                    maxIdx = idxList[j];
                }
            }
            _nAttribs = maxIdx + 1;
            _dirties  = new ModFlags(_nAttribs);
            _raws     = new NumList(_nAttribs, (n, i, v) => RawSetter(i, v));
            _sums     = new NumList(_nAttribs, (n, i, v) => SumSetter(i, v));
            _pack     = new SkPackage(this);

            for (int j = 0; j < cnt; j++)
            {
                int idx = idxList[j];
                _sums[idx] = _raws[idx] = valList[j];
            }
            AddToSendDValue(Pathea.AttribType.Hp);
        }
Exemplo n.º 2
0
        public SkAttribs(ISkEntity ent, int nAttribs)
        {
            _entity  = ent;
            _expFunc = new ExpFuncSet(this);

            _nAttribs = nAttribs;
            _dirties  = new ModFlags(nAttribs);
            _raws     = new NumList(nAttribs, (n, i, v) => RawSetter(i, v));
            _sums     = new NumList(nAttribs, (n, i, v) => SumSetter(i, v));
            _pack     = new SkPackage(this);
            AddToSendDValue(Pathea.AttribType.Hp);
        }
Exemplo n.º 3
0
        public SkAttribs(ISkEntity ent, SkAttribs baseAttribs, bool[] masks)
        {
            _entity  = ent;
            _expFunc = new ExpFuncSet(this);

            int nAttribs = baseAttribs._raws.Count;

            _nAttribs = nAttribs;
            _dirties  = new ModFlags(nAttribs);
            _raws     = new NumListWithParent(baseAttribs._raws as NumList, masks, nAttribs, (n, i, v) => RawSetter(i, v));
            _sums     = new NumListWithParent(baseAttribs._sums as NumList, masks, nAttribs, (n, i, v) => SumSetter(i, v));
            _pack     = new SkPackage(this);
            AddToSendDValue(Pathea.AttribType.Hp);
        }