McRogueFace/tests/unit/test_simple_callback.py

14 lines
334 B
Python
Raw Normal View History

#!/usr/bin/env python3
"""Very simple callback test"""
import mcrfpy
import sys
def cb(a, t):
print("CB")
2026-01-03 10:59:52 -05:00
test = mcrfpy.Scene("test")
test.activate()
e = mcrfpy.Entity((0, 0), texture=None, sprite_index=0)
a = mcrfpy.Animation("x", 1.0, 0.1, "linear", callback=cb)
a.start(e)
mcrfpy.setTimer("exit", lambda r: sys.exit(0), 200)