Ejemplo n.º 1
0
        public static bool IsNullOrEmpty(StateNodeGroup node_group)
        {
            if (node_group == null)
            {
                return(true);
            }
            int length = node_group.Count();

            return(length <= 0);
        }
Ejemplo n.º 2
0
        public ST_Group(StateNodeGroup from_group, int action, StateNodeBase to_node)
        {
            LogManager.Assert(!StateNodeGroup.IsNullOrEmpty(from_group), "from node is null or empty");
            LogManager.Assert(to_node != null, "to node is null");
            LogManager.Assert(action > 0, "action <= 0");
            LogManager.Assert(!string.Equals(from_group._name, to_node._name), string.Format("same type of node: [{0}]", from_group._name));

            _from_group = from_group;
            _to_node    = to_node;
            _action     = action;
            foreach (var node in _from_group)
            {
                trans_list.Add(new ST_Single(node, _to_node, _action));
            }

            _st_cond = ST_Condition.FullPass;
        }
Ejemplo n.º 3
0
 public override void Destroy()
 {
     _from_group.Destroy();
     _from_group = null;
     _to_node    = null;
 }