protected virtual void load(int version, string agentType, List <property_t> properties) { foreach (property_t _t in properties) { if (_t.name == "EnterAction") { if (!string.IsNullOrEmpty(_t.value)) { this.m_enterAction = behaviac.Action.LoadMethod(_t.value); } } else if ((_t.name == "ExitAction") && !string.IsNullOrEmpty(_t.value)) { this.m_exitAction = behaviac.Action.LoadMethod(_t.value); } } Workspace.HandleNodeLoaded(this.GetClassNameString().Replace(".", "::"), properties); }
protected virtual void load(int version, string agentType, List <property_t> properties) { using (List <property_t> .Enumerator enumerator = properties.GetEnumerator()) { while (enumerator.MoveNext()) { property_t current = enumerator.get_Current(); if (current.name == "EnterAction") { if (!string.IsNullOrEmpty(current.value)) { this.m_enterAction = Action.LoadMethod(current.value); } } else if (current.name == "ExitAction" && !string.IsNullOrEmpty(current.value)) { this.m_exitAction = Action.LoadMethod(current.value); } } } string nodeType = this.GetClassNameString().Replace(".", "::"); Workspace.HandleNodeLoaded(nodeType, properties); }
protected virtual void load(int version, string agentType, List <property_t> properties) { foreach (property_t p in properties) { if (p.name == "EnterAction") { if (!string.IsNullOrEmpty(p.value)) { this.m_enterAction = Action.LoadMethod(p.value); }//if (p.value[0] != '\0') } else if (p.name == "ExitAction") { if (!string.IsNullOrEmpty(p.value)) { this.m_exitAction = Action.LoadMethod(p.value); }//if (p.value[0] != '\0') } } string nodeType = this.GetClassNameString().Replace(".", "::"); Workspace.HandleNodeLoaded(nodeType, properties); }