public void Simulate() { if (Body.PositionChangedBuffer) { tempNode = GridManager.GetNode(Body.Position.x, Body.Position.y); if (System.Object.ReferenceEquals(tempNode, LocatedNode) == false) { LocatedNode.RemoveAt(this.nodeIndex); nodeIndex = tempNode.Add(Agent); LocatedNode = tempNode; } } }
public void Deactivate() { LocatedNode.RemoveAt(this.nodeIndex); LocatedNode = null; }