public void Wire(Node node, CachedNodeStateInfo state) { Timer timer = node.CreateConnectedTimer(_timeoutMethod, _processMode, _waitTime, _oneShot, _autostart); timer.Name = Utils.NormalizeMemberName(state.Name); state.SetValue(node, timer); }
public void Wire(Node node, CachedNodeStateInfo state) { Node nodeToReference; if (_matchType == MatchTypes.Type) { nodeToReference = (Node)node.GetChildren().First(c => state.StateType.IsInstanceOfType(c)); } else { NodePath nodePath = Utils.NormalizeMemberName(state.Name); nodeToReference = node.GetNode(nodePath); } state.SetValue(node, nodeToReference); }
public void Wire(Node node, CachedNodeStateInfo state) { TimerSystem timerSystem = node.AddAndReturnChild(new TimerSystem()); timerSystem.Name = Utils.NormalizeMemberName(state.Name); timerSystem.Parent = node; // Field-Defined TimerReceivers foreach (TimerReceiverAttribute attribute in state.GetAttributes().OfType <TimerReceiverAttribute>()) { timerSystem.AddTimer(attribute.TimeoutMethod, attribute.ProcessMode, attribute.WaitTime, attribute.OneShot, attribute.Autostart); } // Method-Defined TimerReceivers CachedNodeMethodInfo[] compatibleMethods = state.DeclaringType.GetMethods().Where(m => m.GetAttribute <TimerReceiverAttribute>() != null).ToArray(); foreach (CachedNodeMethodInfo method in compatibleMethods) { TimerReceiverAttribute attribute = method.GetAttribute <TimerReceiverAttribute>(); timerSystem.AddTimer(method.Name, attribute.ProcessMode, attribute.WaitTime, attribute.OneShot, attribute.Autostart); } state.SetValue(node, timerSystem); }
public void Wire(Node node, CachedNodeStateInfo state) { state.SetValue(node, node.GetParent()); }
public void Wire(Node node, CachedNodeStateInfo state) { state.SetValue(node, node.GetTree().GetNodeOfType(state.StateType)); }
public void Wire(Node node, CachedNodeStateInfo state) { state.SetValue(node, node.GetNode(_path)); }