Kids at times try to get their parent's attention and if they feel that something or someone is in the way, they may act out.
The children are yet to know you, they may be also protecting themselves (fearing that once they get to love you and get attached to you, that you may also leave them) Hence, the older one is trying to put an emotional barrier b/w you.
You can continue to act your usual self with them like you have already done. When they ask (if they do again, if the parents are still together, you can redirect them to their mom and let them know it is something for her to tell them) The kids may also blame you (should they find out that the parents are not together as a couple/family) for the separation and you've got to be able to deal with it.
At that time, you and their mom will explain to them in age appropriate terms that people can have different individuals be a part in their life, that if mommies and daddies are not together it has nothing to do with the children causing that; adults make their decisions whom to befriend etc. Then, their mom will address their fears (whether or not they'd see their dad/spend time with him, reassure them that they love them even though they are not together, etc)