Exemple #1
0
        /// <summary>
        /// Called by CryEngine. Do not call directly.
        /// </summary>
        public override void ProcessEvent(IFlowNode.EFlowEvent evt, IFlowNode.SActivationInfo info)
        {
            Info = info;
            switch (evt)
            {
            case IFlowNode.EFlowEvent.eFE_Initialize:
                foreach (var pc in Node.Inputs)
                {
                    if (pc.PropertyType != typeof(Signal))
                    {
                        pc.Info.SetValue(Node, GetPortValue(pc.PropertyType, pc.Index), null);
                    }
                }
                Info.pGraph.SetRegularlyUpdated(Info.myID, true);
                break;

            case IFlowNode.EFlowEvent.eFE_Activate:
                foreach (var pc in Node.Inputs)
                {
                    if (pc.PropertyType != typeof(Signal))
                    {
                        pc.Info.SetValue(Node, GetPortValue(pc.PropertyType, pc.Index), null);
                    }
                    else if (IsPortActive(pc.Index))
                    {
                        Node.RaiseOnSignal(pc.Info);
                    }
                }
                break;

            case IFlowNode.EFlowEvent.eFE_Update:
                if (Node.OnQuit.Activate)
                {
                    Info.pGraph.SetRegularlyUpdated(Info.myID, false);
                    Node.OnQuit.Activate = false;
                    foreach (var pc in Node.Outputs)
                    {
                        if (pc.PropertyType != typeof(Signal))
                        {
                            ActivateOutput(pc.Index, pc.Info.GetValue(Node, null));
                        }
                        else
                        {
                            ActivateOutput(pc.Index);
                        }
                    }
                }
                break;

            default:
                break;
            }
            Info = null;
        }
Exemple #2
0
 /// <summary>
 /// Called by CryEngine. Do not call directly.
 /// </summary>
 public virtual void ProcessEvent(IFlowNode.EFlowEvent evt)
 {
 }