c# 做的俄罗斯方块 using System; using System.Collections.Generic; using System.Text; using System.Drawing; namespace ChinaBlock { class Block { public Square square1; //组成block的四个小方块 public Square square2; public Square square3; public Square square4; priv
在项目中,我们要求做一个纸飞机的功能:就是当打开这个界面时,会有4架纸飞机从屏幕左侧飞入,然后到达自己的位置坐上下浮动,同时云彩也不断地从屏幕右侧飘到屏幕左侧。当你点击其中一个纸飞机时,这个纸飞机先向上飞出屏幕外,再从左侧飞入,当飞机回到原来位置时,弹出一个消息框。下面直接上代码:
一、首先自定义一个RelativeLayout,主要目的就是制作飞机的进入动画:
public class PaperPlaneLayout extends RelativeLayout implements Vi