コード例 #1
0
        public bool ObjectTestModelCondition(string gameObject, string modelCondition)
        {
            var Parser = new Data.Ini.Parser.IniParser(null, null, null, Game.SageGame);
            var modelConditionBitArray     = Parser.ParseEnumBitArray <Logic.Object.ModelConditionFlag>(modelCondition);
            var modelconditionBitArrayEnum = Game.Scene3D.GameObjects.GetObjectById(GetLuaObjectID(gameObject)).ModelConditionStates;

            foreach (var i in modelconditionBitArrayEnum)
            {
                if (i == modelConditionBitArray)
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #2
0
        public void ObjectClearModelCondition(string gameObject, string modelCondition)
        {
            var Parser = new Data.Ini.Parser.IniParser(null, null, null, Game.SageGame);
            var modelConditionBitArray     = Parser.ParseEnumBitArray <Logic.Object.ModelConditionFlag>(modelCondition);
            var modelconditionBitArrayEnum = Game.Scene3D.GameObjects.GetObjectById(GetLuaObjectID(gameObject)).ModelConditionStates;

            foreach (var i in modelconditionBitArrayEnum)
            {
                if (i == modelConditionBitArray)
                {
                    //remove modelCondition from BitArray
                    break;
                }
            }
        }
コード例 #3
0
        public void ObjectSetModelCondition(string gameObject, string modelCondition)
        {
            var Parser = new Data.Ini.Parser.IniParser(null, null, null, Game.SageGame);

            Game.Scene3D.GameObjects.GetObjectById(GetLuaObjectID(gameObject)).SetModelConditionFlags(Parser.ParseEnumBitArray <Logic.Object.ModelConditionFlag>(modelCondition));
        }