Esempio n. 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));
            }
        }
Esempio n. 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));
            }
        }
Esempio n. 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);
        }
Esempio n. 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));
            }
        }
Esempio n. 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);
        }
Esempio n. 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));
            }
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 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));
                }
            }
        }