private void takeBackHook(int speed) { // Remove node for take back hook chain for (int i = 0; i < speed; i++) { if (nodes.Count > 0) { HookNode node = nodes [0].GetComponent <HookNode> (); node.RemoveMe(); nodes.RemoveAt(0); if (nodes.Count == 0) { break; } } } }
private void addHookNode(int speed) { // Bond new node for (int i = 0; i < speed; i++) { Transform preTransform = LastNode(); Vector3 position = nextPosition(preTransform); Quaternion rotation = nextRotation(preTransform, position); GameObject hookNodeClone = Instantiate(hookNodePrefab, position, rotation) as GameObject; HookNode node = hookNodeClone.GetComponent <HookNode> (); node.hookEventListener.StartTakeBackHook += StartTakeBackHook; // node.canReflect = canReflect; Physics.IgnoreCollision(hookNodeClone.collider, ownerTransform.gameObject.collider); if (nodes.Count < maxNodes) { nodes.Add(hookNodeClone); } } }
public void VisitHookNode(HookNode hookNode) { CollectedHooks.Add(hookNode.Hook); }
public void VisitHookNode(HookNode hookNode) { EnqueueNode(hookNode); }
public void VisitHookNode(HookNode hookNode) { _nodeWasHandled = _hookHandler(hookNode); }