Пример #1
0
        public void AddState(int objId, string state)
        {
            EntityInfo entity = m_Scene.EntityManager.GetEntityInfo(objId);

            if (null != entity)
            {
                entity.AddState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state));
            }
        }
Пример #2
0
        internal void AddState(int objId, string state)
        {
            EntityInfo entity = m_Scene.EntityManager.GetEntityInfo(objId);

            if (null != entity)
            {
                entity.SetStateFlag(Operate_Type.OT_AddBit, CharacterStateUtility.FromString(state));
            }
        }
Пример #3
0
        public bool HaveState(int objId, string state)
        {
            EntityInfo entity = m_Scene.EntityManager.GetEntityInfo(objId);

            if (null != entity)
            {
                return(entity.HaveState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state)));
            }
            return(false);
        }
Пример #4
0
        public void AddState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo entity = view.Entity;
                entity.AddState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state));
            }
        }
Пример #5
0
        internal bool HaveState(int objId, string state)
        {
            EntityInfo entity = m_Scene.EntityManager.GetEntityInfo(objId);

            if (null != entity)
            {
                return(entity.IsHaveStateFlag(CharacterStateUtility.FromString(state)));
            }
            return(false);
        }
Пример #6
0
        internal void AddState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo entity = view.Entity;
                entity.SetStateFlag(Operate_Type.OT_AddBit, CharacterStateUtility.FromString(state));
            }
        }
Пример #7
0
        public bool HaveState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo npc = view.Entity;
                return(npc.HaveState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state)));
            }
            return(false);
        }
Пример #8
0
        internal bool HaveState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo npc = view.Entity;
                return(npc.IsHaveStateFlag(CharacterStateUtility.FromString(state)));
            }
            return(false);
        }
Пример #9
0
        public void DisableState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo npc = view.Entity;
                if (!string.IsNullOrEmpty(state))
                {
                    npc.DisableState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state));
                }
            }
        }
Пример #10
0
        public void RemoveState(int objId, string state)
        {
            EntityInfo entity = m_Scene.EntityManager.GetEntityInfo(objId);

            if (null != entity)
            {
                if (string.IsNullOrEmpty(state))
                {
                    //entity.StateFlag = 0;
                }
                else
                {
                    entity.RemoveState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state));
                }
            }
        }
Пример #11
0
        internal void RemoveState(int objId, string state)
        {
            EntityInfo entity = m_Scene.EntityManager.GetEntityInfo(objId);

            if (null != entity)
            {
                if (string.IsNullOrEmpty(state))
                {
                    entity.StateFlag = 0;
                }
                else
                {
                    entity.SetStateFlag(Operate_Type.OT_RemoveBit, CharacterStateUtility.FromString(state));
                }
            }
        }
Пример #12
0
        public void RemoveState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo entity = view.Entity;
                if (string.IsNullOrEmpty(state))
                {
                    //entity.StateFlag = 0;
                }
                else
                {
                    entity.RemoveState((CharacterPropertyEnum)CharacterStateUtility.NameToState(state));
                }
            }
        }
Пример #13
0
        internal void RemoveState(int objId, string state)
        {
            EntityViewModel view = GetEntityViewById(objId);

            if (null != view && null != view.Entity)
            {
                EntityInfo entity = view.Entity;
                if (string.IsNullOrEmpty(state))
                {
                    entity.StateFlag = 0;
                }
                else
                {
                    entity.SetStateFlag(Operate_Type.OT_RemoveBit, CharacterStateUtility.FromString(state));
                }
            }
        }