public virtual void OnUpdate() { int count = nodeList.Count; int i = 0; LogicNode node = null; for (i = 0; i < count; i++) { node = nodeList[i]; if (node.IsValid) { node.OnUpdate(); } } count = logicList.Count; for (i = 0; i < count; i++) { if (logicList[i].IsValid) { logicList[i].OnUpdate(); } } }