public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <BaseAgent>("BaseAgent"); AgentMeta.UnRegister <EnemyAgent>("EnemyAgent"); AgentMeta.UnRegister <LogicStatus>("LogicStatus"); return(true); }
public override void Load(string instance, string[] paramStrs) { Debug.Check(paramStrs.Length == 2); _instance = instance; _param0 = AgentMeta.ParseProperty <IList>(paramStrs[0]); _param1 = AgentMeta.ParseProperty <System.Object>(paramStrs[1]); }
public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <ETHotfix.ConnectionManager>("ETHotfix.ConnectionManager"); AgentMeta.UnRegister <ETHotfix.ConnectionStatus>("ETHotfix.ConnectionStatus"); Agent.UnRegisterInstanceName <ETHotfix.ConnectionManager>("ETHotfix::ConnectionManager"); return(true); }
public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <FirstAgent>("FirstAgent"); AgentMeta.UnRegister <FirstEnum>("FirstEnum"); AgentMeta.UnRegister <FirstStruct>("FirstStruct"); AgentMeta.UnRegister <HeroStruct>("HeroStruct"); return(true); }
public override void Load(string instance, string[] paramStrs) { Debug.Check(paramStrs.Length == 3); _instance = instance; _param0 = AgentMeta.ParseProperty <GameActor>(paramStrs[0]); _param1 = (CInstanceMember <eMapDirection>)AgentMeta.ParseProperty <eMapDirection>(paramStrs[1]); _param2 = (CInstanceMember <int>)AgentMeta.ParseProperty <int>(paramStrs[2]); }
static partial void unRegisterMeta() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <behaviac.EBTStatus>("behaviac.EBTStatus"); AgentMeta.UnRegister <CBTPlayer>("CBTPlayer"); AgentMeta.UnRegister <System.Object>("System.Object"); Agent.UnRegisterInstanceName <CBTPlayer>("CBTPlayer"); }
static partial void registerMeta() { // --------------------------------------------------------------------- // properties // --------------------------------------------------------------------- AgentMeta meta; // behaviac.Agent meta = new AgentMeta(); _agentMetas[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // FSM_Ctrl meta = new AgentMeta(); _agentMetas[3694907031] = meta; meta.RegisterMemberProperty(1615046900, new CMemberProperty <bool>("isConAva", delegate(Agent self, bool value) { ((FSM_Ctrl)self).isConAva = value; }, delegate(Agent self) { return(((FSM_Ctrl)self).isConAva); })); meta.RegisterMemberProperty(2884927150, new CMemberProperty <int>("MouseStatus", delegate(Agent self, int value) { ((FSM_Ctrl)self).MouseStatus = value; }, delegate(Agent self) { return(((FSM_Ctrl)self).MouseStatus); })); meta.RegisterMemberProperty(525979889, new CMemberProperty <int>("Status", delegate(Agent self, int value) { ((FSM_Ctrl)self).Status = value; }, delegate(Agent self) { return(((FSM_Ctrl)self).Status); })); meta.RegisterMethod(3991083887, new CAgentMethodVoid(delegate(Agent self) { AgentMetaVisitor.ExecuteMethod(self, "Constructing", null); })); meta.RegisterMethod(2092435623, new CAgentMethodVoid(delegate(Agent self) { AgentMetaVisitor.ExecuteMethod(self, "Enter_ReadyConstruct", null); })); meta.RegisterMethod(1017098902, new CAgentMethodVoid(delegate(Agent self) { AgentMetaVisitor.ExecuteMethod(self, "ReadyConstruct", null); })); meta.RegisterMethod(3546126339, new CAgentMethodVoid(delegate(Agent self) { AgentMetaVisitor.ExecuteMethod(self, "Selecting", null); })); meta.RegisterMethod(2951813410, new CAgentMethodVoid(delegate(Agent self) { AgentMetaVisitor.ExecuteMethod(self, "WaitForOrder", null); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FSM_Ctrl.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // Unit meta = new AgentMeta(); _agentMetas[435109933] = meta; meta.RegisterMemberProperty(3266651641, new CMemberProperty <bool>("isEnmyFound", delegate(Agent self, bool value) { ((Unit)self).isEnmyFound = value; }, delegate(Agent self) { return(((Unit)self).isEnmyFound); })); meta.RegisterMemberProperty(1151875736, new CMemberProperty <bool>("isGo", delegate(Agent self, bool value) { ((Unit)self).isGo = value; }, delegate(Agent self) { return(((Unit)self).isGo); })); meta.RegisterMethod(3127879122, new CAgentMethodVoid(delegate(Agent self) { ((Unit)self).Attack(); })); meta.RegisterMethod(2411069714, new CAgentMethodVoid(delegate(Agent self) { ((Unit)self).GotoDes(); })); meta.RegisterMethod(2253404977, new CAgentMethodVoid(delegate(Agent self) { ((Unit)self).Idle(); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { Unit.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <behaviac.EBTStatus>("behaviac.EBTStatus"); AgentMeta.Register <FSM_Ctrl>("FSM_Ctrl"); AgentMeta.Register <System.Object>("System.Object"); AgentMeta.Register <Unit>("Unit"); }
public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <FirstAgent>("FirstAgent"); AgentMeta.UnRegister <SecondAgent>("SecondAgent"); Agent.UnRegisterInstanceName <SecondAgent>("SecondAgentInstance"); return(true); }
public CInstanceConst_FirstStruct(string typeName, string valueStr) : base(typeName, valueStr) { List <string> paramStrs = behaviac.StringUtils.SplitTokensForStruct(valueStr); Debug.Check(paramStrs != null && paramStrs.Count == 2); _s1 = (CInstanceMember <int>)AgentMeta.ParseProperty <int>(paramStrs[0]); _s2 = (CInstanceMember <float>)AgentMeta.ParseProperty <float>(paramStrs[1]); }
public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <CBTPlayer>("CBTPlayer"); AgentMeta.UnRegister <behaviac.EBTStatus>("behaviac.EBTStatus"); AgentMeta.UnRegister <IList>("IList"); Agent.UnRegisterInstanceName <CBTPlayer>("CBTPlayer"); return(true); }
public override void Load(string instance, string[] paramStrs) { Debug.Check(paramStrs.Length == 4); _instance = instance; _param0 = (CInstanceMember <string>)AgentMeta.ParseProperty <string>(paramStrs[0]); _param1 = AgentMeta.ParseProperty <UnityEngine.Transform>(paramStrs[1]); _param2 = (CInstanceMember <UnityEngine.Vector3>)AgentMeta.ParseProperty <UnityEngine.Vector3>(paramStrs[2]); _param3 = (CInstanceMember <float>)AgentMeta.ParseProperty <float>(paramStrs[3]); }
public override bool Load() { AgentMeta.TotalSignature = 3600341653; AgentMeta meta; // behaviac.Agent meta = new AgentMeta(24743406); AgentMeta._AgentMetas_[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // stage_mgr meta = new AgentMeta(49702908); AgentMeta._AgentMetas_[4235165405] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { stage_mgr.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); meta.RegisterMethod(1043635496, new CAgentMethodVoid <string>(delegate(Agent self, string proc_id) { ((stage_mgr)self)._act_each_player_(proc_id); })); // role meta = new AgentMeta(1381354900); AgentMeta._AgentMetas_[2275423655] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { role.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // player meta = new AgentMeta(494715068); AgentMeta._AgentMetas_[4192090602] = meta; meta.RegisterMemberProperty(3072594268, new CMemberProperty <int>("CARD_COUNT_PLAYER_START", delegate(Agent self, int value) { ((player)self)._set_CARD_COUNT_PLAYER_START(value); }, delegate(Agent self) { return(((player)self)._get_CARD_COUNT_PLAYER_START()); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { player.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <stage_mgr>("stage_mgr"); AgentMeta.Register <role>("role"); AgentMeta.Register <player>("player"); return(true); }
public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <ET.SkillAgent>("ET.SkillAgent"); AgentMeta.UnRegister <ET.AIAgent>("ET.AIAgent"); AgentMeta.UnRegister <ET.SkillTargetCondition>("ET.SkillTargetCondition"); AgentMeta.UnRegister <ET.UnitState>("ET.UnitState"); Agent.UnRegisterInstanceName <ET.SkillAgent>("ET::NormalAttack"); return(true); }
private static void registerCustomizedProperty(AgentMeta meta, string propName, string typeName, string valueStr, bool isStatic) { typeName = typeName.Replace("::", "."); uint nameId = Utils.MakeVariableId(propName); IProperty prop = meta.GetProperty(nameId); ICustomizedProperty newProp = AgentMeta.CreateCustomizedProperty(typeName, nameId, propName, valueStr); if (prop != null && newProp != null) { object newValue = newProp.GetValueObject(null); object value = prop.GetValueObject(null); if (newValue != null && value != null && newValue.GetType() == value.GetType()) { return; } string errorInfo = string.Format("The type of '{0}' has been modified to {1}, which would bring the unpredictable consequences.", propName, typeName); Debug.LogWarning(errorInfo); Debug.Check(false, errorInfo); } if (isStatic) { meta.RegisterStaticCustomizedProperty(nameId, newProp); } else { meta.RegisterCustomizedProperty(nameId, newProp); } Type type = AgentMeta.GetTypeFromName(typeName); if (Utils.IsArrayType(type)) { // Get item type, i.e. vector<int> int kStartIndex = "vector<".Length; typeName = typeName.Substring(kStartIndex, typeName.Length - kStartIndex - 1); // item type ICustomizedProperty arrayItemProp = AgentMeta.CreateCustomizedArrayItemProperty(typeName, nameId, propName); nameId = Utils.MakeVariableId(propName + "[]"); if (isStatic) { meta.RegisterStaticCustomizedProperty(nameId, arrayItemProp); } else { meta.RegisterCustomizedProperty(nameId, arrayItemProp); } } }
public override bool UnLoad() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <FightAgent>("FightAgent"); AgentMeta.UnRegister <BuildingAgent>("BuildingAgent"); AgentMeta.UnRegister <DefenseTowerAgent>("DefenseTowerAgent"); AgentMeta.UnRegister <SoilderAgent>("SoilderAgent"); AgentMeta.UnRegister <HeroAgent>("HeroAgent"); AgentMeta.UnRegister <Situation>("Situation"); AgentMeta.UnRegister <ActionStatus>("ActionStatus"); AgentMeta.UnRegister <bVector3>("bVector3"); return(true); }
protected override void load(int version, string agentType, List <property_t> properties) { base.load(version, agentType, properties); for (int i = 0; i < properties.Count; ++i) { property_t p = properties[i]; if (p.name == "Count") { this.m_count = AgentMeta.ParseProperty(p.value); } } }
protected override void load(int version, string agentType, List <property_t> properties) { base.load(version, agentType, properties); for (int i = 0; i < properties.Count; ++i) { property_t p = properties[i]; if (p.name == "RandomGenerator") { this.m_method = AgentMeta.ParseMethod(p.value); } } }
public override bool Load() { AgentMeta.TotalSignature = 3349489019; AgentMeta meta; // behaviac.Agent meta = new AgentMeta(24743406); AgentMeta._AgentMetas_[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // FirstAgent meta = new AgentMeta(334646925); AgentMeta._AgentMetas_[1778122110] = meta; meta.RegisterMemberProperty(2082220067, new CMemberProperty <int>("p1", delegate(Agent self, int value) { ((FirstAgent)self)._set_p1(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_p1()); })); meta.RegisterMemberProperty(1144200279, new CMemberProperty <SecondAgent>("pInstance", delegate(Agent self, SecondAgent value) { ((FirstAgent)self)._set_pInstance(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_pInstance()); })); meta.RegisterMethod(3345343196, new CAgentMethodVoid <int>(delegate(Agent self, int param0) { }) /* event_task */); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FirstAgent.LogMessage(param0); })); meta.RegisterMethod(702722749, new CAgentMethodVoid <string>(delegate(Agent self, string param0) { ((FirstAgent)self).Say(param0); })); meta.RegisterMethod(1505908390, new CAgentMethodVoid(delegate(Agent self) { ((FirstAgent)self).SayHello(); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // SecondAgent meta = new AgentMeta(2420330950); AgentMeta._AgentMetas_[2432194202] = meta; meta.RegisterMemberProperty(1462860768, new CMemberProperty <int>("p2", delegate(Agent self, int value) { ((SecondAgent)self)._set_p2(value); }, delegate(Agent self) { return(((SecondAgent)self)._get_p2()); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { SecondAgent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <FirstAgent>("FirstAgent"); AgentMeta.Register <SecondAgent>("SecondAgent"); Agent.RegisterInstanceName <SecondAgent>("SecondAgentInstance"); return(true); }
public override bool Load() { AgentMeta.TotalSignature = 2349420332; AgentMeta meta; // behaviac.Agent meta = new AgentMeta(24743406); AgentMeta._AgentMetas_[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // ET.SkillAgent meta = new AgentMeta(2936130593); AgentMeta._AgentMetas_[3034708317] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { ET.SkillAgent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); meta.RegisterMethod(154156501, new CAgentMethod <bool>(delegate(Agent self) { return(((ET.SkillAgent)self).IsInAttackArea()); })); meta.RegisterMethod(2886181657, new CAgentMethod <behaviac.EBTStatus, int>(delegate(Agent self, int skillindex) { return(((ET.SkillAgent)self).DoAttack(skillindex)); })); // ET.AIAgent meta = new AgentMeta(2003424109); AgentMeta._AgentMetas_[4147032071] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { ET.AIAgent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <ET.SkillAgent>("ET.SkillAgent"); AgentMeta.Register <ET.AIAgent>("ET.AIAgent"); AgentMeta.Register <ET.SkillTargetCondition>("ET.SkillTargetCondition"); ComparerRegister.RegisterType <ET.SkillTargetCondition, CompareValue_ET_SkillTargetCondition>(); AgentMeta.Register <ET.UnitState>("ET.UnitState"); ComparerRegister.RegisterType <ET.UnitState, CompareValue_ET_UnitState>(); Agent.RegisterInstanceName <ET.SkillAgent>("ET::NormalAttack"); return(true); }
public static IMethod ParseMethod(string valueStr, ref string methodName) { //Self.test_ns::AgentActionTest::Action2(0) if (string.IsNullOrEmpty(valueStr) || (valueStr[0] == '\"' && valueStr[1] == '\"')) { return(null); } string agentIntanceName = null; string agentClassName = null; int pBeginP = ParseMethodNames(valueStr, ref agentIntanceName, ref agentClassName, ref methodName); uint agentClassId = Utils.MakeVariableId(agentClassName); uint methodId = Utils.MakeVariableId(methodName); AgentMeta meta = AgentMeta.GetMeta(agentClassId); Debug.Check(meta != null); if (meta != null) { IMethod method = meta.GetMethod(methodId); if (method == null) { Debug.Check(false, string.Format("Method of {0}::{1} is not registered!\n", agentClassName, methodName)); } else { method = (IMethod)(method.Clone()); string paramsStr = valueStr.Substring(pBeginP); Debug.Check(paramsStr[0] == '('); List <string> paramsTokens = new List <string>(); int len = paramsStr.Length; Debug.Check(paramsStr[len - 1] == ')'); string text = paramsStr.Substring(1, len - 2); paramsTokens = ParseForParams(text); method.Load(agentIntanceName, paramsTokens.ToArray()); } return(method); } return(null); }
static partial void unRegisterMeta() { AgentMeta.UnRegister <behaviac.Agent>("behaviac.Agent"); AgentMeta.UnRegister <behaviac.EBTStatus>("behaviac.EBTStatus"); AgentMeta.UnRegister <eBrickType>("eBrickType"); AgentMeta.UnRegister <eGameForce>("eGameForce"); AgentMeta.UnRegister <eMapDirection>("eMapDirection"); AgentMeta.UnRegister <GameActor>("GameActor"); AgentMeta.UnRegister <GameLevelCommon>("GameLevelCommon"); AgentMeta.UnRegister <Player>("Player"); AgentMeta.UnRegister <System.Object>("System.Object"); AgentMeta.UnRegister <UnityEngine.Color>("UnityEngine.Color"); AgentMeta.UnRegister <UnityEngine.Transform>("UnityEngine.Transform"); AgentMeta.UnRegister <UnityEngine.Vector3>("UnityEngine.Vector3"); }
public ReferencedBehavior_bt_maintree_task_node4() { string szTreePath = this.GetReferencedTree(null); if (!string.IsNullOrEmpty(szTreePath)) { BehaviorTree behaviorTree = Workspace.Instance.LoadBehaviorTree(szTreePath); if (behaviorTree != null) { this.m_bHasEvents |= behaviorTree.HasEvents(); } } this.m_taskMethod = AgentMeta.ParseMethod("Self.FirstAgent::t1(2)"); Debug.Check(this.m_taskMethod != null); }
protected override void load(int version, string agentType, List <property_t> properties) { base.load(version, agentType, properties); for (int i = 0; i < properties.Count; ++i) { property_t p = properties[i]; if (p.name == "ReferenceBehavior") { int pParenthesis = p.value.IndexOf('('); if (pParenthesis == -1) { this.m_referencedBehaviorPath = AgentMeta.ParseProperty(p.value); } else { this.m_referencedBehaviorPath = AgentMeta.ParseMethod(p.value); } string szTreePath = this.GetReferencedTree(null); //conservatively make it true bool bHasEvents = true; if (!string.IsNullOrEmpty(szTreePath)) { if (Config.PreloadBehaviors) { BehaviorTree behaviorTree = Workspace.Instance.LoadBehaviorTree(szTreePath); Debug.Check(behaviorTree != null); if (behaviorTree != null) { bHasEvents = behaviorTree.HasEvents(); } } this.m_bHasEvents |= bHasEvents; } } else if (p.name == "Task") { this.m_taskMethod = AgentMeta.ParseMethod(p.value); } } }
public override bool Load() { AgentMeta.TotalSignature = 2982566067; AgentMeta meta; // behaviac.Agent meta = new AgentMeta(24743406); AgentMeta._AgentMetas_[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // BaseAgent meta = new AgentMeta(2920936647); AgentMeta._AgentMetas_[2774251291] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { BaseAgent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // EnemyAgent meta = new AgentMeta(3544837490); AgentMeta._AgentMetas_[3531795815] = meta; meta.RegisterMethod(3127879122, new CAgentMethodVoid <float>(delegate(Agent self, float attackParam) { ((EnemyAgent)self).Attack(attackParam); })); meta.RegisterMethod(119980225, new CAgentMethodVoid(delegate(Agent self) { ((EnemyAgent)self).FlushSensor(); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { EnemyAgent.LogMessage(param0); })); meta.RegisterMethod(1306089002, new CAgentMethodVoid(delegate(Agent self) { ((EnemyAgent)self).MakeIdle(); })); meta.RegisterMethod(740963922, new CAgentMethodVoid(delegate(Agent self) { ((EnemyAgent)self).Patrol(); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <BaseAgent>("BaseAgent"); AgentMeta.Register <EnemyAgent>("EnemyAgent"); AgentMeta.Register <LogicStatus>("LogicStatus"); ComparerRegister.RegisterType <LogicStatus, CompareValue_LogicStatus>(); return(true); }
protected override void load(int version, string agentType, List <property_t> properties) { base.load(version, agentType, properties); for (int i = 0; i < properties.Count; ++i) { property_t p = properties[i]; if (p.name == "Method") { this.m_method = AgentMeta.ParseMethod(p.value); } else if (p.name == "IsEndState") { this.m_bIsEndState = (p.value == "true"); } } }
protected override void load(int version, string agentType, List <property_t> properties) { base.load(version, agentType, properties); for (int i = 0; i < properties.Count; ++i) { property_t p = properties[i]; if (p.name == "Opl") { this.m_opl = AgentMeta.ParseProperty(p.value); } else if (p.name == "Operator") { Debug.Check(p.value == "Add" || p.value == "Sub" || p.value == "Mul" || p.value == "Div"); this.m_operator = OperationUtils.ParseOperatorType(p.value); } else if (p.name == "Opr1") { int pParenthesis = p.value.IndexOf('('); if (pParenthesis == -1) { this.m_opr1 = AgentMeta.ParseProperty(p.value); } else { this.m_opr1 = AgentMeta.ParseMethod(p.value); } } else if (p.name == "Opr2") { int pParenthesis = p.value.IndexOf('('); if (pParenthesis == -1) { this.m_opr2 = AgentMeta.ParseProperty(p.value); } else { this.m_opr2 = AgentMeta.ParseMethod(p.value); } } } }
public override bool Load() { AgentMeta.TotalSignature = 254207487; AgentMeta meta; // behaviac.Agent meta = new AgentMeta(24743406); AgentMeta._AgentMetas_[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // FirstAgent meta = new AgentMeta(1928400199); AgentMeta._AgentMetas_[1778122110] = meta; meta.RegisterMemberProperty(592811825, new CMemberProperty <FirstEnum>("firstEnum", delegate(Agent self, FirstEnum value) { ((FirstAgent)self)._set_firstEnum(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_firstEnum()); })); meta.RegisterMemberProperty(2956534501, new CMemberProperty <FirstStruct>("firstStruct", delegate(Agent self, FirstStruct value) { ((FirstAgent)self).firstStruct = value; }, delegate(Agent self) { return(((FirstAgent)self).firstStruct); })); meta.RegisterMemberProperty(576049271, new CMemberProperty <HeroStruct>("heroStruct", delegate(Agent self, HeroStruct value) { ((FirstAgent)self).heroStruct = value; }, delegate(Agent self) { return(((FirstAgent)self).heroStruct); })); meta.RegisterMemberProperty(2098717474, new CMemberProperty <HeroType>("heroType", delegate(Agent self, HeroType value) { ((FirstAgent)self).heroType = value; }, delegate(Agent self) { return(((FirstAgent)self).heroType); })); meta.RegisterMethod(3345343196, new CAgentMethodVoid <int>(delegate(Agent self, int val) { }) /* event_task */); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FirstAgent.LogMessage(param0); })); meta.RegisterMethod(702722749, new CAgentMethodVoid <string>(delegate(Agent self, string txt) { ((FirstAgent)self).Say(txt); })); meta.RegisterMethod(1505908390, new CAgentMethodVoid(delegate(Agent self) { ((FirstAgent)self).SayHello(); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <FirstAgent>("FirstAgent"); AgentMeta.Register <FirstEnum>("FirstEnum"); ComparerRegister.RegisterType <FirstEnum, CompareValue_FirstEnum>(); AgentMeta.Register <HeroType>("HeroType"); ComparerRegister.RegisterType <HeroType, CompareValue_HeroType>(); AgentMeta.Register <FirstStruct>("FirstStruct"); ComparerRegister.RegisterType <FirstStruct, CompareValue_FirstStruct>(); AgentMeta.Register <HeroStruct>("HeroStruct"); ComparerRegister.RegisterType <HeroStruct, CompareValue_HeroStruct>(); return(true); }
public static object FromString(Type type, string valStr, bool bStrIsArrayType /*= false*/) { if (!string.IsNullOrEmpty(valStr) && valStr == "null") { Debug.Check(Utils.IsRefNullType(type)); return(null); } if (type.IsByRef) { type = type.GetElementType(); } bool bIsArrayType = Utils.IsArrayType(type); object v = null; //customized type, struct or enum if (bStrIsArrayType || bIsArrayType) { if (bIsArrayType) { Type elemType = type.GetGenericArguments()[0]; v = StringUtils.FromStringVector(elemType, valStr); } else { v = StringUtils.FromStringVector(type, valStr); } } else if (type == typeof(behaviac.IProperty)) { v = AgentMeta.ParseProperty(valStr); } else if (Utils.IsCustomClassType(type)) { v = StringUtils.FromStringStruct(type, valStr); } else { v = Utils.FromStringPrimitive(type, valStr); } return(v); }
public override bool Load() { AgentMeta.TotalSignature = 3268884020; AgentMeta meta; // behaviac.Agent meta = new AgentMeta(24743406); AgentMeta._AgentMetas_[2436498804] = meta; meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { behaviac.Agent.LogMessage(param0); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // FirstAgent meta = new AgentMeta(1364083623); AgentMeta._AgentMetas_[1778122110] = meta; meta.RegisterMemberProperty(2082220067, new CMemberProperty <int>("p1", delegate(Agent self, int value) { ((FirstAgent)self)._set_p1(value); }, delegate(Agent self) { return(((FirstAgent)self)._get_p1()); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { FirstAgent.LogMessage(param0); })); meta.RegisterMethod(1759647744, new CAgentMethodVoid <string>(delegate(Agent self, string value) { ((FirstAgent)self).m1(value); })); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); // SecondAgent meta = new AgentMeta(20352470); AgentMeta._AgentMetas_[2432194202] = meta; meta.RegisterMemberProperty(2082220067, new CMemberProperty <int>("p1", delegate(Agent self, int value) { ((SecondAgent)self)._set_p1(value); }, delegate(Agent self) { return(((SecondAgent)self)._get_p1()); })); meta.RegisterMethod(1045109914, new CAgentStaticMethodVoid <string>(delegate(string param0) { SecondAgent.LogMessage(param0); })); meta.RegisterMethod(1137658819, new CMethod_SecondAgent_m2()); meta.RegisterMethod(2521019022, new CMethod_behaviac_Agent_VectorAdd()); meta.RegisterMethod(2306090221, new CMethod_behaviac_Agent_VectorClear()); meta.RegisterMethod(3483755530, new CMethod_behaviac_Agent_VectorContains()); meta.RegisterMethod(505785840, new CMethod_behaviac_Agent_VectorLength()); meta.RegisterMethod(502968959, new CMethod_behaviac_Agent_VectorRemove()); AgentMeta.Register <behaviac.Agent>("behaviac.Agent"); AgentMeta.Register <FirstAgent>("FirstAgent"); AgentMeta.Register <SecondAgent>("SecondAgent"); return(true); }
protected override void load(int version, string agentType, List <property_t> properties) { base.load(version, agentType, properties); for (int i = 0; i < properties.Count; ++i) { property_t p = properties[i]; if (p.name == "Task") { this.m_event = AgentMeta.ParseMethod(p.value, ref this.m_eventName); } else if (p.name == "ReferenceFilename") { this.m_referencedBehaviorPath = p.value; if (Config.PreloadBehaviors) { BehaviorTree behaviorTree = Workspace.Instance.LoadBehaviorTree(this.m_referencedBehaviorPath); Debug.Check(behaviorTree != null); } } else if (p.name == "TriggeredOnce") { this.m_bTriggeredOnce = (p.value == "true"); } else if (p.name == "TriggerMode") { if (p.value == "Transfer") { this.m_triggerMode = TriggerMode.TM_Transfer; } else if (p.value == "Return") { this.m_triggerMode = TriggerMode.TM_Return; } else { Debug.Check(false, string.Format("unrecognised trigger mode {0}", p.value)); } } } }