Example #1
0
        public MonsterObject(uint _id, int nAi_Id, short x, short y, bool isCreateTypeId = true)
        {
            mTarget      = null;
            id           = _id;
            type         = OBJECTTYPE.MONSTER;
            attr         = new GameStruct.MonterAttribute();
            mRebirthTime = 1000; //默认复活时间
            if (isCreateTypeId)
            {
                typeid = IDManager.CreateTypeId(type);
            }
            mInitPoint   = new GameStruct.Point();
            mInitPoint.x = x;
            mInitPoint.y = y;
            m_Ai         = CreateAi(nAi_Id);

            mnDieMagicTick = System.Environment.TickCount;
            mDieMagicInfo  = null;
            attr.life      = attr.life_max = 0;
            mAliveTime     = new GameBase.Core.TimeOut();
            mAliveTime.SetInterval(mRebirthTime);

            this.SetPoint(x, y);
            // ai = new AI.BaseAI(this);
            Alive();
        }
Example #2
0
        public MonsterObject(uint _id,int nAi_Id,short x,short y,bool isCreateTypeId = true)
        {
            mTarget = null;
            id = _id;
            type = OBJECTTYPE.MONSTER;
            attr = new GameStruct.MonterAttribute();
            mRebirthTime = 1000; //默认复活时间
            if (isCreateTypeId)
            {
                typeid = IDManager.CreateTypeId(type);
            }
            mInitPoint = new GameStruct.Point();
            mInitPoint.x = x;
            mInitPoint.y = y;
            m_Ai = CreateAi(nAi_Id);

            mnDieMagicTick = System.Environment.TickCount;
            mDieMagicInfo = null;
            attr.life = attr.life_max = 0;
            mAliveTime = new GameBase.Core.TimeOut();
            mAliveTime.SetInterval(mRebirthTime);

            this.SetPoint(x, y);
               // ai = new AI.BaseAI(this);
            Alive();
        }