动态背景之中国阁楼风景

一个微交互动画,用鼠标移动时,后面的凉亭会动,这本来是一个scratch作品,现在用Python把它做一下

"""一个微交互动画,用鼠标移动时,后面的凉亭会动,这本来是一个scratch作品,现在用Python把它做一下."""

import pygame
from pygame.locals import *

width,height = 960,720
screen = pygame.display.set_mode((width,height))
pygame.display.set_caption("动态背景之中国阁楼风景 www.lixingqiu.com")

background = pygame.image.load("images/蓝天太阳背景.png")

pavilion = pygame.image.load("images/阁楼.png").convert_alpha()
pavilion_rect = pavilion.get_rect()

green1 = pygame.image.load("images/绿植.png").convert_alpha()
green2 = pygame.image.load("images/前绿.png").convert_alpha()

clock = pygame.time.Clock()
running = True

You must log in to read the rest of this article. Please log in or register as a user.