Пример #1
0
        void initAttr()
        {
            int inited = 0;

            if (piece.hasAttribute <CoVidAttribute>())
            {
                _coVidAttribute = piece.getAttribute <CoVidAttribute>();
                inited++;
            }

            if (piece.hasAttribute <StayHomeAttribute>())
            {
                _stayHomeAttribute = piece.getAttribute <StayHomeAttribute>();
                inited++;
            }

            if (inited >= 2)
            {
                _initialized = true;
            }
        }