myMaze(走迷宫游戏)

 

开机界面

点击开始,颜色改变

加载界面为gif动画

游戏窗口

生成迷宫,使用图片素材,

迷宫砖块都是图片

根据每一个坐标是否有砖块设置不同的图片

按下按钮改变不同的颜色,使用样式表(设置不同的图片)

人物行走动画,改变widget的位置,同时改变人物对应的图片(根据人物的朝向)

The QSequentialAnimationGroup class provides a sequential group of animations.

QSequentialAnimationGroup is a QAnimationGroup that runs its animations in sequence, i.e., it starts one animation after another has finished playing. The animations are played in the order they are added to the group (using addAnimation() or insertAnimation()). The animation group finishes when its last animation has finished.

使用按键控制人物运动

 

原文地址:https://www.cnblogs.com/tangyuanjie/p/14028245.html