我在国外留学,老师留了一个关于用SDL实现猫的图片随鼠标移动的任务,老师已经完成了main的部分,要我们补全cat的类,并且在类中加入3个functions:
draw()this function should draw/blit the image of the cat on the surface provided through the constructor.
void tellMouse(int x, int y); – this function will store the provided coordinates as mouse position to be used in the update() function.
void update(void); – this function should update the position of the cat stored in the internal variables in such way that the cat chases the mouse.
希望大侠帮我个忙,拜谢
菜鸟阿子