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); }
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; } } }
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)); }